Commit c6416100e8e2418608b093682be306771134ff63

Edward Thomson 2022-04-20T09:11:29

ci: map the build folder in container builds Now that the containers all set the user id of the libgit2 build user to the user id of the host runner, we can write to a shared build output volume.

diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index 774381f..16428be 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -237,10 +237,12 @@ jobs:
         export GITTEST_NEGOTIATE_PASSWORD="${{ secrets.GITTEST_NEGOTIATE_PASSWORD }}"
 
         if [ -n "${{ matrix.platform.container.name }}" ]; then
+          mkdir build
           docker run \
               --rm \
               --user libgit2:libgit2 \
               -v "$(pwd)/source:/home/libgit2/source" \
+              -v "$(pwd)/build:/home/libgit2/build" \
               -w /home/libgit2 \
               -e ASAN_SYMBOLIZER_PATH \
               -e CC \
@@ -255,9 +257,10 @@ jobs:
               -e TSAN_OPTIONS \
               -e UBSAN_OPTIONS \
               ${{ env.docker-registry-container-sha }} \
-              /bin/bash -c "mkdir build && cd build && ../source/ci/build.sh && ../source/ci/test.sh"
+              /bin/bash -c "cd build && ../source/ci/build.sh && ../source/ci/test.sh"
         else
-          mkdir build && cd build
+          mkdir build
+          cd build
           ../source/ci/build.sh
           ../source/ci/test.sh
         fi