-
Notifications
You must be signed in to change notification settings - Fork 48
106 lines (96 loc) · 3.15 KB
/
google-utilities.yml
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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
name: google-utilities
on:
pull_request:
schedule:
# Run every day at 11pm (PST) - cron uses UTC times
- cron: '0 7 * * *'
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true
jobs:
changed_today:
runs-on: ubuntu-latest
name: Check if the repo was updated today
outputs:
WAS_CHANGED: ${{ steps.check_changed.outputs.WAS_CHANGED }}
steps:
- uses: actions/checkout@v4
- id: check_changed
name: Check
if: ${{ github.event_name == 'schedule' }}
run: echo '::set-output name=WAS_CHANGED::'$(test -n "$(git log --format=%H --since='24 hours ago')" && echo 'true' || echo 'false')
pod-lib-lint:
needs: changed_today
if: ${{ github.event_name == 'pull_request' || needs.changed_today.outputs.WAS_CHANGED == 'true' }}
runs-on: macOS-latest
strategy:
matrix:
target: [ios, tvos, macos]
steps:
- uses: ruby/setup-ruby@v1
with:
ruby-version: "2.7"
- uses: actions/checkout@v3
- name: Setup Scripts Directory
run: ./setup-scripts.sh
- name: Setup Bundler
run: scripts/setup_bundler.sh
- name: Build and test
run: |
scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb GoogleUtilities.podspec \
--platforms=${{ matrix.target }}
catalyst:
needs: changed_today
if: ${{ github.event_name == 'pull_request' || needs.changed_today.outputs.WAS_CHANGED == 'true' }}
runs-on: macOS-latest
steps:
- uses: ruby/setup-ruby@v1
with:
ruby-version: "2.7"
- uses: actions/checkout@v3
- name: Setup Scripts Directory
run: ./setup-scripts.sh
- name: Setup Bundler
run: scripts/setup_bundler.sh
- name: Setup project and Build for Catalyst
run: |
scripts/third_party/travis/retry.sh scripts/test_catalyst.sh GoogleUtilities test \
GoogleUtilities-Unit-unit
spm:
needs: changed_today
if: ${{ github.event_name == 'pull_request' || needs.changed_today.outputs.WAS_CHANGED == 'true' }}
runs-on: macOS-latest
strategy:
matrix:
target: [iOS, tvOS, macOS, catalyst]
steps:
- uses: actions/checkout@v3
- name: Setup Scripts Directory
run: ./setup-scripts.sh
- name: Initialize xcodebuild
run: xcodebuild -list
- name: iOS Unit Tests
run: scripts/third_party/travis/retry.sh scripts/build.sh GoogleUtilities-Package ${{ matrix.target }} spm
utilities-cocoapods-option-matrix:
needs: pod-lib-lint
runs-on: macos-latest
strategy:
matrix:
target: [ios, tvos, macos]
flags: [
'--use-static-frameworks',
'--use-libraries --skip-tests'
]
steps:
- uses: ruby/setup-ruby@v1
with:
ruby-version: "2.7"
- uses: actions/checkout@v3
- name: Setup Scripts Directory
run: ./setup-scripts.sh
- name: Setup Bundler
run: scripts/setup_bundler.sh
- name: PodLibLint GoogleUtilities Cron
run: |
scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb \
GoogleUtilities.podspec --platforms=${{ matrix.target }} ${{ matrix.flags }}