@@ -140,7 +140,21 @@ jobs:
140
140
bitness : 32
141
141
bin : ' '
142
142
steps :
143
+ - name : Determine whether this job should be skipped
144
+ shell : bash
145
+ run : |
146
+ for e in ${BUILD_ONLY:-pkg}
147
+ do
148
+ case $e in
149
+ *-${{matrix.arch.name}}) exit 0;; # build this artifact
150
+ *-arm64) test i686 != ${{matrix.arch.name}} || exit 0;; # pkg-i686 is required for the ARM64 version
151
+ *-*) ;; # not this build artifact, keep looking
152
+ *) exit 0;; # build this artifact
153
+ esac
154
+ done
155
+ echo "SKIP=true" >>$GITHUB_ENV
143
156
- name : Configure user
157
+ if : env.SKIP != 'true'
144
158
shell : bash
145
159
run :
146
160
USER_NAME="${{github.actor}}" &&
@@ -150,13 +164,14 @@ jobs:
150
164
git config --global user.email "$USER_EMAIL" &&
151
165
echo "PACKAGER=$USER_NAME <$USER_EMAIL>" >>$GITHUB_ENV
152
166
- name : Cache git-sdk-64-build-installers
167
+ if : env.SKIP != 'true'
153
168
id : cache-sdk-build-installers
154
169
uses : actions/cache@v2
155
170
with :
156
171
path : git-sdk-64-build-installers
157
172
key : build-installers-64-${{ needs.bundle-artifacts.outputs.latest-sdk64-extra-build-id }}
158
173
- name : Download git-sdk-64-build-installers
159
- if : steps.cache-sdk-build-installers.outputs.cache-hit != 'true'
174
+ if : env.SKIP != 'true' && steps.cache-sdk-build-installers.outputs.cache-hit != 'true'
160
175
shell : bash
161
176
run : |
162
177
# Use Git Bash to download and unpack the artifact
@@ -172,11 +187,13 @@ jobs:
172
187
## Unpack artifact
173
188
unzip artifacts.zip
174
189
- name : Download bundle-artifacts
190
+ if : env.SKIP != 'true'
175
191
uses : actions/download-artifact@v1
176
192
with :
177
193
name : bundle-artifacts
178
194
path : bundle-artifacts
179
195
- name : Clone and update build-extra
196
+ if : env.SKIP != 'true'
180
197
shell : bash
181
198
run : |
182
199
d=git-sdk-64-build-installers/usr/src/build-extra &&
@@ -189,6 +206,7 @@ jobs:
189
206
fi &&
190
207
git -C $d pull "$PWD"/bundle-artifacts/build-extra.bundle main
191
208
- name : Check out git/git
209
+ if : env.SKIP != 'true'
192
210
shell : bash
193
211
run : |
194
212
git -c init.defaultBranch=main init &&
@@ -199,7 +217,7 @@ jobs:
199
217
env :
200
218
CODESIGN_P12 : ${{secrets.CODESIGN_P12}}
201
219
CODESIGN_PASS : ${{secrets.CODESIGN_PASS}}
202
- if : env.CODESIGN_P12 != '' && env.CODESIGN_PASS != ''
220
+ if : env.SKIP != 'true' && env. CODESIGN_P12 != '' && env.CODESIGN_PASS != ''
203
221
shell : bash
204
222
run : |
205
223
cd home &&
@@ -208,7 +226,7 @@ jobs:
208
226
echo -n "$CODESIGN_PASS" >.sig/codesign.pass
209
227
git config --global alias.signtool '!sh "/usr/src/build-extra/signtool.sh"'
210
228
- name : Prepare home directory for GPG signing
211
- if : env.GPGKEY != ''
229
+ if : env.SKIP != 'true' && env. GPGKEY != ''
212
230
shell : bash
213
231
run : |
214
232
echo '${{secrets.PRIVGPGKEY}}' | tr % '\n' | gpg $GPG_OPTIONS --import &&
@@ -218,6 +236,7 @@ jobs:
218
236
env :
219
237
GPGKEY : ${{secrets.GPGKEY}}
220
238
- name : Build mingw-w64-${{matrix.arch.name}}-git
239
+ if : env.SKIP != 'true'
221
240
env :
222
241
GPGKEY : " ${{secrets.GPGKEY}}"
223
242
shell : powershell
@@ -247,10 +266,11 @@ jobs:
247
266
git bundle create \"`$b\"/MINGW-packages.bundle origin/main..main)
248
267
"@
249
268
- name : Clean up temporary files
250
- if : always()
269
+ if : always() && env.SKIP != 'true'
251
270
shell : bash
252
271
run : rm -rf home
253
272
- name : Publish mingw-w64-${{matrix.arch.name}}-git
273
+ if : env.SKIP != 'true'
254
274
uses : actions/upload-artifact@v1
255
275
with :
256
276
name : pkg-${{matrix.arch.name}}
@@ -259,7 +279,20 @@ jobs:
259
279
needs : bundle-artifacts
260
280
runs-on : windows-latest
261
281
steps :
282
+ - name : Determine whether this job should be skipped
283
+ shell : bash
284
+ run : |
285
+ for e in ${BUILD_ONLY:-pkg}
286
+ do
287
+ case $e in
288
+ *-arm64) exit 0;; # build this artifact
289
+ *-*) ;; # not this build artifact, keep looking
290
+ *) exit 0;; # build this artifact
291
+ esac
292
+ done
293
+ echo "SKIP=true" >>$GITHUB_ENV
262
294
- name : Configure user
295
+ if : env.SKIP != 'true'
263
296
shell : bash
264
297
run :
265
298
USER_NAME="${{github.actor}}" &&
@@ -268,34 +301,43 @@ jobs:
268
301
git config --global user.name "$USER_NAME" &&
269
302
git config --global user.email "$USER_EMAIL"
270
303
- uses : actions/checkout@v2
304
+ if : env.SKIP != 'true'
271
305
- name : initialize vcpkg
306
+ if : env.SKIP != 'true'
272
307
uses : actions/checkout@v2
273
308
with :
274
309
repository : ' microsoft/vcpkg'
275
310
path : ' compat/vcbuild/vcpkg'
276
311
- name : download vcpkg artifacts
312
+ if : env.SKIP != 'true'
277
313
uses : git-for-windows/get-azure-pipelines-artifact@v0
278
314
with :
279
315
repository : git/git
280
316
definitionId : 9
281
317
- name : add msbuild to PATH
318
+ if : env.SKIP != 'true'
282
319
uses : microsoft/setup-msbuild@v1
283
320
- name : copy dlls to root
321
+ if : env.SKIP != 'true'
284
322
shell : powershell
285
323
run : |
286
324
& compat\vcbuild\vcpkg_copy_dlls.bat release arm64-windows
287
325
if (!$?) { exit(1) }
288
326
- name : generate Visual Studio solution
327
+ if : env.SKIP != 'true'
289
328
shell : bash
290
329
run : |
291
330
cmake `pwd`/contrib/buildsystems/ -DCMAKE_PREFIX_PATH=`pwd`/compat/vcbuild/vcpkg/installed/arm64-windows \
292
331
-DNO_GETTEXT=YesPlease -DPERL_TESTS=OFF -DPYTHON_TESTS=OFF -DCURL_NO_CURL_CMAKE=ON -DCMAKE_GENERATOR_PLATFORM=arm64 -DVCPKG_ARCH=arm64-windows \
293
332
-DCMAKE_INSTALL_PREFIX="`pwd`/git-arm64" -DSKIP_DASHED_BUILT_INS=ON
294
333
- name : MSBuild
334
+ if : env.SKIP != 'true'
295
335
run : msbuild git.sln -property:Configuration=Release
296
336
- name : Link the Git executables
337
+ if : env.SKIP != 'true'
297
338
run : msbuild INSTALL.vcxproj -property:Configuration=Release
298
339
- name : upload build artifacts
340
+ if : env.SKIP != 'true'
299
341
uses : actions/upload-artifact@v1
300
342
with :
301
343
name : arm64-artifacts
0 commit comments