@@ -15,20 +15,47 @@ concurrency:
15
15
cancel-in-progress : true
16
16
17
17
jobs :
18
+ spm-package-resolved :
19
+ runs-on : macos-14
20
+ outputs :
21
+ cache_key : ${{ steps.generate_cache_key.outputs.cache_key }}
22
+ env :
23
+ FIREBASECI_USE_LATEST_GOOGLEAPPMEASUREMENT : 1
24
+ steps :
25
+ - uses : actions/checkout@v4
26
+ - name : Generate Swift Package.resolved
27
+ id : swift_package_resolve
28
+ run : |
29
+ swift package resolve
30
+ - name : Generate cache key
31
+ id : generate_cache_key
32
+ run : |
33
+ cache_key="${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }}"
34
+ echo "cache_key=${cache_key}" >> "$GITHUB_OUTPUT"
35
+ - uses : actions/cache/save@v4
36
+ id : cache
37
+ with :
38
+ path : .build
39
+ key : ${{ steps.generate_cache_key.outputs.cache_key }}
40
+
18
41
spm-unit :
19
42
strategy :
20
- max-parallel : 1
21
43
matrix :
22
44
target : [iOS, macOS, catalyst, tvOS, visionOS, watchOS]
23
45
os : [macos-14]
24
46
include :
25
47
- os : macos-14
26
48
xcode : Xcode_15.2
27
49
runs-on : ${{ matrix.os }}
50
+ needs : spm-package-resolved
28
51
env :
29
52
FIREBASECI_USE_LATEST_GOOGLEAPPMEASUREMENT : 1
30
53
steps :
31
54
- uses : actions/checkout@v4
55
+ - uses : actions/cache/restore@v4
56
+ with :
57
+ path : .build
58
+ key : ${{needs.spm-package-resolved.outputs.cache_key}}
32
59
- name : Clone mock responses
33
60
run : scripts/update_vertexai_responses.sh
34
61
- name : Xcode
@@ -45,20 +72,24 @@ jobs:
45
72
46
73
spm-integration :
47
74
strategy :
48
- max-parallel : 1
49
75
matrix :
50
76
target : [iOS]
51
77
os : [macos-14]
52
78
include :
53
79
- os : macos-14
54
80
xcode : Xcode_15.2
55
81
runs-on : ${{ matrix.os }}
82
+ needs : spm-package-resolved
56
83
env :
57
84
TEST_RUNNER_VertexAIRunIntegrationTests : 1
58
85
FIREBASECI_USE_LATEST_GOOGLEAPPMEASUREMENT : 1
59
86
plist_secret : ${{ secrets.GHASecretsGPGPassphrase1 }}
60
87
steps :
61
88
- uses : actions/checkout@v4
89
+ - uses : actions/cache/restore@v4
90
+ with :
91
+ path : .build
92
+ key : ${{needs.spm-package-resolved.outputs.cache_key}}
62
93
- name : Install Secret GoogleService-Info.plist
63
94
run : scripts/decrypt_gha_secret.sh scripts/gha-encrypted/vertexai-integration.plist.gpg \
64
95
FirebaseVertexAI/Tests/Integration/Resources/GoogleService-Info.plist "$plist_secret"
@@ -108,14 +139,17 @@ jobs:
108
139
- os : macos-14
109
140
xcode : Xcode_15.2
110
141
runs-on : ${{ matrix.os }}
142
+ needs : spm-package-resolved
111
143
env :
112
144
FIREBASECI_USE_LATEST_GOOGLEAPPMEASUREMENT : 1
113
145
steps :
114
146
- uses : actions/checkout@v4
147
+ - uses : actions/cache/restore@v4
148
+ with :
149
+ path : .build
150
+ key : ${{needs.spm-package-resolved.outputs.cache_key}}
115
151
- name : Xcode
116
152
run : sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer
117
- - name : Initialize xcodebuild
118
- run : xcodebuild -list
119
153
- name : Placeholder GoogleService-Info.plist for build testing
120
154
run : cp FirebaseCore/Tests/Unit/Resources/GoogleService-Info.plist FirebaseVertexAI/Sample/
121
155
- uses : nick-fields/retry@v3
0 commit comments