From: Hans Kristian Rosbach Date: Wed, 2 Apr 2025 19:42:45 +0000 (+0200) Subject: CI: Preinstall packages needed for testing and benchmark. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5ab093eebbeba3b2b5bdbf30a861f626dd39130b;p=thirdparty%2Fzlib-ng.git CI: Preinstall packages needed for testing and benchmark. 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. --- diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index ddfb5268..4ad41af6 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -653,7 +653,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 @@ -661,10 +661,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'