@@ -81,44 +81,21 @@ jobs:
81
81
if : needs.ci-config.outputs.enabled == 'yes'
82
82
runs-on : windows-latest
83
83
steps :
84
- - uses : actions/checkout@v1
85
- - name : download git-sdk-64-minimal
86
- shell : bash
87
- run : |
88
- ## Get artifact
89
- urlbase=https://dev.azure.com/git-for-windows/git/_apis/build/builds
90
- id=$(curl "$urlbase?definitions=22&statusFilter=completed&resultFilter=succeeded&\$top=1" |
91
- jq -r ".value[] | .id")
92
- download_url="$(curl "$urlbase/$id/artifacts" |
93
- jq -r '.value[] | select(.name == "git-sdk-64-minimal").resource.downloadUrl')"
94
- curl --connect-timeout 10 --retry 5 --retry-delay 0 --retry-max-time 240 \
95
- -o artifacts.zip "$download_url"
96
-
97
- ## Unzip and remove the artifact
98
- unzip artifacts.zip
99
- rm artifacts.zip
84
+ - uses : actions/checkout@v2
85
+ - uses : git-for-windows/setup-git-for-windows-sdk@v1
100
86
- name : build
101
- shell : powershell
87
+ shell : bash
102
88
env :
103
89
HOME : ${{runner.workspace}}
104
- MSYSTEM : MINGW64
105
90
NO_PERL : 1
106
- run : |
107
- & .\git-sdk-64-minimal\usr\bin\bash.exe -lc @"
108
- printf '%s\n' /git-sdk-64-minimal/ >>.git/info/exclude
109
-
110
- ci/make-test-artifacts.sh artifacts
111
- "@
112
- - name : upload build artifacts
113
- uses : actions/upload-artifact@v1
91
+ run : ci/make-test-artifacts.sh artifacts
92
+ - name : zip up tracked files
93
+ run : git archive -o artifacts/tracked.tar.gz HEAD
94
+ - name : upload tracked files and build artifacts
95
+ uses : actions/upload-artifact@v2
114
96
with :
115
97
name : windows-artifacts
116
98
path : artifacts
117
- - name : upload git-sdk-64-minimal
118
- uses : actions/upload-artifact@v1
119
- with :
120
- name : git-sdk-64-minimal
121
- path : git-sdk-64-minimal
122
99
windows-test :
123
100
runs-on : windows-latest
124
101
needs : [windows-build]
@@ -127,65 +104,38 @@ jobs:
127
104
matrix :
128
105
nr : [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
129
106
steps :
130
- - uses : actions/checkout@v1
131
- - name : download build artifacts
132
- uses : actions/download-artifact@v1
107
+ - name : download tracked files and build artifacts
108
+ uses : actions/download-artifact@v2
133
109
with :
134
110
name : windows-artifacts
135
111
path : ${{github.workspace}}
136
- - name : extract build artifacts
112
+ - name : extract tracked files and build artifacts
137
113
shell : bash
138
- run : tar xf artifacts.tar.gz
139
- - name : download git-sdk-64-minimal
140
- uses : actions/download-artifact@v1
141
- with :
142
- name : git-sdk-64-minimal
143
- path : ${{github.workspace}}/git-sdk-64-minimal/
114
+ run : tar xf artifacts.tar.gz && tar xf tracked.tar.gz
115
+ - uses : git-for-windows/setup-git-for-windows-sdk@v1
144
116
- name : test
145
- shell : powershell
146
- run : |
147
- & .\git-sdk-64-minimal\usr\bin\bash.exe -lc @"
148
- # Let Git ignore the SDK
149
- printf '%s\n' /git-sdk-64-minimal/ >>.git/info/exclude
150
-
151
- ci/run-test-slice.sh ${{matrix.nr}} 10
152
- "@
117
+ shell : bash
118
+ run : ci/run-test-slice.sh ${{matrix.nr}} 10
153
119
- name : ci/print-test-failures.sh
154
120
if : failure()
155
- shell : powershell
156
- run : |
157
- & .\git-sdk-64-minimal\usr\bin\bash.exe -lc ci/print-test-failures.sh
121
+ shell : bash
122
+ run : ci/print-test-failures.sh
158
123
- name : Upload failed tests' directories
159
124
if : failure() && env.FAILED_TEST_ARTIFACTS != ''
160
- uses : actions/upload-artifact@v1
125
+ uses : actions/upload-artifact@v2
161
126
with :
162
127
name : failed-tests-windows
163
128
path : ${{env.FAILED_TEST_ARTIFACTS}}
164
129
vs-build :
165
130
needs : ci-config
166
131
if : needs.ci-config.outputs.enabled == 'yes'
167
132
env :
168
- MSYSTEM : MINGW64
169
133
NO_PERL : 1
170
134
GIT_CONFIG_PARAMETERS : " 'user.name=CI' 'user.email=ci@git'"
171
135
runs-on : windows-latest
172
136
steps :
173
- - uses : actions/checkout@v1
174
- - name : download git-sdk-64-minimal
175
- shell : bash
176
- run : |
177
- ## Get artifact
178
- urlbase=https://dev.azure.com/git-for-windows/git/_apis/build/builds
179
- id=$(curl "$urlbase?definitions=22&statusFilter=completed&resultFilter=succeeded&\$top=1" |
180
- jq -r ".value[] | .id")
181
- download_url="$(curl "$urlbase/$id/artifacts" |
182
- jq -r '.value[] | select(.name == "git-sdk-64-minimal").resource.downloadUrl')"
183
- curl --connect-timeout 10 --retry 5 --retry-delay 0 --retry-max-time 240 \
184
- -o artifacts.zip "$download_url"
185
-
186
- ## Unzip and remove the artifact
187
- unzip artifacts.zip
188
- rm artifacts.zip
137
+ - uses : actions/checkout@v2
138
+ - uses : git-for-windows/setup-git-for-windows-sdk@v1
189
139
- name : initialize vcpkg
190
140
uses : actions/checkout@v2
191
141
with :
@@ -203,75 +153,60 @@ jobs:
203
153
- name : add msbuild to PATH
204
154
uses : microsoft/setup-msbuild@v1
205
155
- name : copy dlls to root
206
- shell : powershell
207
- run : |
208
- & compat\vcbuild\vcpkg_copy_dlls.bat release
209
- if (!$?) { exit(1) }
156
+ shell : cmd
157
+ run : compat\vcbuild\vcpkg_copy_dlls.bat release
210
158
- name : generate Visual Studio solution
211
159
shell : bash
212
160
run : |
213
161
cmake `pwd`/contrib/buildsystems/ -DCMAKE_PREFIX_PATH=`pwd`/compat/vcbuild/vcpkg/installed/x64-windows \
214
- -DMSGFMT_EXE=`pwd`/git-sdk-64-minimal/mingw64/bin/msgfmt.exe -DPERL_TESTS=OFF -DPYTHON_TESTS=OFF -DCURL_NO_CURL_CMAKE=ON
162
+ -DNO_GETTEXT=YesPlease -DPERL_TESTS=OFF -DPYTHON_TESTS=OFF -DCURL_NO_CURL_CMAKE=ON
215
163
- name : MSBuild
216
164
run : msbuild git.sln -property:Configuration=Release -property:Platform=x64 -maxCpuCount:4 -property:PlatformToolset=v142
217
165
- name : bundle artifact tar
218
- shell : powershell
166
+ shell : bash
219
167
env :
220
168
MSVC : 1
221
169
VCPKG_ROOT : ${{github.workspace}}\compat\vcbuild\vcpkg
222
170
run : |
223
- & git-sdk-64-minimal\usr\bin\bash.exe -lc @"
224
- mkdir -p artifacts &&
225
- eval \"`$(make -n artifacts-tar INCLUDE_DLLS_IN_ARTIFACTS=YesPlease ARTIFACTS_DIRECTORY=artifacts 2>&1 | grep ^tar)\"
226
- "@
227
- - name : upload build artifacts
228
- uses : actions/upload-artifact@v1
171
+ mkdir -p artifacts &&
172
+ eval "$(make -n artifacts-tar INCLUDE_DLLS_IN_ARTIFACTS=YesPlease ARTIFACTS_DIRECTORY= artifacts NO_GETTEXT=YesPlease 2>&1 | grep ^tar)"
173
+ - name : zip up tracked files
174
+ run : git archive -o artifacts/tracked.tar.gz HEAD
175
+ - name : upload tracked files and build artifacts
176
+ uses : actions/upload-artifact@v2
229
177
with :
230
178
name : vs-artifacts
231
179
path : artifacts
232
180
vs-test :
233
181
runs-on : windows-latest
234
- needs : [ vs-build, windows-build]
182
+ needs : vs-build
235
183
strategy :
236
184
fail-fast : false
237
185
matrix :
238
186
nr : [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
239
187
steps :
240
- - uses : actions/checkout@v1
241
- - name : download git-sdk-64-minimal
242
- uses : actions/download-artifact@v1
243
- with :
244
- name : git-sdk-64-minimal
245
- path : ${{github.workspace}}/git-sdk-64-minimal/
246
- - name : download build artifacts
247
- uses : actions/download-artifact@v1
188
+ - uses : git-for-windows/setup-git-for-windows-sdk@v1
189
+ - name : download tracked files and build artifacts
190
+ uses : actions/download-artifact@v2
248
191
with :
249
192
name : vs-artifacts
250
193
path : ${{github.workspace}}
251
- - name : extract build artifacts
194
+ - name : extract tracked files and build artifacts
252
195
shell : bash
253
- run : tar xf artifacts.tar.gz
196
+ run : tar xf artifacts.tar.gz && tar xf tracked.tar.gz
254
197
- name : test
255
- shell : powershell
198
+ shell : bash
256
199
env :
257
- MSYSTEM : MINGW64
258
200
NO_SVN_TESTS : 1
259
201
GIT_TEST_SKIP_REBASE_P : 1
260
- run : |
261
- & .\git-sdk-64-minimal\usr\bin\bash.exe -lc @"
262
- # Let Git ignore the SDK and the test-cache
263
- printf '%s\n' /git-sdk-64-minimal/ /test-cache/ >>.git/info/exclude
264
-
265
- ci/run-test-slice.sh ${{matrix.nr}} 10
266
- "@
202
+ run : ci/run-test-slice.sh ${{matrix.nr}} 10
267
203
- name : ci/print-test-failures.sh
268
204
if : failure()
269
- shell : powershell
270
- run : |
271
- & .\git-sdk-64-minimal\usr\bin\bash.exe -lc ci/print-test-failures.sh
205
+ shell : bash
206
+ run : ci/print-test-failures.sh
272
207
- name : Upload failed tests' directories
273
208
if : failure() && env.FAILED_TEST_ARTIFACTS != ''
274
- uses : actions/upload-artifact@v1
209
+ uses : actions/upload-artifact@v2
275
210
with :
276
211
name : failed-tests-windows
277
212
path : ${{env.FAILED_TEST_ARTIFACTS}}
@@ -302,14 +237,14 @@ jobs:
302
237
jobname : ${{matrix.vector.jobname}}
303
238
runs-on : ${{matrix.vector.pool}}
304
239
steps :
305
- - uses : actions/checkout@v1
240
+ - uses : actions/checkout@v2
306
241
- run : ci/install-dependencies.sh
307
242
- run : ci/run-build-and-tests.sh
308
243
- run : ci/print-test-failures.sh
309
244
if : failure()
310
245
- name : Upload failed tests' directories
311
246
if : failure() && env.FAILED_TEST_ARTIFACTS != ''
312
- uses : actions/upload-artifact@v1
247
+ uses : actions/upload-artifact@v2
313
248
with :
314
249
name : failed-tests-${{matrix.vector.jobname}}
315
250
path : ${{env.FAILED_TEST_ARTIFACTS}}
@@ -336,7 +271,7 @@ jobs:
336
271
if : failure()
337
272
- name : Upload failed tests' directories
338
273
if : failure() && env.FAILED_TEST_ARTIFACTS != ''
339
- uses : actions/upload-artifact@v1
274
+ uses : actions/upload-artifact@v2
340
275
with :
341
276
name : failed-tests-${{matrix.vector.jobname}}
342
277
path : ${{env.FAILED_TEST_ARTIFACTS}}
@@ -347,7 +282,7 @@ jobs:
347
282
jobname : StaticAnalysis
348
283
runs-on : ubuntu-18.04
349
284
steps :
350
- - uses : actions/checkout@v1
285
+ - uses : actions/checkout@v2
351
286
- run : ci/install-dependencies.sh
352
287
- run : ci/run-static-analysis.sh
353
288
documentation :
@@ -357,6 +292,6 @@ jobs:
357
292
jobname : Documentation
358
293
runs-on : ubuntu-latest
359
294
steps :
360
- - uses : actions/checkout@v1
295
+ - uses : actions/checkout@v2
361
296
- run : ci/install-dependencies.sh
362
297
- run : ci/test-documentation.sh
0 commit comments