]> git.ipfire.org Git - thirdparty/zlib-ng.git/commitdiff
CI: Preinstall packages needed for testing and benchmark.
authorHans Kristian Rosbach <hk-git@circlestorm.org>
Wed, 2 Apr 2025 19:42:45 +0000 (21:42 +0200)
committerHans Kristian Rosbach <hk-git@circlestorm.org>
Sat, 26 Jul 2025 18:38:20 +0000 (20:38 +0200)
Avoids having to compile gtest and google benchmark in every CI job.

To make sure we also test downloading and building ourself, don't
install for jobs that specify any matrix.packages.

.github/workflows/cmake.yml

index bf826381a3f1c9af51560867e6d62237625c3127..bf7c2a881351452ef34c33cc1e206b94fcbbbf5b 100644 (file)
@@ -646,7 +646,7 @@ jobs:
       run: sudo dpkg --add-architecture i386
 
     - name: Add ubuntu mirrors
-      if: runner.os == 'Linux' && matrix.packages && !contains(matrix.os, 'z15')
+      if: runner.os == 'Linux' && !contains(matrix.os, 'z15')
       # Github Actions caching proxy is at times unreliable
       run: |
         echo -e 'http://azure.archive.ubuntu.com/ubuntu\tpriority:1\n' | sudo tee /etc/apt/mirrors.txt
@@ -654,10 +654,11 @@ jobs:
         sudo sed -i 's#http://azure.archive.ubuntu.com/ubuntu/#mirror+file:/etc/apt/mirrors.txt#' /etc/apt/sources.list
 
     - name: Install packages (Ubuntu)
-      if: runner.os == 'Linux' && matrix.packages && !contains(matrix.os, 'z15')
+      if: runner.os == 'Linux' && !contains(matrix.os, 'z15')
       run: |
         sudo apt-get update
-        sudo apt-get install -y --allow-downgrades --no-install-recommends ${{ matrix.packages }}
+        sudo apt-get install -y --allow-downgrades --no-install-recommends \
+            ${{ matrix.packages || 'libgtest-dev libbenchmark-dev' }}
 
     - name: Install packages (Windows)
       if: runner.os == 'Windows'