Skip to content

Commit 508d935

Browse files
committed
ci: introduce arm nightly builds for GitHub Actions
1 parent 5a9d16d commit 508d935

File tree

1 file changed

+86
-21
lines changed

1 file changed

+86
-21
lines changed

.github/workflows/nightly.yml

Lines changed: 86 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -11,41 +11,49 @@ env:
1111
docker-config-path: ci/docker
1212

1313
jobs:
14+
# Run our nightly builds. We build a matrix with the various build
15+
# targets and their details. Then we build either in a docker container
16+
# (Linux) or on the actual hosts (macOS, Windows).
1417
build:
1518
name: Build
1619
strategy:
1720
matrix:
1821
platform:
1922
- # Xenial, GCC, OpenSSL
20-
image: xenial
23+
container:
24+
name: xenial
2125
env:
2226
CC: gcc
2327
CMAKE_GENERATOR: Ninja
2428
CMAKE_OPTIONS: -DUSE_HTTPS=OpenSSL -DREGEX_BACKEND=builtin -DDEPRECATE_HARD=ON -DUSE_LEAK_CHECKER=valgrind -DUSE_GSSAPI=ON
2529
os: ubuntu-latest
2630
- # Xenial, GCC, mbedTLS
27-
image: xenial
31+
container:
32+
name: xenial
2833
env:
2934
CC: gcc
3035
CMAKE_GENERATOR: Ninja
3136
CMAKE_OPTIONS: -DUSE_HTTPS=mbedTLS -DUSE_SHA1=HTTPS -DDEPRECATE_HARD=ON -DUSE_LEAK_CHECKER=valgrind -DUSE_GSSAPI=ON
3237
os: ubuntu-latest
3338
- # Xenial, Clang, OpenSSL
34-
image: xenial
39+
container:
40+
name: xenial
3541
env:
3642
CC: clang
3743
CMAKE_GENERATOR: Ninja
3844
CMAKE_OPTIONS: -DUSE_HTTPS=OpenSSL -DDEPRECATE_HARD=ON -DUSE_LEAK_CHECKER=valgrind -DUSE_GSSAPI=ON
3945
os: ubuntu-latest
4046
- # Xenial, Clang, mbedTLS
41-
image: xenial
47+
container:
48+
name: xenial
4249
env:
4350
CC: clang
4451
CMAKE_OPTIONS: -DUSE_HTTPS=mbedTLS -DUSE_SHA1=HTTPS -DREGEX_BACKEND=pcre -DDEPRECATE_HARD=ON -DUSE_LEAK_CHECKER=valgrind -DUSE_GSSAPI=ON
4552
CMAKE_GENERATOR: Ninja
4653
os: ubuntu-latest
4754
- # Focal, Clang 10, mbedTLS, MemorySanitizer
48-
image: focal
55+
container:
56+
name: focal
4957
env:
5058
CC: clang-10
5159
CFLAGS: -fsanitize=memory -fsanitize-memory-track-origins=2 -fsanitize-blacklist=/home/libgit2/source/script/sanitizers.supp -fno-optimize-sibling-calls -fno-omit-frame-pointer
@@ -56,7 +64,8 @@ jobs:
5664
ASAN_SYMBOLIZER_PATH: /usr/bin/llvm-symbolizer-10
5765
os: ubuntu-latest
5866
- # Focal, Clang 10, OpenSSL, UndefinedBehaviorSanitizer
59-
image: focal
67+
container:
68+
name: focal
6069
env:
6170
CC: clang-10
6271
CFLAGS: -fsanitize=undefined,nullability -fno-sanitize-recover=undefined,nullability -fsanitize-blacklist=/home/libgit2/source/script/sanitizers.supp -fno-optimize-sibling-calls -fno-omit-frame-pointer
@@ -66,11 +75,19 @@ jobs:
6675
SKIP_NEGOTIATE_TESTS: true
6776
ASAN_SYMBOLIZER_PATH: /usr/bin/llvm-symbolizer-10
6877
os: ubuntu-latest
69-
- # linux arm64
70-
os: [ focal, arm64, self-hosted ]
78+
- # Focal, Clang 10, OpenSSL, ThreadSanitizer
79+
container:
80+
name: focal
7181
env:
72-
CC: gcc
73-
CMAKE_OPTIONS: -DDEPRECATE_HARD=ON -DUSE_LEAK_CHECKER=valgrind -DUSE_GSSAPI=ON
82+
CC: clang-10
83+
CFLAGS: -fsanitize=thread -fno-optimize-sibling-calls -fno-omit-frame-pointer
84+
CMAKE_OPTIONS: -DCMAKE_PREFIX_PATH=/usr/local -DUSE_HTTPS=OpenSSL -DUSE_SHA1=HTTPS -DREGEX_BACKEND=pcre -DDEPRECATE_HARD=ON -DUSE_BUNDLED_ZLIB=ON
85+
CMAKE_GENERATOR: Ninja
86+
SKIP_SSH_TESTS: true
87+
SKIP_NEGOTIATE_TESTS: true
88+
ASAN_SYMBOLIZER_PATH: /usr/bin/llvm-symbolizer-10
89+
TSAN_OPTIONS: suppressions=/home/libgit2/source/script/thread-sanitizer.supp second_deadlock_stack=1
90+
os: ubuntu-latest
7491
- # macOS
7592
os: macos-10.15
7693
env:
@@ -86,15 +103,15 @@ jobs:
86103
env:
87104
ARCH: amd64
88105
CMAKE_GENERATOR: Visual Studio 16 2019
89-
CMAKE_OPTIONS: -A x64 -DMSVC_CRTDBG=ON -DDEPRECATE_HARD=ON
106+
CMAKE_OPTIONS: -A x64 -DWIN32_LEAKCHECK=ON -DDEPRECATE_HARD=ON
90107
SKIP_SSH_TESTS: true
91108
SKIP_NEGOTIATE_TESTS: true
92109
- # Windows x86 Visual Studio
93110
os: windows-2019
94111
env:
95112
ARCH: x86
96113
CMAKE_GENERATOR: Visual Studio 16 2019
97-
CMAKE_OPTIONS: -A Win32 -DMSVC_CRTDBG=ON -DDEPRECATE_HARD=ON -DUSE_SHA1=HTTPS -DUSE_BUNDLED_ZLIB=ON
114+
CMAKE_OPTIONS: -A Win32 -DWIN32_LEAKCHECK=ON -DDEPRECATE_HARD=ON -DUSE_SHA1=HTTPS -DUSE_BUNDLED_ZLIB=ON
98115
SKIP_SSH_TESTS: true
99116
SKIP_NEGOTIATE_TESTS: true
100117
- # Windows amd64 mingw
@@ -119,9 +136,53 @@ jobs:
119136
BUILD_PATH: D:\Temp\mingw32\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Program Files (x86)\CMake\bin
120137
SKIP_SSH_TESTS: true
121138
SKIP_NEGOTIATE_TESTS: true
139+
- # Bionic, x86, Clang, OpenSSL
140+
container:
141+
name: bionic-x86
142+
dockerfile: bionic
143+
qemu: true
144+
env:
145+
CC: clang
146+
CMAKE_GENERATOR: Ninja
147+
CMAKE_OPTIONS: -DUSE_HTTPS=OpenSSL -DDEPRECATE_HARD=ON -DUSE_LEAK_CHECKER=valgrind -DUSE_GSSAPI=ON
148+
RUN_INVASIVE_TESTS: true
149+
os: ubuntu-latest
150+
- # Bionic, x86, GCC, OpenSSL
151+
container:
152+
name: bionic-x86
153+
dockerfile: bionic
154+
env:
155+
CC: gcc
156+
CMAKE_GENERATOR: Ninja
157+
CMAKE_OPTIONS: -DUSE_HTTPS=OpenSSL -DDEPRECATE_HARD=ON -DUSE_LEAK_CHECKER=valgrind -DUSE_GSSAPI=ON
158+
RUN_INVASIVE_TESTS: true
159+
os: ubuntu-latest
160+
- # Bionic, arm32, GCC, OpenSSL
161+
container:
162+
name: bionic-arm32
163+
dockerfile: bionic
164+
qemu: true
165+
env:
166+
CC: gcc
167+
CMAKE_GENERATOR: Ninja
168+
CMAKE_OPTIONS: -DUSE_HTTPS=OpenSSL -DDEPRECATE_HARD=ON -DUSE_GSSAPI=ON
169+
RUN_INVASIVE_TESTS: true
170+
SKIP_PROXY_TESTS: true
171+
os: ubuntu-latest
172+
- # Bionic, arm64, GCC, OpenSSL
173+
container:
174+
name: bionic-arm64
175+
dockerfile: bionic
176+
qemu: true
177+
env:
178+
CC: gcc
179+
CMAKE_GENERATOR: Ninja
180+
CMAKE_OPTIONS: -DUSE_HTTPS=OpenSSL -DDEPRECATE_HARD=ON -DUSE_GSSAPI=ON
181+
RUN_INVASIVE_TESTS: true
182+
SKIP_PROXY_TESTS: true
183+
os: ubuntu-latest
122184
fail-fast: false
123-
env:
124-
ACTIONS_RUNNER_TOKEN: ${{ secrets.ACTIONS_RUNNER_TOKEN }}
185+
env: ${{ matrix.platform.env }}
125186
runs-on: ${{ matrix.platform.os }}
126187
steps:
127188
- name: Check out repository
@@ -131,23 +192,27 @@ jobs:
131192
- name: Set up build environment
132193
run: ci/setup-${{ matrix.platform.setup-script }}.sh
133194
shell: bash
134-
env: ${{ matrix.platform.env }}
135195
if: matrix.platform.setup-script != ''
196+
- name: Setup QEMU
197+
run: docker run --rm --privileged multiarch/qemu-user-static:register --reset
198+
if: matrix.platform.container.qemu == true
136199
- name: Download container
137-
run: ci/getcontainer.sh ${{ env.docker-config-path }}/${{ matrix.platform.image }}
200+
run: |
201+
"${{ github.workspace }}/ci/getcontainer.sh" "${{ matrix.platform.container.name }}" "${{ matrix.platform.container.dockerfile }}"
138202
env:
139203
DOCKER_REGISTRY: ${{ env.docker-registry }}
140204
GITHUB_TOKEN: ${{ secrets.github_token }}
141-
if: matrix.platform.image != ''
205+
working-directory: ${{ env.docker-config-path }}
206+
if: matrix.platform.container.name != ''
142207
- name: Create container
143-
run: docker build -t ${{ env.docker-registry-container-sha }} -f ${{ matrix.platform.image }} .
208+
run: docker build -t ${{ env.docker-registry-container-sha }} -f ${{ env.dockerfile }} .
144209
working-directory: ${{ env.docker-config-path }}
145-
if: matrix.platform.image != '' && env.docker-container-exists != 'true'
210+
if: matrix.platform.container.name != '' && env.docker-container-exists != 'true'
146211
- name: Build and test
147212
run: |
148213
export GITTEST_NEGOTIATE_PASSWORD="${{ secrets.GITTEST_NEGOTIATE_PASSWORD }}"
149214
150-
if [ -n "${{ matrix.platform.image }}" ]; then
215+
if [ -n "${{ matrix.platform.container.name }}" ]; then
151216
docker run \
152217
--rm \
153218
-v "$(pwd):/home/libgit2/source" \
@@ -161,12 +226,12 @@ jobs:
161226
-e PKG_CONFIG_PATH \
162227
-e SKIP_NEGOTIATE_TESTS \
163228
-e SKIP_SSH_TESTS \
229+
-e TSAN_OPTIONS \
164230
${{ env.docker-registry-container-sha }} \
165231
/bin/bash -c "mkdir build && cd build && ../ci/build.sh && ../ci/test.sh"
166232
else
167233
mkdir build && cd build
168234
../ci/build.sh
169235
../ci/test.sh
170236
fi
171-
env: ${{ matrix.platform.env }}
172237
shell: bash

0 commit comments

Comments
 (0)