@@ -81,44 +81,21 @@ jobs:
8181 if : needs.ci-config.outputs.enabled == 'yes'
8282 runs-on : windows-latest
8383 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
10086 - name : build
101- shell : powershell
87+ shell : bash
10288 env :
10389 HOME : ${{runner.workspace}}
104- MSYSTEM : MINGW64
10590 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
11496 with :
11597 name : windows-artifacts
11698 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
12299 windows-test :
123100 runs-on : windows-latest
124101 needs : [windows-build]
@@ -127,65 +104,38 @@ jobs:
127104 matrix :
128105 nr : [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
129106 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
133109 with :
134110 name : windows-artifacts
135111 path : ${{github.workspace}}
136- - name : extract build artifacts
112+ - name : extract tracked files and build artifacts
137113 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
144116 - 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
153119 - name : ci/print-test-failures.sh
154120 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
158123 - name : Upload failed tests' directories
159124 if : failure() && env.FAILED_TEST_ARTIFACTS != ''
160- uses : actions/upload-artifact@v1
125+ uses : actions/upload-artifact@v2
161126 with :
162127 name : failed-tests-windows
163128 path : ${{env.FAILED_TEST_ARTIFACTS}}
164129 vs-build :
165130 needs : ci-config
166131 if : needs.ci-config.outputs.enabled == 'yes'
167132 env :
168- MSYSTEM : MINGW64
169133 NO_PERL : 1
170134 GIT_CONFIG_PARAMETERS : " 'user.name=CI' 'user.email=ci@git'"
171135 runs-on : windows-latest
172136 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
189139 - name : initialize vcpkg
190140 uses : actions/checkout@v2
191141 with :
@@ -203,75 +153,60 @@ jobs:
203153 - name : add msbuild to PATH
204154 uses : microsoft/setup-msbuild@v1
205155 - 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
210158 - name : generate Visual Studio solution
211159 shell : bash
212160 run : |
213161 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
215163 - name : MSBuild
216164 run : msbuild git.sln -property:Configuration=Release -property:Platform=x64 -maxCpuCount:4 -property:PlatformToolset=v142
217165 - name : bundle artifact tar
218- shell : powershell
166+ shell : bash
219167 env :
220168 MSVC : 1
221169 VCPKG_ROOT : ${{github.workspace}}\compat\vcbuild\vcpkg
222170 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 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
229177 with :
230178 name : vs-artifacts
231179 path : artifacts
232180 vs-test :
233181 runs-on : windows-latest
234- needs : [ vs-build, windows-build]
182+ needs : vs-build
235183 strategy :
236184 fail-fast : false
237185 matrix :
238186 nr : [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
239187 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
248191 with :
249192 name : vs-artifacts
250193 path : ${{github.workspace}}
251- - name : extract build artifacts
194+ - name : extract tracked files and build artifacts
252195 shell : bash
253- run : tar xf artifacts.tar.gz
196+ run : tar xf artifacts.tar.gz && tar xf tracked.tar.gz
254197 - name : test
255- shell : powershell
198+ shell : bash
256199 env :
257- MSYSTEM : MINGW64
258200 NO_SVN_TESTS : 1
259201 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
267203 - name : ci/print-test-failures.sh
268204 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
272207 - name : Upload failed tests' directories
273208 if : failure() && env.FAILED_TEST_ARTIFACTS != ''
274- uses : actions/upload-artifact@v1
209+ uses : actions/upload-artifact@v2
275210 with :
276211 name : failed-tests-windows
277212 path : ${{env.FAILED_TEST_ARTIFACTS}}
@@ -302,14 +237,14 @@ jobs:
302237 jobname : ${{matrix.vector.jobname}}
303238 runs-on : ${{matrix.vector.pool}}
304239 steps :
305- - uses : actions/checkout@v1
240+ - uses : actions/checkout@v2
306241 - run : ci/install-dependencies.sh
307242 - run : ci/run-build-and-tests.sh
308243 - run : ci/print-test-failures.sh
309244 if : failure()
310245 - name : Upload failed tests' directories
311246 if : failure() && env.FAILED_TEST_ARTIFACTS != ''
312- uses : actions/upload-artifact@v1
247+ uses : actions/upload-artifact@v2
313248 with :
314249 name : failed-tests-${{matrix.vector.jobname}}
315250 path : ${{env.FAILED_TEST_ARTIFACTS}}
@@ -336,7 +271,7 @@ jobs:
336271 if : failure()
337272 - name : Upload failed tests' directories
338273 if : failure() && env.FAILED_TEST_ARTIFACTS != ''
339- uses : actions/upload-artifact@v1
274+ uses : actions/upload-artifact@v2
340275 with :
341276 name : failed-tests-${{matrix.vector.jobname}}
342277 path : ${{env.FAILED_TEST_ARTIFACTS}}
@@ -347,7 +282,7 @@ jobs:
347282 jobname : StaticAnalysis
348283 runs-on : ubuntu-18.04
349284 steps :
350- - uses : actions/checkout@v1
285+ - uses : actions/checkout@v2
351286 - run : ci/install-dependencies.sh
352287 - run : ci/run-static-analysis.sh
353288 documentation :
@@ -357,6 +292,6 @@ jobs:
357292 jobname : Documentation
358293 runs-on : ubuntu-latest
359294 steps :
360- - uses : actions/checkout@v1
295+ - uses : actions/checkout@v2
361296 - run : ci/install-dependencies.sh
362297 - run : ci/test-documentation.sh
0 commit comments