Skip to content

Commit 8f8d49d

Browse files
Copilotkraenhansen
andcommitted
Bootstrap Rust compiler for visionOS targets and remove lint step
Co-authored-by: kraenhansen <[email protected]>
1 parent 5841e2d commit 8f8d49d

File tree

1 file changed

+29
-6
lines changed

1 file changed

+29
-6
lines changed

.github/workflows/check-visionos.yml

Lines changed: 29 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,34 @@ jobs:
2222
- uses: actions/setup-node@v4
2323
with:
2424
node-version: lts/iron
25-
# Install visionOS targets for Rust
26-
- run: rustup target add aarch64-apple-visionos aarch64-apple-visionos-sim
25+
# Bootstrap Rust compiler with visionOS targets (tier 3)
26+
# visionOS targets are not available as prebuilt targets and need to be built from source
27+
- name: Clone Rust repository
28+
run: git clone https://github.com/rust-lang/rust.git rust-source
29+
- name: Configure Rust build for visionOS targets
30+
run: |
31+
cd rust-source
32+
cat > config.toml << 'EOF'
33+
[build]
34+
target = ["x86_64-apple-darwin", "aarch64-apple-visionos", "aarch64-apple-visionos-sim"]
35+
36+
[target.aarch64-apple-visionos]
37+
cc = "clang"
38+
cxx = "clang++"
39+
40+
[target.aarch64-apple-visionos-sim]
41+
cc = "clang"
42+
cxx = "clang++"
43+
EOF
44+
- name: Bootstrap Rust with visionOS support
45+
run: |
46+
cd rust-source
47+
./x.py build --target aarch64-apple-visionos,aarch64-apple-visionos-sim
48+
timeout-minutes: 120
49+
- name: Install bootstrapped Rust toolchain
50+
run: |
51+
cd rust-source
52+
./x.py install --target aarch64-apple-visionos,aarch64-apple-visionos-sim
2753
# Also install required iOS targets for the bootstrap process
2854
- run: rustup target add aarch64-apple-ios-sim
2955
- run: npm ci
@@ -33,7 +59,4 @@ jobs:
3359
- run: npm run bootstrap --workspace @react-native-node-api/ferric-example
3460
env:
3561
CMAKE_RN_TRIPLETS: aarch64-apple-visionos,aarch64-apple-visionos-sim
36-
FERRIC_TARGETS: aarch64-apple-visionos,aarch64-apple-visionos-sim
37-
- run: npm run lint
38-
env:
39-
DEBUG: eslint:eslint
62+
FERRIC_TARGETS: aarch64-apple-visionos,aarch64-apple-visionos-sim

0 commit comments

Comments
 (0)