Skip to content

Commit

Permalink
Xcode 16 (#24)
Browse files Browse the repository at this point in the history
* Xcode 16

* Clean

* Rename job

* Move scheme env

* use sequoia

* test without building

* remove if

* update calculate for matrix

* bash

* Update sims

Update sims
  • Loading branch information
AllDmeat authored Dec 19, 2024
1 parent 04c2f13 commit c926367
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 31 deletions.
2 changes: 1 addition & 1 deletion .github/actions/prepare_env_app_build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ runs:

steps:
- name: Get Xcode Version
shell: 'zsh {0}'
shell: bash
run: echo "XCODE_VERSION=$(<.xcode-version)" >> $GITHUB_ENV

- name: Select Xcode
Expand Down
46 changes: 17 additions & 29 deletions .github/workflows/unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,29 +5,22 @@ on:
branches:
- 'main'

defaults:
run:
shell: zsh {0}

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

env:
LANG: "en_US.UTF-8"
LANGUAGE: "en_US.UTF-8"
LC_ALL: "en_US.UTF-8"
SCHEME: "BlackBoxFirebasePerformance"

jobs:
unit-tests-spm:
runs-on: 'macos-13'
tests:
runs-on: 'macos-15'

timeout-minutes: 15

env:
SCHEME: "BlackBoxFirebasePerformance"

strategy:
matrix:
DESTINATION: ["platform=iOS Simulator,name=iPhone 11", "platform=tvOS Simulator,name=Apple TV"]
DESTINATION: ["platform=iOS Simulator,name=iPhone 16", "platform=tvOS Simulator,name=Apple TV"]

steps:
- name: Get source code
Expand All @@ -38,12 +31,6 @@ jobs:

- name: Resolve Dependencies
run: xcodebuild -resolvePackageDependencies

- name: Create Simulators
run: |
xcrun simctl delete all
xcrun simctl create "iPhone 11" com.apple.CoreSimulator.SimDeviceType.iPhone-11
xcrun simctl create "Apple TV" com.apple.CoreSimulator.SimDeviceType.Apple-TV-4K-3rd-generation-4K

- name: Build
run: >
Expand All @@ -53,22 +40,23 @@ jobs:
-quiet
- name: Test
if: ${{ !contains(matrix.DESTINATION, 'watchOS') }} # watchOS Simulator is too slow on GitHub-hosted Runners, expectation-related tests are flaky
run: >
xcodebuild test
xcodebuild test-without-building
-scheme ${{ env.SCHEME }}
-destination '${{ matrix.DESTINATION }}'
-quiet
# This allows us to have a branch protection rule for tests and deploys with matrix
status-for-matrix:
runs-on: 'macos-latest'
needs: ['unit-tests-spm']
runs-on: 'ubuntu-latest'
needs: tests
if: always()
steps:
- name: Successful deploy
if: ${{ !(contains(needs.*.result, 'failure')) }}
run: exit 0
- name: Failing deploy
if: ${{ contains(needs.*.result, 'failure') }}
run: exit 1
- name: Calculate matrix result
run: |
result="${{ needs.tests.result }}"
if [[ $result == "success" ]]; then
exit 0
else
exit 1
fi
2 changes: 1 addition & 1 deletion .xcode-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
14
16

0 comments on commit c926367

Please sign in to comment.