From bcb8e8cafb9e4a7a529bcc36d87e6a977d15b507 Mon Sep 17 00:00:00 2001 From: Mike Schreiber Date: Thu, 8 Feb 2024 14:06:02 -0800 Subject: [PATCH] Bump CI to macOS 14 and build visionOS debug simulator --- .github/workflows/ci.yml | 5 +++-- .github/workflows/podPublish.yml | 2 +- scripts/ci.sh | 8 ++++++++ scripts/xcodebuild_wrapper.sh | 11 +++++++++++ 4 files changed, 23 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4cdc57539b..9624858b23 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,7 +12,7 @@ on: jobs: validation: - runs-on: macos-13 + runs-on: macos-14 strategy: fail-fast: true steps: @@ -24,7 +24,7 @@ jobs: - name: validation run: scripts/validation.sh xcodebuild: - runs-on: macos-13 + runs-on: macos-14 strategy: fail-fast: false matrix: @@ -33,6 +33,7 @@ jobs: 'macos_build FluentUITestApp-macOS Debug build -resultBundlePath TestResultsMac test -destination "platform=macOS,arch=x86_64"', 'ios_simulator_build Demo.Development Debug build test -resultBundlePath TestResultsiOS -destination "platform=iOS Simulator,name=iPhone 14 Pro"', 'ios_device_build Demo.Development Release build', + 'visionos_simulator_build Demo.Development Debug build', ] steps: diff --git a/.github/workflows/podPublish.yml b/.github/workflows/podPublish.yml index 2c1eefda3c..1dc1fb5fd1 100644 --- a/.github/workflows/podPublish.yml +++ b/.github/workflows/podPublish.yml @@ -7,7 +7,7 @@ on: - 0.2.[0-9]+_main_0.2 jobs: Pod-Publish: - runs-on: macos-13 + runs-on: macos-14 steps: - uses: actions/checkout@v3 diff --git a/scripts/ci.sh b/scripts/ci.sh index 8c7e74d713..d1afe8ff18 100755 --- a/scripts/ci.sh +++ b/scripts/ci.sh @@ -49,6 +49,10 @@ echo "Building iOS Release Static Lib Device" $XCODEBUILD_WRAPPER_LOCATION ios_device_build FluentUI-iOS Release build handle_exit_code +echo "Building visionOS Static Lib Debug Simulator" +$XCODEBUILD_WRAPPER_LOCATION visionos_simulator_build FluentUI-iOS Debug build +handle_exit_code + echo "Building iOS Testapp Debug Simulator" $XCODEBUILD_WRAPPER_LOCATION ios_simulator_build Demo.Development Debug build handle_exit_code @@ -69,6 +73,10 @@ echo "Building iOS Testapp Release Device" $XCODEBUILD_WRAPPER_LOCATION ios_device_build Demo.Development Release build handle_exit_code +echo "Building visionOS Testapp Debug Simulator" +$XCODEBUILD_WRAPPER_LOCATION visionos_simulator_build Demo.Development Debug build +handle_exit_code + # Check if any of our individual build steps failed if [ $EXIT_CODE -ne 0 ] then diff --git a/scripts/xcodebuild_wrapper.sh b/scripts/xcodebuild_wrapper.sh index 852aa5da28..8b760a0a94 100755 --- a/scripts/xcodebuild_wrapper.sh +++ b/scripts/xcodebuild_wrapper.sh @@ -56,6 +56,17 @@ function macos_build() return $? } +# Run a visionOS simulator xcodebuild invocation with the specified scheme, configuration, and build commands +# +# \param $1 scheme +# \param $2 configuration +# \param $3+ build commands +function visionos_simulator_build() +{ + invoke_xcodebuild workspace "ios/FluentUI.xcworkspace" "$1" "$2" xrsimulator "${@:3}" + return $? +} + # Execute commands passed in to this script and forward on the exit code. "$@" exit $?