Skip to content

Commit fd79679

Browse files
authored
Migrate ABT to GHA (#5694)
1 parent 24fc333 commit fd79679

File tree

3 files changed

+47
-28
lines changed

3 files changed

+47
-28
lines changed

.github/workflows/abtesting.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,29 @@ on:
1414
- cron: '0 7 * * *'
1515

1616
jobs:
17+
pod-lib-lint:
18+
runs-on: macOS-latest
19+
strategy:
20+
matrix:
21+
target: [ios, tvos, macos]
22+
steps:
23+
- uses: actions/checkout@v2
24+
- name: Setup Bundler
25+
run: scripts/setup_bundler.sh
26+
- name: Build and test
27+
run: |
28+
scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseABTesting.podspec \
29+
--platforms=${{ matrix.target }}
30+
31+
catalyst:
32+
runs-on: macOS-latest
33+
steps:
34+
- uses: actions/checkout@v2
35+
- name: Setup Bundler
36+
run: scripts/setup_bundler.sh
37+
- name: Setup project and Build for Catalyst
38+
# Only build the unit tests on Catalyst. Test stopped working when GHA moved to Xcode 11.4.1.
39+
run: scripts/test_catalyst.sh FirebaseABTesting build FirebaseABTesting-Unit-unit
1740

1841
quickstart:
1942
env:
@@ -33,3 +56,22 @@ jobs:
3356
- name: Test swift quickstart
3457
run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart.sh ABTesting)
3558

59+
abtesting-cron-only:
60+
runs-on: macos-latest
61+
if: github.event_name == 'schedule'
62+
strategy:
63+
matrix:
64+
target: [ios, tvos, macos]
65+
flags: [
66+
'--use-modular-headers',
67+
'--use-libraries'
68+
]
69+
needs: pod-lib-lint
70+
steps:
71+
- uses: actions/checkout@v2
72+
- name: Setup Bundler
73+
run: scripts/setup_bundler.sh
74+
- name: PodLibLint ABTesting Cron
75+
run: |
76+
scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb \
77+
FirebaseABTesting.podspec --platforms=${{ matrix.target }} ${{ matrix.flags }}

.github/workflows/installations.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,8 @@ jobs:
9595
run: echo "::set-output name=val::$([[ -z $plist_secret ]] && echo "0" || echo "1")"
9696
- name: PodLibLint Installations Cron
9797
run: |
98-
export FIS_INTEGRATION_TESTS_REQUIRED=${{ steps.secrets.outputs.val }}
99-
export FIS_ALLOWS_INCOMPATIBLE_IID_VERSION="1"
100-
FIR_IID_INTEGRATION_TESTS_REQUIRED="$plist_secret" scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb \
101-
FirebaseInstallations.podspec --platforms=${{ matrix.target }} ${{ matrix.flags }} \
102-
--ignore-local-podspecs=FirebaseInstanceID.podspec
98+
export FIS_INTEGRATION_TESTS_REQUIRED=${{ steps.secrets.outputs.val }}
99+
export FIS_ALLOWS_INCOMPATIBLE_IID_VERSION="1"
100+
scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseInstallations.podspec \
101+
--platforms=${{ matrix.target }} ${{ matrix.flags }} \
102+
--ignore-local-podspecs=FirebaseInstanceID.podspec

.travis.yml

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -44,36 +44,13 @@ jobs:
4444
- travis_retry ./scripts/pod_lib_lint.rb FirebaseCoreDiagnostics.podspec --platforms=tvos --use-modular-headers
4545
- travis_retry ./scripts/pod_lib_lint.rb FirebaseCoreDiagnostics.podspec --platforms=macos --use-modular-headers
4646

47-
- stage: test
48-
env:
49-
- PROJECT=ABTesting METHOD=pod-lib-lint
50-
before_install:
51-
- ./scripts/if_changed.sh ./scripts/install_prereqs.sh
52-
script:
53-
- travis_retry ./scripts/if_changed.sh ./scripts/pod_lib_lint.rb FirebaseABTesting.podspec --platforms=ios
54-
- travis_retry ./scripts/if_changed.sh ./scripts/pod_lib_lint.rb FirebaseABTesting.podspec --platforms=tvos
55-
- travis_retry ./scripts/if_changed.sh ./scripts/pod_lib_lint.rb FirebaseABTesting.podspec --platforms=macos
56-
5747
- stage: test
5848
osx_image: xcode10.3
5949
env:
6050
- PROJECT=ABTesting METHOD=pod-lib-lint
6151
script:
6252
- travis_retry ./scripts/if_changed.sh ./scripts/pod_lib_lint.rb FirebaseABTesting.podspec --platforms=ios
6353

64-
- stage: test
65-
if: type = cron
66-
env:
67-
- PROJECT=ABTestingCron METHOD=pod-lib-lint
68-
script:
69-
- travis_retry ./scripts/pod_lib_lint.rb FirebaseABTesting.podspec --platforms=ios --use-libraries
70-
- travis_retry ./scripts/pod_lib_lint.rb FirebaseABTesting.podspec --platforms=tvos --use-libraries
71-
- travis_retry ./scripts/pod_lib_lint.rb FirebaseABTesting.podspec --platforms=macos --use-libraries
72-
- travis_retry ./scripts/pod_lib_lint.rb FirebaseABTesting.podspec --platforms=ios --use-modular-headers
73-
# One of the next two consistently hang on Travis. Commenting for now.
74-
# - travis_retry ./scripts/pod_lib_lint.rb FirebaseABTesting.podspec --platforms=tvos --use-modular-headers
75-
# - travis_retry ./scripts/pod_lib_lint.rb FirebaseABTesting.podspec --platforms=macos --use-modular-headers
76-
7754
- stage: test
7855
osx_image: xcode10.3
7956
env:

0 commit comments

Comments
 (0)