Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GHA updates: visionOS and Xcode 16 - Part 1 #13697

Merged
merged 15 commits into from
Sep 24, 2024
48 changes: 31 additions & 17 deletions .github/workflows/abtesting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,8 @@ jobs:
matrix:
# TODO: macos tests are blocked by https://github.com/erikdoe/ocmock/pull/532
target: [ios, tvos, macos --skip-tests, watchos]
os: [macos-14, macos-13]
include:
- os: macos-14
xcode: Xcode_15.3
- os: macos-13
xcode: Xcode_15.2
os: [macos-14]
xcode: [Xcode_15.2, Xcode_16]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
Expand All @@ -46,30 +42,48 @@ jobs:
retry_wait_seconds: 120
command: scripts/pod_lib_lint.rb FirebaseABTesting.podspec --platforms=${{ matrix.target }}

spm-package-resolved:
runs-on: macos-14
outputs:
cache_key: ${{ steps.generate_cache_key.outputs.cache_key }}
steps:
- uses: actions/checkout@v4
- name: Generate Swift Package.resolved
id: swift_package_resolve
run: |
swift package resolve
- name: Generate cache key
id: generate_cache_key
run: |
cache_key="${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }}"
echo "cache_key=${cache_key}" >> "$GITHUB_OUTPUT"
- uses: actions/cache/save@v4
id: cache
with:
path: .build
key: ${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }}
paulb777 marked this conversation as resolved.
Show resolved Hide resolved

spm:
# Don't run on private repo unless it is a PR.
if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
needs: [spm-package-resolved]
paulb777 marked this conversation as resolved.
Show resolved Hide resolved
strategy:
max-parallel: 1
matrix:
target: [iOS, tvOS, macOS, catalyst, watchOS]
os: [macos-13, macos-14]
os: [macos-14]
xcode: [Xcode_15.2, Xcode_16]
include:
- os: macos-14
xcode: Xcode_15.3
- os: macos-13
xcode: Xcode_15.2
- os: macos-14
xcode: Xcode_15.2
- os: macos-14
xcode: Xcode_15.2
target: visionOS
spmbuildonly: buildonly
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126
- uses: actions/cache/restore@v4
with:
cache_key: spm${{ matrix.os }}-${{ matrix.xcode }}-${{ matrix.target }}
path: .build
key: ${{needs.spm-package-resolved.outputs.cache_key}}
- name: Xcode
run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer
- name: Initialize xcodebuild
Expand All @@ -80,7 +94,7 @@ jobs:
max_attempts: 3
retry_on: error
retry_wait_seconds: 120
command: scripts/build.sh ABTestingUnit ${{ matrix.target }} spm
command: scripts/build.sh ABTestingUnit ${{ matrix.target }} spm${{ matrix.spmbuildonly }}

catalyst:
# Don't run on private repo unless it is a PR.
Expand Down
1 change: 0 additions & 1 deletion scripts/setup_spm_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,3 @@ sed -i '' 's#exact:[[:space:]]*"[0-9.]*"#branch: "main"#' Package.swift

mkdir -p .swiftpm/xcode/xcshareddata/xcschemes
cp scripts/spm_test_schemes/* .swiftpm/xcode/xcshareddata/xcschemes/
xcodebuild -list
Loading