Skip to content

Commit 7957084

Browse files
committed
Merge branch 'sgn/github-action-v4-on-2.26.0'
This topic branch replaces the Azure Pipeline with a GitHub workflow. Signed-off-by: Johannes Schindelin <[email protected]>
2 parents ef54ed5 + 36a6237 commit 7957084

File tree

9 files changed

+310
-566
lines changed

9 files changed

+310
-566
lines changed

.github/workflows/main.yml

Lines changed: 230 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,230 @@
1+
name: CI/PR
2+
3+
on: [push, pull_request]
4+
5+
env:
6+
DEVELOPER: 1
7+
8+
jobs:
9+
windows-build:
10+
runs-on: windows-latest
11+
steps:
12+
- uses: actions/checkout@v1
13+
- name: download git-sdk-64-minimal
14+
shell: bash
15+
run: a=git-sdk-64-minimal && mkdir -p $a && curl -# https://wingit.blob.core.windows.net/ci-artifacts/$a.tar.xz | tar -C $a -xJf -
16+
- name: build
17+
shell: powershell
18+
env:
19+
HOME: ${{runner.workspace}}
20+
MSYSTEM: MINGW64
21+
NO_PERL: 1
22+
run: |
23+
& .\git-sdk-64-minimal\usr\bin\bash.exe -lc @"
24+
printf '%s\n' /git-sdk-64-minimal/ >>.git/info/exclude
25+
26+
ci/make-test-artifacts.sh artifacts
27+
"@
28+
- name: upload build artifacts
29+
uses: actions/upload-artifact@v1
30+
with:
31+
name: windows-artifacts
32+
path: artifacts
33+
windows-test:
34+
runs-on: windows-latest
35+
needs: [windows-build]
36+
strategy:
37+
matrix:
38+
nr: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
39+
steps:
40+
- uses: actions/checkout@v1
41+
- name: download git-sdk-64-minimal
42+
shell: bash
43+
run: a=git-sdk-64-minimal && mkdir -p $a && curl -# https://wingit.blob.core.windows.net/ci-artifacts/$a.tar.xz | tar -C $a -xJf -
44+
- name: download build artifacts
45+
uses: actions/download-artifact@v1
46+
with:
47+
name: windows-artifacts
48+
path: ${{github.workspace}}
49+
- name: extract build artifacts
50+
shell: bash
51+
run: tar xf artifacts.tar.gz
52+
- name: test
53+
shell: powershell
54+
run: |
55+
& .\git-sdk-64-minimal\usr\bin\bash.exe -lc @"
56+
# Let Git ignore the SDK
57+
printf '%s\n' /git-sdk-64-minimal/ >>.git/info/exclude
58+
59+
ci/run-test-slice.sh ${{matrix.nr}} 10
60+
"@
61+
- name: ci/print-test-failures.sh
62+
if: failure()
63+
shell: powershell
64+
run: |
65+
& .\git-sdk-64-minimal\usr\bin\bash.exe -lc ci/print-test-failures.sh
66+
- name: Upload failed tests' directories
67+
if: failure() && env.FAILED_TEST_ARTIFACTS != ''
68+
uses: actions/upload-artifact@v1
69+
with:
70+
name: failed-tests-windows
71+
path: ${{env.FAILED_TEST_ARTIFACTS}}
72+
vs-build:
73+
env:
74+
MSYSTEM: MINGW64
75+
NO_PERL: 1
76+
GIT_CONFIG_PARAMETERS: "'user.name=CI' 'user.email=ci@git'"
77+
runs-on: windows-latest
78+
steps:
79+
- uses: actions/checkout@v1
80+
- name: download git-sdk-64-minimal
81+
shell: bash
82+
run: a=git-sdk-64-minimal && mkdir -p $a && curl -# https://wingit.blob.core.windows.net/ci-artifacts/$a.tar.xz | tar -C $a -xJf -
83+
- name: generate Visual Studio solution
84+
shell: powershell
85+
run: |
86+
& .\git-sdk-64-minimal\usr\bin\bash.exe -lc @"
87+
make NDEBUG=1 DEVELOPER=1 vcxproj
88+
"@
89+
if (!$?) { exit(1) }
90+
- name: download vcpkg artifacts
91+
shell: powershell
92+
run: |
93+
$urlbase = "https://dev.azure.com/git/git/_apis/build/builds"
94+
$id = ((Invoke-WebRequest -UseBasicParsing "${urlbase}?definitions=9&statusFilter=completed&resultFilter=succeeded&`$top=1").content | ConvertFrom-JSON).value[0].id
95+
$downloadUrl = ((Invoke-WebRequest -UseBasicParsing "${urlbase}/$id/artifacts").content | ConvertFrom-JSON).value[0].resource.downloadUrl
96+
(New-Object Net.WebClient).DownloadFile($downloadUrl, "compat.zip")
97+
Expand-Archive compat.zip -DestinationPath . -Force
98+
Remove-Item compat.zip
99+
- name: add msbuild to PATH
100+
uses: microsoft/[email protected]
101+
- name: MSBuild
102+
run: msbuild git.sln -property:Configuration=Release -property:Platform=x64 -maxCpuCount:4 -property:PlatformToolset=v142
103+
- name: bundle artifact tar
104+
shell: powershell
105+
env:
106+
MSVC: 1
107+
VCPKG_ROOT: ${{github.workspace}}\compat\vcbuild\vcpkg
108+
run: |
109+
& compat\vcbuild\vcpkg_copy_dlls.bat release
110+
if (!$?) { exit(1) }
111+
& git-sdk-64-minimal\usr\bin\bash.exe -lc @"
112+
mkdir -p artifacts &&
113+
eval \"`$(make -n artifacts-tar INCLUDE_DLLS_IN_ARTIFACTS=YesPlease ARTIFACTS_DIRECTORY=artifacts 2>&1 | grep ^tar)\"
114+
"@
115+
- name: upload build artifacts
116+
uses: actions/upload-artifact@v1
117+
with:
118+
name: vs-artifacts
119+
path: artifacts
120+
vs-test:
121+
runs-on: windows-latest
122+
needs: [vs-build]
123+
strategy:
124+
matrix:
125+
nr: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
126+
steps:
127+
- uses: actions/checkout@v1
128+
- name: download git-64-portable
129+
shell: bash
130+
run: a=git-64-portable && mkdir -p $a && curl -# https://wingit.blob.core.windows.net/ci-artifacts/$a.tar.xz | tar -C $a -xJf -
131+
- name: download build artifacts
132+
uses: actions/download-artifact@v1
133+
with:
134+
name: vs-artifacts
135+
path: ${{github.workspace}}
136+
- name: extract build artifacts
137+
shell: bash
138+
run: tar xf artifacts.tar.gz
139+
- name: test (parallel)
140+
shell: powershell
141+
env:
142+
MSYSTEM: MINGW64
143+
NO_SVN_TESTS: 1
144+
GIT_TEST_SKIP_REBASE_P: 1
145+
run: |
146+
& git-64-portable\git-cmd.exe --command=usr\bin\bash.exe -lc @"
147+
# Let Git ignore the SDK and the test-cache
148+
printf '%s\n' /git-64-portable/ /test-cache/ >>.git/info/exclude
149+
150+
cd t &&
151+
PATH=\"`$PWD/helper:`$PATH\" &&
152+
test-tool.exe run-command testsuite --jobs=10 -V -x --write-junit-xml \
153+
`$(test-tool.exe path-utils slice-tests \
154+
${{matrix.nr}} 10 t[0-9]*.sh)
155+
"@
156+
regular:
157+
strategy:
158+
matrix:
159+
vector:
160+
- jobname: linux-clang
161+
cc: clang
162+
pool: ubuntu-latest
163+
- jobname: linux-gcc
164+
cc: gcc
165+
pool: ubuntu-latest
166+
- jobname: osx-clang
167+
cc: clang
168+
pool: macos-latest
169+
- jobname: osx-gcc
170+
cc: gcc
171+
pool: macos-latest
172+
- jobname: GETTEXT_POISON
173+
cc: gcc
174+
pool: ubuntu-latest
175+
env:
176+
CC: ${{matrix.vector.cc}}
177+
jobname: ${{matrix.vector.jobname}}
178+
runs-on: ${{matrix.vector.pool}}
179+
steps:
180+
- uses: actions/checkout@v1
181+
- run: ci/install-dependencies.sh
182+
- run: ci/run-build-and-tests.sh
183+
- run: ci/print-test-failures.sh
184+
if: failure()
185+
- name: Upload failed tests' directories
186+
if: failure() && env.FAILED_TEST_ARTIFACTS != ''
187+
uses: actions/upload-artifact@v1
188+
with:
189+
name: failed-tests-${{matrix.vector.jobname}}
190+
path: ${{env.FAILED_TEST_ARTIFACTS}}
191+
dockerized:
192+
strategy:
193+
matrix:
194+
vector:
195+
- jobname: linux-musl
196+
image: alpine
197+
- jobname: Linux32
198+
image: daald/ubuntu32:xenial
199+
env:
200+
jobname: ${{matrix.vector.jobname}}
201+
runs-on: ubuntu-latest
202+
container: ${{matrix.vector.image}}
203+
steps:
204+
- uses: actions/checkout@v1
205+
- run: ci/install-docker-dependencies.sh
206+
- run: ci/run-build-and-tests.sh
207+
- run: ci/print-test-failures.sh
208+
if: failure()
209+
- name: Upload failed tests' directories
210+
if: failure() && env.FAILED_TEST_ARTIFACTS != ''
211+
uses: actions/upload-artifact@v1
212+
with:
213+
name: failed-tests-${{matrix.vector.jobname}}
214+
path: ${{env.FAILED_TEST_ARTIFACTS}}
215+
static-analysis:
216+
env:
217+
jobname: StaticAnalysis
218+
runs-on: ubuntu-latest
219+
steps:
220+
- uses: actions/checkout@v1
221+
- run: ci/install-dependencies.sh
222+
- run: ci/run-static-analysis.sh
223+
documentation:
224+
env:
225+
jobname: Documentation
226+
runs-on: ubuntu-latest
227+
steps:
228+
- uses: actions/checkout@v1
229+
- run: ci/install-dependencies.sh
230+
- run: ci/test-documentation.sh

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ compiler:
1616

1717
matrix:
1818
include:
19-
- env: jobname=GIT_TEST_GETTEXT_POISON
19+
- env: jobname=GETTEXT_POISON
2020
os: linux
2121
compiler:
2222
addons:

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
[![Build Status](https://dev.azure.com/git/git/_apis/build/status/git.git)](https://dev.azure.com/git/git/_build/latest?definitionId=11)
1+
[![Build status](https://github.com/git/git/workflows/CI/PR/badge.svg)](https://github.com/git/git/actions?query=branch%3Amaster+event%3Apush)
22

33
Git - fast, scalable, distributed revision control system
44
=========================================================

0 commit comments

Comments
 (0)