Skip to content
Merged
49 changes: 29 additions & 20 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,43 @@ 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') }}

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]
strategy:
max-parallel: 1
matrix:
target: [iOS, tvOS, macOS, catalyst, watchOS]
os: [macos-13, macos-14]
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
os: [macos-14]
xcode: [Xcode_15.2, Xcode_16]
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 Down
45 changes: 29 additions & 16 deletions .github/workflows/appdistribution.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,8 @@ jobs:
strategy:
matrix:
target: [ios]
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 @@ -41,25 +37,42 @@ jobs:
scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseAppDistribution.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') }}

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]
strategy:
max-parallel: 1
matrix:
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
- uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126
- uses: actions/cache/restore@v4
with:
cache_key: spm${{ matrix.os }}-${{ matrix.xcode }}
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 Down
87 changes: 61 additions & 26 deletions .github/workflows/auth.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,8 @@ jobs:
podspec: [FirebaseAuthInterop.podspec, FirebaseAuth.podspec]
# 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
tests: --skip-tests
- os: macos-13
xcode: Xcode_15.2
tests:
os: [macos-14]
xcode: [Xcode_15.2, Xcode_16]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
Expand All @@ -48,7 +42,6 @@ jobs:
run: scripts/configure_test_keychain.sh
- name: Xcode
run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer
#TODO: Restore warnings check after resolution of #11693
- uses: nick-fields/retry@v3
with:
timeout_minutes: 120
Expand All @@ -57,6 +50,36 @@ jobs:
retry_wait_seconds: 120
command: scripts/pod_lib_lint.rb ${{ matrix.podspec }} --platforms=${{ matrix.target }} ${{ matrix.tests }}

# TODO: Fix warnings on Xcode 16 and move into matrix above.
pod-lib-lint-xc16:
# 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'

strategy:
matrix:
podspec: [FirebaseAuthInterop.podspec, FirebaseAuth.podspec]
# TODO: macos tests are blocked by https://github.com/erikdoe/ocmock/pull/532
target: [ios, tvos, macos --skip-tests, watchos]
os: [macos-14]
xcode: [Xcode_16]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
- name: Setup Bundler
run: scripts/setup_bundler.sh
- name: Configure test keychain
run: scripts/configure_test_keychain.sh
- name: Xcode
run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer
- uses: nick-fields/retry@v3
with:
timeout_minutes: 120
max_attempts: 3
retry_on: error
retry_wait_seconds: 120
command: scripts/pod_lib_lint.rb ${{ matrix.podspec }} --platforms=${{ matrix.target }} ${{ matrix.tests }} --allow-warnings

integration-tests:
# 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'
Expand Down Expand Up @@ -99,31 +122,43 @@ jobs:
retry_wait_seconds: 120
command: ([ -z $plist_secret ] || scripts/build.sh Auth iOS ${{ matrix.scheme }})

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: ${{ steps.generate_cache_key.outputs.cache_key }}

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]
strategy:
max-parallel: 1
matrix:
target: [iOS, tvOS, macOS, catalyst, watchOS]
os: [macos-13, macos-14]
include:
- os: macos-13
xcode: Xcode_15.2
test: spmbuildonly
- os: macos-14
xcode: Xcode_15.3
test: spmbuildonly
- os: macos-14
xcode: Xcode_15.3
target: visionOS
test: spm
target: [iOS spm, tvOS spm, macOS spmbuildonly, catalyst spm, watchOS spm]
os: [macos-14]
xcode: [Xcode_15.2, Xcode_16]
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 @@ -134,7 +169,7 @@ jobs:
max_attempts: 3
retry_on: error
retry_wait_seconds: 120
command: scripts/third_party/travis/retry.sh ./scripts/build.sh AuthUnit ${{ matrix.target }} ${{ matrix.test }}
command: scripts/third_party/travis/retry.sh ./scripts/build.sh AuthUnit ${{ matrix.target }}

catalyst:
# Don't run on private repo unless it is a PR.
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/vertexai.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,9 @@ jobs:
spm-unit:
strategy:
matrix:
target: [iOS, macOS, catalyst, tvOS, visionOS, watchOS]
target: [iOS, tvOS, macOS, catalyst, watchOS]
os: [macos-14]
include:
- os: macos-14
xcode: Xcode_15.2
xcode: [Xcode_15.2, Xcode_16]
runs-on: ${{ matrix.os }}
needs: spm-package-resolved
env:
Expand Down
4 changes: 3 additions & 1 deletion FirebaseAuth.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,13 @@ supports email and password accounts, as well as several 3rd party authenticatio
'FirebaseAuth/README.md',
'FirebaseAuth/CHANGELOG.md'
]
# TODO(#13704) Restore warnings-as-errors checking.
# 'OTHER_SWIFT_FLAGS' => "$(inherited) #{ENV.key?('FIREBASE_CI') ? '-D FIREBASE_CI -warnings-as-errors' : ''}"
s.pod_target_xcconfig = {
'GCC_C_LANGUAGE_STANDARD' => 'c99',
# The second path is to find FirebaseAuth-Swift.h from a pod gen project
'HEADER_SEARCH_PATHS' => '"${PODS_TARGET_SRCROOT}" "${OBJECT_FILE_DIR_normal}/${NATIVE_ARCH_ACTUAL}"',
'OTHER_SWIFT_FLAGS' => "$(inherited) #{ENV.key?('FIREBASE_CI') ? '-D FIREBASE_CI -warnings-as-errors' : ''}"
'OTHER_SWIFT_FLAGS' => "$(inherited) #{ENV.key?('FIREBASE_CI') ? '-D FIREBASE_CI' : ''}"
}
s.framework = 'Security'
s.ios.framework = 'SafariServices'
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