|
1 | 1 | name: auth
|
2 | 2 |
|
| 3 | +permissions: |
| 4 | + contents: read |
| 5 | + |
3 | 6 | on:
|
4 | 7 | workflow_dispatch:
|
5 | 8 | pull_request:
|
6 | 9 | paths:
|
7 | 10 | - 'FirebaseAuth**'
|
8 | 11 | - 'FirebaseAuth/Interop/*.h'
|
9 | 12 | - '.github/workflows/auth.yml'
|
| 13 | + - '.github/workflows/common.yml' |
| 14 | + - '.github/workflows/common_cocoapods.yml' |
| 15 | + - '.github/workflows/common_catalyst.yml' |
10 | 16 | - 'scripts/gha-encrypted/AuthSample/SwiftApplication.plist.gpg'
|
11 | 17 | - 'Gemfile*'
|
12 | 18 | schedule:
|
@@ -34,63 +40,19 @@ jobs:
|
34 | 40 | target: FirebaseAuth-Unit-unit
|
35 | 41 | buildonly: true
|
36 | 42 |
|
37 |
| - pod-lib-lint: |
38 |
| - # Don't run on private repo unless it is a PR. |
39 |
| - if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request' |
40 |
| - |
| 43 | + pod_lib_lint: |
41 | 44 | strategy:
|
42 | 45 | matrix:
|
43 |
| - podspec: [FirebaseAuthInterop.podspec, FirebaseAuth.podspec] |
44 |
| - target: [ios, tvos, macos --skip-tests, watchos] |
45 |
| - os: [macos-15] |
46 |
| - xcode: [Xcode_16.3] |
47 |
| - runs-on: ${{ matrix.os }} |
48 |
| - steps: |
49 |
| - - uses: actions/checkout@v4 |
50 |
| - - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1 |
51 |
| - - name: Setup Bundler |
52 |
| - run: scripts/setup_bundler.sh |
53 |
| - - name: Configure test keychain |
54 |
| - run: scripts/configure_test_keychain.sh |
55 |
| - - name: Xcode |
56 |
| - run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer |
57 |
| - - uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3 |
58 |
| - with: |
59 |
| - timeout_minutes: 120 |
60 |
| - max_attempts: 3 |
61 |
| - retry_on: error |
62 |
| - retry_wait_seconds: 120 |
63 |
| - command: scripts/pod_lib_lint.rb ${{ matrix.podspec }} --platforms=${{ matrix.target }} ${{ matrix.tests }} |
64 |
| - |
65 |
| - spm-package-resolved: |
66 |
| - env: |
67 |
| - FIREBASECI_USE_LATEST_GOOGLEAPPMEASUREMENT: 1 |
68 |
| - runs-on: macos-15 |
69 |
| - outputs: |
70 |
| - cache_key: ${{ steps.generate_cache_key.outputs.cache_key }} |
71 |
| - steps: |
72 |
| - - uses: actions/checkout@v4 |
73 |
| - - name: Xcode |
74 |
| - run: sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer |
75 |
| - - name: Generate Swift Package.resolved |
76 |
| - id: swift_package_resolve |
77 |
| - run: | |
78 |
| - swift package resolve |
79 |
| - - name: Generate cache key |
80 |
| - id: generate_cache_key |
81 |
| - run: | |
82 |
| - cache_key="${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }}" |
83 |
| - echo "cache_key=${cache_key}" >> "$GITHUB_OUTPUT" |
84 |
| - - uses: actions/cache/save@v4 |
85 |
| - id: cache |
86 |
| - with: |
87 |
| - path: .build |
88 |
| - key: ${{ steps.generate_cache_key.outputs.cache_key }} |
| 46 | + product: [FirebaseAuthInterop, FirebaseAuth] |
| 47 | + uses: ./.github/workflows/common_cocoapods.yml |
| 48 | + with: |
| 49 | + product: ${{ matrix.product }} |
| 50 | + buildonly_platforms: macOS |
89 | 51 |
|
90 | 52 | integration-tests:
|
91 | 53 | # Don't run on private repo unless it is a PR.
|
92 | 54 | if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
|
93 |
| - needs: [spm-package-resolved] |
| 55 | + needs: spm |
94 | 56 | strategy:
|
95 | 57 | matrix:
|
96 | 58 | scheme: [ObjCApiTests, SwiftApiTests, AuthenticationExampleUITests]
|
|
103 | 65 | - uses: actions/cache/restore@v4
|
104 | 66 | with:
|
105 | 67 | path: .build
|
106 |
| - key: ${{needs.spm-package-resolved.outputs.cache_key}} |
| 68 | + key: ${{ needs.spm.outputs.cache_key }} |
107 | 69 | - name: Install Secrets
|
108 | 70 | run: |
|
109 | 71 | scripts/decrypt_gha_secret.sh scripts/gha-encrypted/AuthCredentials.h.gpg \
|
|
121 | 83 | scripts/decrypt_gha_secret.sh scripts/gha-encrypted/AuthSample/Credentials.swift.gpg \
|
122 | 84 | FirebaseAuth/Tests/SampleSwift/SwiftApiTests/Credentials.swift "$plist_secret"
|
123 | 85 | - name: Xcode
|
124 |
| - run: sudo xcode-select -s /Applications/Xcode_16.3.app/Contents/Developer |
| 86 | + run: sudo xcode-select -s /Applications/Xcode_16.4.app/Contents/Developer |
125 | 87 | - uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3
|
126 | 88 | with:
|
127 | 89 | timeout_minutes: 120
|
@@ -190,7 +152,7 @@ jobs:
|
190 | 152 | flags: [
|
191 | 153 | '--use-static-frameworks'
|
192 | 154 | ]
|
193 |
| - needs: pod-lib-lint |
| 155 | + needs: pod_lib_lint |
194 | 156 | steps:
|
195 | 157 | - uses: actions/checkout@v4
|
196 | 158 | - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1
|
|
0 commit comments