1010 workflow_dispatch :
1111
1212env :
13- docker-registry : docker.pkg.github.com
13+ docker-registry : ghcr.io
1414 docker-config-path : source/ci/docker
1515
1616jobs :
6969 if [ "${{ matrix.container.base }}" != "" ]; then
7070 BASE_ARG="--build-arg BASE=${{ matrix.container.base }}"
7171 fi
72- docker build -t ${{ env.docker-registry-container-sha }} ${BASE_ARG} -f ${{ env.dockerfile }} .
72+ docker build -t ${{ env.docker-registry-container-sha }} --build-arg UID=$(id -u) --build-arg GID=$(id -g) ${BASE_ARG} -f ${{ env.dockerfile }} .
7373 docker tag ${{ env.docker-registry-container-sha }} ${{ env.docker-registry-container-latest }}
7474 docker push ${{ env.docker-registry-container-sha }}
7575 docker push ${{ env.docker-registry-container-latest }}
8585 matrix :
8686 platform :
8787 - name : " Linux (Xenial, GCC, OpenSSL)"
88+ id : xenial-gcc-openssl
8889 container :
8990 name : xenial
9091 env :
9394 CMAKE_OPTIONS : -DUSE_HTTPS=OpenSSL -DREGEX_BACKEND=builtin -DDEPRECATE_HARD=ON -DUSE_LEAK_CHECKER=valgrind -DUSE_GSSAPI=ON -DUSE_SSH=ON -DDEBUG_STRICT_ALLOC=ON -DDEBUG_STRICT_OPEN=ON
9495 os : ubuntu-latest
9596 - name : Linux (Xenial, GCC, mbedTLS)
97+ id : xenial-gcc-mbedtls
9698 container :
9799 name : xenial
98100 env :
@@ -101,6 +103,7 @@ jobs:
101103 CMAKE_OPTIONS : -DUSE_HTTPS=mbedTLS -DUSE_SHA1=HTTPS -DDEPRECATE_HARD=ON -DUSE_LEAK_CHECKER=valgrind -DUSE_GSSAPI=ON -DUSE_SSH=ON
102104 os : ubuntu-latest
103105 - name : " Linux (Xenial, Clang, OpenSSL)"
106+ id : xenial-clang-openssl
104107 container :
105108 name : xenial
106109 env :
@@ -109,6 +112,7 @@ jobs:
109112 CMAKE_OPTIONS : -DUSE_HTTPS=OpenSSL -DDEPRECATE_HARD=ON -DUSE_LEAK_CHECKER=valgrind -DUSE_GSSAPI=ON -DUSE_SSH=ON
110113 os : ubuntu-latest
111114 - name : " Linux (Xenial, Clang, mbedTLS)"
115+ id : xenial-clang-mbedtls
112116 container :
113117 name : xenial
114118 env :
@@ -117,6 +121,7 @@ jobs:
117121 CMAKE_GENERATOR : Ninja
118122 os : ubuntu-latest
119123 - name : " Linux (MemorySanitizer)"
124+ id : memorysanitizer
120125 container :
121126 name : focal
122127 env :
@@ -130,6 +135,7 @@ jobs:
130135 UBSAN_OPTIONS : print_stacktrace=1
131136 os : ubuntu-latest
132137 - name : " Linux (UndefinedBehaviorSanitizer)"
138+ id : ubsanitizer
133139 container :
134140 name : focal
135141 env :
@@ -143,6 +149,7 @@ jobs:
143149 UBSAN_OPTIONS : print_stacktrace=1
144150 os : ubuntu-latest
145151 - name : " Linux (ThreadSanitizer)"
152+ id : threadsanitizer
146153 container :
147154 name : focal
148155 env :
@@ -157,6 +164,7 @@ jobs:
157164 TSAN_OPTIONS : suppressions=/home/libgit2/source/script/thread-sanitizer.supp second_deadlock_stack=1
158165 os : ubuntu-latest
159166 - name : " macOS"
167+ id : macos
160168 os : macos-10.15
161169 env :
162170 CC : clang
@@ -166,6 +174,7 @@ jobs:
166174 SKIP_NEGOTIATE_TESTS : true
167175 setup-script : osx
168176 - name : " Windows (amd64, Visual Studio)"
177+ id : windows-amd64-vs
169178 os : windows-2019
170179 env :
171180 ARCH : amd64
@@ -174,6 +183,7 @@ jobs:
174183 SKIP_SSH_TESTS : true
175184 SKIP_NEGOTIATE_TESTS : true
176185 - name : " Windows (x86, Visual Studio)"
186+ id : windows-x86-vs
177187 os : windows-2019
178188 env :
179189 ARCH : x86
@@ -182,6 +192,7 @@ jobs:
182192 SKIP_SSH_TESTS : true
183193 SKIP_NEGOTIATE_TESTS : true
184194 - name : " Windows (amd64, mingw)"
195+ id : windows-amd64-mingw
185196 os : windows-2019
186197 setup-script : mingw
187198 env :
@@ -193,6 +204,7 @@ jobs:
193204 SKIP_SSH_TESTS : true
194205 SKIP_NEGOTIATE_TESTS : true
195206 - name : " Windows (x86, mingw)"
207+ id : windows-x86-mingw
196208 os : windows-2019
197209 setup-script : mingw
198210 env :
@@ -237,10 +249,12 @@ jobs:
237249 export GITTEST_NEGOTIATE_PASSWORD="${{ secrets.GITTEST_NEGOTIATE_PASSWORD }}"
238250
239251 if [ -n "${{ matrix.platform.container.name }}" ]; then
252+ mkdir build
240253 docker run \
241254 --rm \
242- --user libgit2:libgit2 \
255+ --user "$(id -u):$(id -g)" \
243256 -v "$(pwd)/source:/home/libgit2/source" \
257+ -v "$(pwd)/build:/home/libgit2/build" \
244258 -w /home/libgit2 \
245259 -e ASAN_SYMBOLIZER_PATH \
246260 -e CC \
@@ -255,13 +269,33 @@ jobs:
255269 -e TSAN_OPTIONS \
256270 -e UBSAN_OPTIONS \
257271 ${{ env.docker-registry-container-sha }} \
258- /bin/bash -c "mkdir build && cd build && ../source/ci/build.sh && ../source/ci/test.sh"
272+ /bin/bash -c "cd build && ../source/ci/build.sh && ../source/ci/test.sh"
259273 else
260- mkdir build && cd build
274+ mkdir build
275+ cd build
261276 ../source/ci/build.sh
262277 ../source/ci/test.sh
263278 fi
264279 shell : bash
280+ - name : Upload test results
281+ uses : actions/upload-artifact@v3
282+ if : success() || failure()
283+ with :
284+ name : test-results-${{ matrix.platform.id }}
285+ path : build/results_*.xml
286+
287+ test_results :
288+ name : Test results
289+ needs : [ build ]
290+ runs-on : ubuntu-latest
291+ steps :
292+ - name : Download test results
293+ uses : actions/download-artifact@v3
294+ - name : Generate test summary
295+ uses : test-summary/action@v1
296+ with :
297+ paths : ' test-results-*/*.xml'
298+
265299
266300 # Generate documentation using docurium. We'll upload the documentation
267301 # as a build artifact so that it can be reviewed as part of a pull
@@ -271,6 +305,7 @@ jobs:
271305 documentation :
272306 name : Generate documentation
273307 needs : [ containers ]
308+ if : success() || failure()
274309 runs-on : ubuntu-latest
275310 steps :
276311 - name : Check out repository
0 commit comments