@@ -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,12 +301,15 @@ 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
shell : powershell
278
314
run : |
279
315
$urlbase = "https://dev.azure.com/git/git/_apis/build/builds"
@@ -283,23 +319,29 @@ jobs:
283
319
Expand-Archive compat.zip -DestinationPath . -Force
284
320
Remove-Item compat.zip
285
321
- name : add msbuild to PATH
322
+ if : env.SKIP != 'true'
286
323
uses : microsoft/setup-msbuild@v1
287
324
- name : copy dlls to root
325
+ if : env.SKIP != 'true'
288
326
shell : powershell
289
327
run : |
290
328
& compat\vcbuild\vcpkg_copy_dlls.bat release arm64-windows
291
329
if (!$?) { exit(1) }
292
330
- name : generate Visual Studio solution
331
+ if : env.SKIP != 'true'
293
332
shell : bash
294
333
run : |
295
334
cmake `pwd`/contrib/buildsystems/ -DCMAKE_PREFIX_PATH=`pwd`/compat/vcbuild/vcpkg/installed/arm64-windows \
296
335
-DNO_GETTEXT=YesPlease -DPERL_TESTS=OFF -DPYTHON_TESTS=OFF -DCURL_NO_CURL_CMAKE=ON -DCMAKE_GENERATOR_PLATFORM=arm64 -DVCPKG_ARCH=arm64-windows \
297
336
-DCMAKE_INSTALL_PREFIX="`pwd`/git-arm64" -DSKIP_DASHED_BUILT_INS=ON
298
337
- name : MSBuild
338
+ if : env.SKIP != 'true'
299
339
run : msbuild git.sln -property:Configuration=Release
300
340
- name : Link the Git executables
341
+ if : env.SKIP != 'true'
301
342
run : msbuild INSTALL.vcxproj -property:Configuration=Release
302
343
- name : upload build artifacts
344
+ if : env.SKIP != 'true'
303
345
uses : actions/upload-artifact@v1
304
346
with :
305
347
name : arm64-artifacts
0 commit comments