]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
CI: Build layers independently to speed up GitHub Actions tests (#1787)
authorFrancesco Chemolli <5175948+kinkie@users.noreply.github.com>
Sun, 5 May 2024 21:44:52 +0000 (21:44 +0000)
committerSquid Anubis <squid-anubis@squid-cache.org>
Sat, 11 May 2024 15:05:00 +0000 (15:05 +0000)
Adding a second matrix test dimension can decrease
testing wall time by about 75% by parallelizing tests

.github/workflows/default.yaml

index 06b05e786e240635989e7f18655af2999d2a163b..6f4e91053ed0226495d022e982c5c375e2fd1e60 100644 (file)
@@ -95,6 +95,11 @@ jobs:
       fail-fast: true
       matrix:
         os: [ ubuntu-22.04, macos-14 ]
+        layer:
+          - layer-00-default
+          - layer-01-minimal
+          - layer-02-maximus
+          - layer-04-noauth-everything
 
     runs-on: ${{ matrix.os }}
 
@@ -122,7 +127,7 @@ jobs:
 
       - name: Run build on Linux
         if: runner.os == 'Linux'
-        run: ./test-builds.sh
+        run: ./test-builds.sh ${{ matrix.layer }}
 
       - name: Run build on MacOS
         if: runner.os == 'macOS'
@@ -140,7 +145,7 @@ jobs:
           export CPPFLAGS="-I$HOMEBREW_PREFIX/include${CPPFLAGS:+ $CPPFLAGS}"
           export LDFLAGS="-L$HOMEBREW_PREFIX/lib${LDFLAGS:+ $LDFLAGS}"
           export CFLAGS="-Wno-compound-token-split-by-macro${CFLAGS:+ $CFLAGS}" # needed fir ltdl with Xcode
-          ./test-builds.sh
+          ./test-builds.sh ${{ matrix.layer }}
 
       - name: Publish build logs
         if: success() || failure()