@@ -456,6 +456,107 @@ jobs:
456
456
../scripts/xcodebuild.sh ${{ steps.configure.outputs.project-directory }}/TemplateExample.xcworkspace build
457
457
working-directory : template-example
458
458
timeout-minutes : 60
459
+ visionos :
460
+ name : " visionOS"
461
+ runs-on : macos-14
462
+ if : ${{ github.event_name != 'schedule' }}
463
+ steps :
464
+ - name : Checkout
465
+ uses : actions/checkout@v4
466
+ with :
467
+ filter : blob:none
468
+ fetch-depth : 0
469
+ - name : Set up toolchain
470
+ uses : ./.github/actions/setup-toolchain
471
+ with :
472
+ platform : visionos
473
+ project-root : example
474
+ cache-key-prefix : example
475
+ xcode-developer-dir : /Applications/Xcode_15.2.app
476
+ - name : Set up react-native@nightly
477
+ if : ${{ github.event_name == 'schedule' }}
478
+ uses : ./.github/actions/setup-react-native
479
+ with :
480
+ version : nightly
481
+ - name : Install npm dependencies
482
+ uses : ./.github/actions/yarn
483
+ with :
484
+ immutable : ${{ github.event_name != 'schedule' }}
485
+ - name : Bundle JavaScript
486
+ run : |
487
+ yarn build:visionos || yarn build:visionos
488
+ working-directory : example
489
+ - name : Determine whether the visionOS app needs to be built
490
+ id : affected
491
+ uses : ./.github/actions/affected
492
+ - name : Install Pods
493
+ if : ${{ steps.affected.outputs.visionos != '' }}
494
+ uses : ./.github/actions/cocoapods
495
+ with :
496
+ project-directory : visionos
497
+ working-directory : example
498
+ - name : Build
499
+ if : ${{ steps.affected.outputs.visionos != '' }}
500
+ run : |
501
+ ../scripts/xcodebuild.sh visionos/Example.xcworkspace build-for-testing
502
+ working-directory : example
503
+ - name : Test `react-native config`
504
+ if : ${{ steps.affected.outputs.visionos != '' }}
505
+ run : |
506
+ node --test test/config.test.mjs
507
+ working-directory : example
508
+ timeout-minutes : 60
509
+ visionos-template :
510
+ name : " visionOS [template]"
511
+ strategy :
512
+ matrix :
513
+ template : [all, visionos]
514
+ runs-on : macos-14
515
+ if : ${{ github.event_name != 'schedule' }}
516
+ steps :
517
+ - name : Checkout
518
+ uses : actions/checkout@v4
519
+ with :
520
+ filter : blob:none
521
+ fetch-depth : 0
522
+ - name : Set up toolchain
523
+ uses : ./.github/actions/setup-toolchain
524
+ with :
525
+ platform : visionos
526
+ project-root : example
527
+ cache-key-prefix : template-${{ matrix.template }}
528
+ xcode-developer-dir : /Applications/Xcode_15.2.app
529
+ - name : Initialize test app
530
+ uses : ./.github/actions/init-test-app
531
+ with :
532
+ platform : ${{ matrix.template }}
533
+ - name : Bundle JavaScript
534
+ run : |
535
+ yarn build:visionos || yarn build:visionos
536
+ working-directory : template-example
537
+ - name : Determine whether the visionOS app needs to be built
538
+ id : affected
539
+ uses : ./.github/actions/affected
540
+ - name : Determine project directory
541
+ id : configure
542
+ if : ${{ steps.affected.outputs.visionos != '' }}
543
+ run : |
544
+ if [[ ${{ matrix.template }} == visionos ]]; then
545
+ echo 'project-directory=.' >> $GITHUB_OUTPUT
546
+ else
547
+ echo 'project-directory=visionos' >> $GITHUB_OUTPUT
548
+ fi
549
+ - name : Install Pods
550
+ if : ${{ steps.affected.outputs.visionos != '' }}
551
+ run : |
552
+ pod install --project-directory=${{ steps.configure.outputs.project-directory }}
553
+ working-directory : template-example
554
+ - name : Build
555
+ if : ${{ steps.affected.outputs.visionos != '' }}
556
+ run : |
557
+ ../scripts/xcodebuild.sh ${{ steps.configure.outputs.project-directory }}/TemplateExample.xcworkspace build
558
+ working-directory : template-example
559
+ timeout-minutes : 60
459
560
windows :
460
561
name : " Windows"
461
562
runs-on : windows-latest
0 commit comments