Skip to content

[Infra] Common cocoapods pod lib lint job #14876

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

Draft
wants to merge 36 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
36 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
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
227 changes: 98 additions & 129 deletions .github/workflows/abtesting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
- '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 @@ -17,134 +19,101 @@
cancel-in-progress: true

jobs:
spm:
uses: ./.github/workflows/common.yml
with:
target: ABTestingUnit

catalyst:
uses: ./.github/workflows/common_catalyst.yml
# spm:
# uses: ./.github/workflows/common.yml
# with:
# target: ABTestingUnit
#
# catalyst:
# uses: ./.github/workflows/common_catalyst.yml
# with:
# product: FirebaseABTesting
# target: FirebaseABTesting-Unit-unit
#
pod-lib-lint:
uses: ./.github/workflows/common_cocoapods.yml
with:
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 }}

quickstart:
# 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'

env:
plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
runs-on: macos-15
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1
- name: Xcode
run: sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer
- name: Setup quickstart
env:
LEGACY: true
run: scripts/setup_quickstart.sh abtesting
- name: Install Secret GoogleService-Info.plist
run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-abtesting.plist.gpg \
quickstart-ios/abtesting/GoogleService-Info.plist "$plist_secret"
- name: Test swift quickstart
env:
LEGACY: true
run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart.sh ABTesting true)

quickstart-ftl-cron-only:
# Don't run on private repo.
if: github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule'

env:
plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
runs-on: macos-15
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Setup quickstart
env:
LEGACY: true
run: scripts/setup_quickstart.sh abtesting
- name: Install Secret GoogleService-Info.plist
run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-abtesting.plist.gpg \
quickstart-ios/abtesting/GoogleService-Info.plist "$plist_secret"
- name: Xcode
run: sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer
- name: Build swift quickstart
env:
LEGACY: true
run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_ftl.sh ABTesting)
- id: ftl_test
uses: FirebaseExtended/github-actions/firebase-test-lab@v1.4
with:
credentials_json: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_CREDENTIALS }}
testapp_dir: quickstart-ios/build-for-testing
test_type: "xctest"

abtesting-cron-only:
# Don't run on private repo.
if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'

runs-on: macos-15
strategy:
matrix:
target: [ios, tvos, macos]
flags: [
'--use-static-frameworks'
]
needs: pod-lib-lint
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/Xcode_16.2.app/Contents/Developer
- name: PodLibLint ABTesting Cron
run: |
scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb \
FirebaseABTesting.podspec --platforms=${{ matrix.target }} ${{ matrix.flags }}
#
# quickstart:
# # 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'
#
# env:
# plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
# signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
# runs-on: macos-15
# steps:
# - uses: actions/checkout@v4
# - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1
# - name: Xcode
# run: sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer
# - name: Setup quickstart
# env:
# LEGACY: true
# run: scripts/setup_quickstart.sh abtesting
# - name: Install Secret GoogleService-Info.plist
# run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-abtesting.plist.gpg \
# quickstart-ios/abtesting/GoogleService-Info.plist "$plist_secret"
# - name: Test swift quickstart
# env:
# LEGACY: true
# run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart.sh ABTesting true)
#
# quickstart-ftl-cron-only:
# # Don't run on private repo.
# if: github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule'
#
# env:
# plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
# signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
# runs-on: macos-15
# steps:
# - uses: actions/checkout@v4
# - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1
# - uses: actions/setup-python@v5
# with:
# python-version: '3.11'
# - name: Setup quickstart
# env:
# LEGACY: true
# run: scripts/setup_quickstart.sh abtesting
# - name: Install Secret GoogleService-Info.plist
# run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-abtesting.plist.gpg \
# quickstart-ios/abtesting/GoogleService-Info.plist "$plist_secret"
# - name: Xcode
# run: sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer
# - name: Build swift quickstart
# env:
# LEGACY: true
# run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_ftl.sh ABTesting)
# - id: ftl_test
# uses: FirebaseExtended/github-actions/firebase-test-lab@v1.4
# with:
# credentials_json: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_CREDENTIALS }}
# testapp_dir: quickstart-ios/build-for-testing
# test_type: "xctest"
#
# abtesting-cron-only:
# # Don't run on private repo.
# if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
#
# runs-on: macos-15
# strategy:
# matrix:
# target: [ios, tvos, macos]
# flags: [
# '--use-static-frameworks'
# ]
# needs: pod-lib-lint
# 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/Xcode_16.2.app/Contents/Developer
# - name: PodLibLint ABTesting Cron
# run: |
# scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb \
# FirebaseABTesting.podspec --platforms=${{ matrix.target }} ${{ matrix.flags }}
72 changes: 72 additions & 0 deletions .github/workflows/common_cocoapods.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
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, catalyst, visionOS"

// # 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: ""

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
- 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 }}
Loading