Skip to content

Commit 01da795

Browse files
authored
Merge pull request #3040 from dennisameling/vs-build-no-gettext
.github: build vs-build with NO_GETTEXT
2 parents de8defe + fc590b3 commit 01da795

File tree

1 file changed

+44
-107
lines changed

1 file changed

+44
-107
lines changed

.github/workflows/main.yml

Lines changed: 44 additions & 107 deletions
Original file line numberDiff line numberDiff line change
@@ -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@v0
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,37 +104,25 @@ 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@v0
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}}
@@ -166,30 +131,15 @@ jobs:
166131
if: needs.ci-config.outputs.enabled == 'yes'
167132
timeout-minutes: 15
168133
env:
169-
MSYSTEM: MINGW64
170134
NO_PERL: 1
171135
GIT_CONFIG_PARAMETERS: "'user.name=CI' 'user.email=ci@git'"
172136
runs-on: windows-latest
173137
strategy:
174138
matrix:
175139
arch: [x64, arm64]
176140
steps:
177-
- uses: actions/checkout@v1
178-
- name: download git-sdk-64-minimal
179-
shell: bash
180-
run: |
181-
## Get artifact
182-
urlbase=https://dev.azure.com/git-for-windows/git/_apis/build/builds
183-
id=$(curl "$urlbase?definitions=22&statusFilter=completed&resultFilter=succeeded&\$top=1" |
184-
jq -r ".value[] | .id")
185-
download_url="$(curl "$urlbase/$id/artifacts" |
186-
jq -r '.value[] | select(.name == "git-sdk-64-minimal").resource.downloadUrl')"
187-
curl --connect-timeout 10 --retry 5 --retry-delay 0 --retry-max-time 240 \
188-
-o artifacts.zip "$download_url"
189-
190-
## Unzip and remove the artifact
191-
unzip artifacts.zip
192-
rm artifacts.zip
141+
- uses: actions/checkout@v2
142+
- uses: git-for-windows/setup-git-for-windows-sdk@v0
193143
- name: initialize vcpkg
194144
uses: actions/checkout@v2
195145
with:
@@ -215,67 +165,54 @@ jobs:
215165
shell: bash
216166
run: |
217167
cmake `pwd`/contrib/buildsystems/ -DCMAKE_PREFIX_PATH=`pwd`/compat/vcbuild/vcpkg/installed/${{ matrix.arch }}-windows \
218-
-DMSGFMT_EXE=`pwd`/git-sdk-64-minimal/mingw64/bin/msgfmt.exe -DPERL_TESTS=OFF -DPYTHON_TESTS=OFF -DCURL_NO_CURL_CMAKE=ON -DCMAKE_GENERATOR_PLATFORM=${{ matrix.arch }} -DVCPKG_ARCH=${{ matrix.arch }}-windows
168+
-DNO_GETTEXT=YesPlease -DPERL_TESTS=OFF -DPYTHON_TESTS=OFF -DCURL_NO_CURL_CMAKE=ON -DCMAKE_GENERATOR_PLATFORM=${{ matrix.arch }} -DVCPKG_ARCH=${{ matrix.arch }}-windows
219169
- name: MSBuild
220170
run: msbuild git.sln -property:Configuration=Release -property:Platform=${{ matrix.arch }} -maxCpuCount:4 -property:PlatformToolset=v142
221171
- name: bundle artifact tar
222-
shell: powershell
172+
shell: bash
223173
env:
224174
MSVC: 1
225175
VCPKG_ROOT: ${{github.workspace}}\compat\vcbuild\vcpkg
226176
run: |
227-
& git-sdk-64-minimal\usr\bin\bash.exe -lc @"
228-
mkdir -p artifacts &&
229-
eval \"`$(make -n artifacts-tar INCLUDE_DLLS_IN_ARTIFACTS=YesPlease ARTIFACTS_DIRECTORY=artifacts 2>&1 | grep ^tar)\"
230-
"@
231-
- name: upload build artifacts
232-
uses: actions/upload-artifact@v1
177+
mkdir -p artifacts &&
178+
eval "$(make -n artifacts-tar INCLUDE_DLLS_IN_ARTIFACTS=YesPlease ARTIFACTS_DIRECTORY=artifacts 2>&1 | grep ^tar)"
179+
- name: zip up tracked files
180+
run: git archive -o artifacts/tracked.tar.gz HEAD
181+
- name: upload tracked files and build artifacts
182+
uses: actions/upload-artifact@v2
233183
with:
234184
name: vs-artifacts-${{ matrix.arch }}
235185
path: artifacts
236186
vs-test:
237187
runs-on: windows-latest
238-
needs: [vs-build, windows-build]
188+
needs: vs-build
239189
strategy:
240190
fail-fast: false
241191
matrix:
242192
nr: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
243193
steps:
244-
- uses: actions/checkout@v1
245-
- name: download git-sdk-64-minimal
246-
uses: actions/download-artifact@v1
247-
with:
248-
name: git-sdk-64-minimal
249-
path: ${{github.workspace}}/git-sdk-64-minimal/
250-
- name: download build artifacts
251-
uses: actions/download-artifact@v1
194+
- uses: git-for-windows/setup-git-for-windows-sdk@v0
195+
- name: download tracked files and build artifacts
196+
uses: actions/download-artifact@v2
252197
with:
253198
name: vs-artifacts-x64
254199
path: ${{github.workspace}}
255-
- name: extract build artifacts
200+
- name: extract tracked files and build artifacts
256201
shell: bash
257-
run: tar xf artifacts.tar.gz
202+
run: tar xf artifacts.tar.gz && tar xf tracked.tar.gz
258203
- name: test
259-
shell: powershell
204+
shell: bash
260205
env:
261-
MSYSTEM: MINGW64
262206
NO_SVN_TESTS: 1
263207
GIT_TEST_SKIP_REBASE_P: 1
264-
run: |
265-
& .\git-sdk-64-minimal\usr\bin\bash.exe -lc @"
266-
# Let Git ignore the SDK and the test-cache
267-
printf '%s\n' /git-sdk-64-minimal/ /test-cache/ >>.git/info/exclude
268-
269-
ci/run-test-slice.sh ${{matrix.nr}} 10
270-
"@
208+
run: ci/run-test-slice.sh ${{matrix.nr}} 10
271209
- name: ci/print-test-failures.sh
272210
if: failure()
273-
shell: powershell
274-
run: |
275-
& .\git-sdk-64-minimal\usr\bin\bash.exe -lc ci/print-test-failures.sh
211+
shell: bash
212+
run: ci/print-test-failures.sh
276213
- name: Upload failed tests' directories
277214
if: failure() && env.FAILED_TEST_ARTIFACTS != ''
278-
uses: actions/upload-artifact@v1
215+
uses: actions/upload-artifact@v2
279216
with:
280217
name: failed-tests-windows
281218
path: ${{env.FAILED_TEST_ARTIFACTS}}
@@ -306,14 +243,14 @@ jobs:
306243
jobname: ${{matrix.vector.jobname}}
307244
runs-on: ${{matrix.vector.pool}}
308245
steps:
309-
- uses: actions/checkout@v1
246+
- uses: actions/checkout@v2
310247
- run: ci/install-dependencies.sh
311248
- run: ci/run-build-and-tests.sh
312249
- run: ci/print-test-failures.sh
313250
if: failure()
314251
- name: Upload failed tests' directories
315252
if: failure() && env.FAILED_TEST_ARTIFACTS != ''
316-
uses: actions/upload-artifact@v1
253+
uses: actions/upload-artifact@v2
317254
with:
318255
name: failed-tests-${{matrix.vector.jobname}}
319256
path: ${{env.FAILED_TEST_ARTIFACTS}}
@@ -340,7 +277,7 @@ jobs:
340277
if: failure()
341278
- name: Upload failed tests' directories
342279
if: failure() && env.FAILED_TEST_ARTIFACTS != ''
343-
uses: actions/upload-artifact@v1
280+
uses: actions/upload-artifact@v2
344281
with:
345282
name: failed-tests-${{matrix.vector.jobname}}
346283
path: ${{env.FAILED_TEST_ARTIFACTS}}
@@ -351,7 +288,7 @@ jobs:
351288
jobname: StaticAnalysis
352289
runs-on: ubuntu-18.04
353290
steps:
354-
- uses: actions/checkout@v1
291+
- uses: actions/checkout@v2
355292
- run: ci/install-dependencies.sh
356293
- run: ci/run-static-analysis.sh
357294
documentation:
@@ -361,6 +298,6 @@ jobs:
361298
jobname: Documentation
362299
runs-on: ubuntu-latest
363300
steps:
364-
- uses: actions/checkout@v1
301+
- uses: actions/checkout@v2
365302
- run: ci/install-dependencies.sh
366303
- run: ci/test-documentation.sh

0 commit comments

Comments
 (0)