-
Notifications
You must be signed in to change notification settings - Fork 1.7k
91 lines (81 loc) · 2.52 KB
/
common_cocoapods_cron.yml
File metadata and controls
91 lines (81 loc) · 2.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
name: common_cocoapods_cron
permissions:
contents: read
on:
workflow_call:
secrets:
plist_secret:
required: false
inputs:
# The product to test be tested (e.g. `FirebaseABTesting`).
product:
type: string
required: true
# JSON array of platforms to test against (e.g. `[ "ios", "tvos" ]`).
platforms:
type: string
required: true
# JSON array of flags to pass to pod lib lint. Each string in the array
# will create a separate matrix entry.
# e.g. `[ "--use-static-frameworks" ]`.
# To run with no flags, pass `[ "" ]`.
flags:
type: string
required: false
default: '[""]'
# A command to execute before testing.
setup_command:
type: string
required: false
default: ""
# The version of Xcode to use.
xcode:
type: string
required: false
default: "Xcode_16.4"
# The runner to use.
runs_on:
type: string
required: false
default: "macos-15"
# Whether to ignore deprecation warnings by setting FIREBASE_CI.
ignore_deprecation_warnings:
type: boolean
required: false
default: false
jobs:
cron-job:
if: |
github.repository == 'firebase/firebase-ios-sdk' &&
(github.event_name == 'schedule' || github.event_name == 'workflow_dispatch')
runs-on: ${{ inputs.runs_on }}
strategy:
matrix:
platform: ${{ fromJson(inputs.platforms) }}
flags: ${{ fromJson(inputs.flags) }}
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/${{ inputs.xcode }}.app/Contents/Developer
- name: Set FIREBASE_CI, if needed.
if: inputs.ignore_deprecation_warnings == true
run: echo "FIREBASE_CI=true" >> $GITHUB_ENV
- name: Run setup command, if needed.
if: inputs.setup_command != ''
env:
plist_secret: ${{ secrets.plist_secret }}
run: ${{ inputs.setup_command }}
- name: PodLibLint Cron
uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3
with:
timeout_minutes: 15
max_attempts: 3
retry_wait_seconds: 120
command: |
scripts/pod_lib_lint.rb \
${{ inputs.product }}.podspec \
--platforms=${{ matrix.platform }} \
${{ matrix.flags }}