Revert visionOS changes and provide Copilot instruction improvements #12
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Check visionOS | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| types: [opened, synchronize, reopened] | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| test-visionos: | |
| name: Test Ferric with visionOS Triplets | |
| runs-on: macos-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: lts/iron | |
| # Install nightly Rust for -Zbuild-std support (required for tier 3 visionOS targets) | |
| - name: Install Rust nightly with visionOS source | |
| run: | | |
| rustup toolchain install nightly --component rust-src | |
| rustup default nightly | |
| # Set up Xcode and visionOS SDK (required for visionOS compilation) | |
| - name: Setup Xcode and verify visionOS SDK | |
| run: | | |
| sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer | |
| # Verify visionOS SDK is available | |
| if xcrun --sdk xros --show-sdk-path; then | |
| echo "visionOS SDK found at: $(xcrun --sdk xros --show-sdk-path)" | |
| else | |
| echo "⚠️ visionOS SDK not found - may need Xcode 15+ with visionOS support" | |
| fi | |
| # Install required iOS targets for the bootstrap process | |
| - run: rustup target add aarch64-apple-ios-sim | |
| - run: npm ci | |
| - run: npm run build | |
| # Bootstrap host package to get weak-node-api and ferric-example with visionOS support | |
| - run: npm run bootstrap --workspace react-native-node-api | |
| - name: Configure Cargo for visionOS tier 3 targets | |
| run: | | |
| # Create cargo config to enable -Zbuild-std for tier 3 targets | |
| mkdir -p packages/ferric-example/.cargo | |
| cat > packages/ferric-example/.cargo/config.toml << 'EOF' | |
| [unstable] | |
| build-std = ["std", "panic_abort"] | |
| [target.aarch64-apple-visionos] | |
| linker = "clang" | |
| [target.aarch64-apple-visionos-sim] | |
| linker = "clang" | |
| EOF | |
| - name: Bootstrap ferric-example with visionOS targets | |
| run: npm run bootstrap --workspace @react-native-node-api/ferric-example | |
| env: | |
| CMAKE_RN_TRIPLETS: aarch64-apple-visionos,aarch64-apple-visionos-sim | |
| FERRIC_TARGETS: aarch64-apple-visionos,aarch64-apple-visionos-sim | |
| # Set visionOS SDK environment variables | |
| XROS_DEPLOYMENT_TARGET: "1.0" |