Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
103 changes: 9 additions & 94 deletions .github/workflows/functions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,105 +35,20 @@ jobs:
supports_swift6: true
setup_command: FirebaseFunctions/Backend/start.sh synchronous

spm-package-resolved:
runs-on: macos-14
env:
FIREBASECI_USE_LATEST_GOOGLEAPPMEASUREMENT: 1
outputs:
cache_key: ${{ steps.generate_cache_key.outputs.cache_key }}
steps:
- uses: actions/checkout@v4
- name: Xcode
run: sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer
- 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-integration:
# 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]
uses: ./.github/workflows/common.yml
strategy:
matrix:
os: [macos-15]
xcode: [Xcode_16.3]
runs-on: ${{ matrix.os }}
env:
FIREBASECI_USE_LATEST_GOOGLEAPPMEASUREMENT: 1
steps:
- uses: actions/checkout@v4
- uses: actions/cache/restore@v4
with:
path: .build
key: ${{needs.spm-package-resolved.outputs.cache_key}}
- name: Initialize xcodebuild
run: scripts/setup_spm_tests.sh
- name: Integration Test Server
run: FirebaseFunctions/Backend/start.sh synchronous
- name: Xcode
run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer
- name: iOS Swift Integration Tests (including Swift library)
run: scripts/third_party/travis/retry.sh ./scripts/build.sh FirebaseFunctionsIntegration iOS spm
- name: iOS ObjC Integration Tests (using Swift library)
run: scripts/third_party/travis/retry.sh ./scripts/build.sh FirebaseFunctionsObjCIntegration iOS spm
- name: Combine Unit Tests
run: scripts/third_party/travis/retry.sh ./scripts/build.sh FunctionsCombineUnit iOS spm
target: [FirebaseFunctionsIntegration, FirebaseFunctionsObjCIntegration, FunctionsCombineUnit]
with:
target: ${{ matrix.target }}
platforms: iOS
setup_command: FirebaseFunctions/Backend/start.sh synchronous

spm-unit:
# Don't run on private repo.
if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
needs: [spm-package-resolved]
strategy:
matrix:
include:
- os: macos-14
xcode: Xcode_16.2
target: iOS
- os: macos-15
xcode: Xcode_16.3
target: iOS
- os: macos-15
xcode: Xcode_16.3
target: tvOS
- os: macos-15
xcode: Xcode_16.3
target: macOS
- os: macos-15
xcode: Xcode_16.3
target: watchOS
- os: macos-15
xcode: Xcode_16.3
target: catalyst
- os: macos-15
xcode: Xcode_16.3
target: visionOS
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: actions/cache/restore@v4
with:
path: .build
key: ${{needs.spm-package-resolved.outputs.cache_key}}
- name: Xcode
run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer
- name: Install visionOS, if needed.
if: matrix.target == 'visionOS'
run: xcodebuild -downloadPlatform visionOS
- name: Initialize xcodebuild
run: scripts/setup_spm_tests.sh
- name: Unit Tests
run: scripts/third_party/travis/retry.sh ./scripts/build.sh FirebaseFunctionsUnit ${{ matrix.target }} spm
uses: ./.github/workflows/common.yml
with:
target: FirebaseFunctionsUnit

# TODO: Move to macos-14 and Xcode 15. The legacy quickstart uses material which doesn't build on Xcode 15.
# quickstart:
Expand Down
Loading