Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
5bfc8a6
[Infra] Common cocoapods pod lib lint job
ncooke3 May 20, 2025
e552608
tmp disable
ncooke3 May 20, 2025
a86fed3
fix debug approach
ncooke3 May 21, 2025
25183fd
fix?
ncooke3 May 21, 2025
8012322
debug
ncooke3 May 21, 2025
5ed9382
fix?
ncooke3 May 21, 2025
8ba29f0
fix?
ncooke3 May 21, 2025
eef376d
fix?
ncooke3 May 21, 2025
9555ece
i
ncooke3 May 21, 2025
b413c54
gotcha
ncooke3 May 21, 2025
5b98f52
more
ncooke3 May 21, 2025
8c8e3cb
t
ncooke3 May 21, 2025
6ec836c
t
ncooke3 May 21, 2025
6d6512e
try again
ncooke3 May 21, 2025
305ac97
more
ncooke3 May 21, 2025
3a89fde
more progress
ncooke3 May 21, 2025
c788326
remove trailing space
ncooke3 May 21, 2025
ca431c2
add warnings support
ncooke3 May 21, 2025
6b38aa2
functions and swift 6 support
ncooke3 May 21, 2025
265b4af
check
ncooke3 May 21, 2025
eeaf85c
fix cron dep
ncooke3 May 21, 2025
e9f3e54
more refactors
ncooke3 May 21, 2025
f724cda
remove blank space
ncooke3 May 21, 2025
35a5032
more
ncooke3 May 21, 2025
3896c01
more
ncooke3 May 21, 2025
9ec01fe
ss-permissions
ncooke3 May 21, 2025
fe6b030
more work:
ncooke3 May 21, 2025
609eb43
fixes
ncooke3 May 21, 2025
a9df005
Fix CI
ncooke3 May 22, 2025
139cc5f
whitespace
ncooke3 May 22, 2025
50731d5
App distro fix
ncooke3 May 22, 2025
8417b85
fix auth by setting env var in reusable workflow
ncooke3 May 22, 2025
051f40f
fix fiam with specific platforms
ncooke3 May 22, 2025
1d5a2aa
Fix messaging some
ncooke3 May 22, 2025
03f95b0
fix fdl, fai
ncooke3 May 22, 2025
da3b7d2
fixes and more migrations
ncooke3 May 22, 2025
886bcfc
Merge branch 'main' into nc/ci-improve
ncooke3 May 27, 2025
1bc9621
Fix re-usable workflow's output
ncooke3 May 27, 2025
35bbc84
set env var in a different way
ncooke3 May 27, 2025
366d56d
Update .github/workflows/common_cocoapods.yml
ncooke3 May 27, 2025
efb3aae
Restore storage for now
ncooke3 May 27, 2025
cab259f
Update remoteconfig.yml
ncooke3 May 28, 2025
6ecc3c1
Apply suggestions from code review
ncooke3 May 28, 2025
bfc6500
Update common_cocoapods.yml
ncooke3 May 28, 2025
9df8de6
Disable rtdb int tests
ncooke3 May 28, 2025
1965146
Update .github/workflows/firebase_app_check.yml
ncooke3 May 28, 2025
fda6eeb
Update .github/workflows/inappmessaging.yml
ncooke3 May 28, 2025
306907d
Update .github/workflows/messaging.yml
ncooke3 May 28, 2025
e376673
Update database.yml
ncooke3 May 28, 2025
76d91c3
Update common_cocoapods.yml
ncooke3 May 28, 2025
cb4d88a
Update common_cocoapods.yml
ncooke3 May 28, 2025
429e1c6
Update abtesting.yml
ncooke3 May 28, 2025
de5ef72
Update appdistribution.yml
ncooke3 May 28, 2025
6930fc3
Add read permissions to all touched workflows
ncooke3 May 28, 2025
be4214c
rename arg
ncooke3 May 28, 2025
eaaa045
Apply suggestions from code review
ncooke3 May 28, 2025
6932da3
[attempt] run tests on macos for firebasecore
ncooke3 May 28, 2025
150d148
Update .github/workflows/core.yml
ncooke3 May 28, 2025
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
48 changes: 10 additions & 38 deletions .github/workflows/abtesting.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
name: abtesting

permissions:
contents: read

on:
workflow_dispatch:
pull_request:
paths:
- 'FirebaseABTesting**'
- 'Interop/Analytics/Public/*.h'
- '.github/workflows/abtesting.yml'
- '.github/workflows/common.yml'
- '.github/workflows/common_cocoapods.yml'
- 'Gemfile*'
schedule:
# Run every day at 1am(PST) - cron uses UTC times
Expand All @@ -28,43 +33,10 @@ jobs:
product: FirebaseABTesting
target: FirebaseABTesting-Unit-unit

pod-lib-lint:
# 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:
include:
- os: macos-14
xcode: Xcode_16.2
target: ios
- os: macos-15
xcode: Xcode_16.2
target: ios
- os: macos-15
xcode: Xcode_16.2
target: tvos
- os: macos-15
xcode: Xcode_16.2
target: macos
- os: macos-15
xcode: Xcode_16.2
target: watchos
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1
- name: Setup Bundler
run: scripts/setup_bundler.sh
- name: Xcode
run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer
- uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3
with:
timeout_minutes: 120
max_attempts: 3
retry_on: error
retry_wait_seconds: 120
command: scripts/pod_lib_lint.rb FirebaseABTesting.podspec --platforms=${{ matrix.target }}
pod_lib_lint:
uses: ./.github/workflows/common_cocoapods.yml
with:
product: FirebaseABTesting

quickstart:
# Don't run on private repo unless it is a PR.
Expand Down Expand Up @@ -136,7 +108,7 @@ jobs:
flags: [
'--use-static-frameworks'
]
needs: pod-lib-lint
needs: pod_lib_lint
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1
Expand Down
35 changes: 11 additions & 24 deletions .github/workflows/appdistribution.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
name: appdistribution

permissions:
contents: read

on:
workflow_dispatch:
pull_request:
paths:
- 'FirebaseAppDistribution**'
- '.github/workflows/appdistribution.yml'
- '.github/workflows/common.yml'
- '.github/workflows/common_cocoapods.yml'
- 'Gemfile*'
schedule:
# Run every day at 1am (PST) - cron uses UTC times
Expand All @@ -28,29 +33,11 @@ jobs:
product: FirebaseAppDistribution
target: FirebaseAppDistribution-Unit-unit

pod-lib-lint:
# 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:
include:
- os: macos-14
xcode: Xcode_16.2
- os: macos-15
xcode: Xcode_16.3
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1
- name: Setup Bundler
run: scripts/setup_bundler.sh
- name: Xcode
run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer
- name: Build and test
run: |
scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseAppDistribution.podspec \
--platforms=ios
pod_lib_lint:
uses: ./.github/workflows/common_cocoapods.yml
with:
product: FirebaseAppDistribution
platforms: iOS # App Distro only supports iOS.

appdistribution-cron-only:
if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
Expand All @@ -62,7 +49,7 @@ jobs:
flags: [
'--use-static-frameworks'
]
needs: pod-lib-lint
needs: pod_lib_lint
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1
Expand Down
38 changes: 12 additions & 26 deletions .github/workflows/auth.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
name: auth

permissions:
contents: read

on:
workflow_dispatch:
pull_request:
paths:
- 'FirebaseAuth**'
- 'FirebaseAuth/Interop/*.h'
- '.github/workflows/auth.yml'
- '.github/workflows/common.yml'
- '.github/workflows/common_cocoapods.yml'
- 'scripts/gha-encrypted/AuthSample/SwiftApplication.plist.gpg'
- 'Gemfile*'
schedule:
Expand Down Expand Up @@ -34,33 +39,14 @@ jobs:
target: FirebaseAuth-Unit-unit
buildonly: true

pod-lib-lint:
# 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'

pod_lib_lint:
strategy:
matrix:
podspec: [FirebaseAuthInterop.podspec, FirebaseAuth.podspec]
target: [ios, tvos, macos --skip-tests, watchos]
os: [macos-15]
xcode: [Xcode_16.3]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # 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@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # 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 }}
product: [FirebaseAuthInterop, FirebaseAuth]
uses: ./.github/workflows/common_cocoapods.yml
with:
product: ${{ matrix.product }}
buildonly_platforms: macOS

spm-package-resolved:
env:
Expand Down Expand Up @@ -190,7 +176,7 @@ jobs:
flags: [
'--use-static-frameworks'
]
needs: pod-lib-lint
needs: pod_lib_lint
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1
Expand Down
22 changes: 20 additions & 2 deletions .github/workflows/common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,22 @@ on:
required: false
default: ""

# A command to execute before testing.
#
# This is useful for additional set up, like starting an emulator or
# downloading test data.
#
# Example: `FirebaseFunctions/Backend/start.sh synchronous`
setup_command:
type: string
required: false
default: ""

outputs:
cache_key:
description: "The cache key for the Swift package resolution."
value: ${{ jobs.spm-package-resolved.outputs.cache_key }}

jobs:
spm-package-resolved:
env:
Expand All @@ -54,8 +70,7 @@ jobs:
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
run: swift package resolve
- name: Generate cache key
id: generate_cache_key
run: |
Expand Down Expand Up @@ -92,6 +107,9 @@ jobs:
- name: Install visionOS, if needed.
if: matrix.platform == 'visionOS'
run: xcodebuild -downloadPlatform visionOS
- name: Run setup command, if needed.
if: inputs.setup_command != ''
run: ${{ inputs.setup_command }}
- name: Initialize xcodebuild
run: scripts/setup_spm_tests.sh
- uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3
Expand Down
116 changes: 116 additions & 0 deletions .github/workflows/common_cocoapods.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
name: common_cocoapods

permissions:
contents: read

on:
workflow_call:
inputs:
# The product to test be tested (e.g. `FirebaseABTesting`).
product:
type: string
required: true

# The platforms to build on. Defaults to all.
# To target specific platforms, pass a comma or space separated string of
# platforms.
#
# Examples:
# - build/test only for macOS: `macOS`
# - build/test only for macOS and tvOS: `macOS, tvOS`
platforms:
type: string
required: false
default: "iOS, tvOS, macOS, watchOS"

# By default, all platforms will be tested (see matrix in `spm` job).
# To build instead of test, pass a comma or space separated string of
# platforms.
#
# Platform options: [iOS, tvOS, macOS, watchOS, catalyst, visionOS]
#
# Note: Build-only platforms must be represented in the `platforms` input
# (which defaults to all platforms) in order to take effect.
#
# Examples:
# - build only for macOS: `macOS`
# - build only for macOS and tvOS: `macOS, tvOS`
# - build only for all platforms: `all`
buildonly_platforms:
type: string
required: false
default: ""

# Whether to lint with `--allow-warnings`. Defaults to false.
allow_warnings:
type: boolean
required: false
default: false

# Whether to additionally build with Swift 6. Defaults to false.
supports_swift6:
type: boolean
required: false
default: false

# A comma separated (no spaces) string that will be passed to
# pod lib lint's `--test-specs=` argument. By default, all
# test specs will be tested.
test_specs:
type: string
required: false
default: ""

# A command to execute before testing.
#
# This is useful for additional set up, like starting an emulator or
# downloading test data.
#
# Example: `FirebaseFunctions/Backend/start.sh synchronous`
setup_command:
type: string
required: false
default: ""

jobs:
pod-lib-lint:
# Run on the main repo's scheduled jobs or pull requests and manual workflow invocations.
if: (github.repository == 'firebase/firebase-ios-sdk' && github.event_name == 'schedule') || contains(fromJSON('["pull_request", "workflow_dispatch"]'), github.event_name)
strategy:
matrix:
os: [macos-15]
xcode: [Xcode_16.3]
platform: [iOS, tvOS, macOS, watchOS]
include:
- os: macos-14
xcode: Xcode_16.2
platform: iOS
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1
- name: Setup Bundler
run: scripts/setup_bundler.sh
- name: Xcode
run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer
- name: Set conditional environment variable, if needed.
if: inputs.product == 'FirebaseAuth'
run: echo "FIREBASE_CI=true" >> $GITHUB_ENV
- name: Set podspec Swift version to 6.0, if supported.
if: inputs.supports_swift6 == true && matrix.os != 'macos-14'
run: sed -i "" "s/s.swift_version[[:space:]]*=[[:space:]]*'5.9'/s.swift_version = '6.0'/" ${{ inputs.product }}.podspec
- name: Run setup command, if needed.
if: inputs.setup_command != ''
run: ${{ inputs.setup_command }}
- uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3
if: contains(join(inputs.platforms), matrix.platform) || matrix.os == 'macos-14'
with:
timeout_minutes: 120
max_attempts: 3
retry_on: error
retry_wait_seconds: 120
command: |
scripts/pod_lib_lint.rb ${{ inputs.product }}.podspec --platforms=${{ matrix.platform }} \
${{ inputs.allow_warnings == true && '--allow-warnings' || '' }} \
${{ inputs.test_specs != '' && format('--test-specs={0}', inputs.test_specs) || '' }} \
${{ (contains(inputs.buildonly_platforms, matrix.platform) || contains(inputs.buildonly_platforms, 'all')) && '--skip-tests' || '' }}
Loading
Loading