From: Alex Rousskov Date: Wed, 14 May 2025 14:28:51 +0000 (+0000) Subject: CI: Upgrade Ubuntu runners from v22.04 to v24.04 (#2064) X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a3863df73a58ca8f2513e447a15a56c8e266453b;p=thirdparty%2Fsquid.git CI: Upgrade Ubuntu runners from v22.04 to v24.04 (#2064) * Ubuntu 24.04 uses different apt sources file location and format. * Some Ubuntu 24.04 GitHub Actions runners lack libltdl-dev as detailed at https://github.com/actions/runner-images/issues/11316. We could explicitly install libltdl-dev for functionality tests, but decided to go one step further and unify all prerequisites installation steps for tests that build Squid on Ubuntu. Also added a hack to fix /etc/hosts broken on some Ubuntu runners and resulting in Squid startup errors during functionality tests: kid1| ERROR: ipcacheAddEntryFromHosts: Bad IP address '-e' --- diff --git a/.github/workflows/coverity-scan.yaml b/.github/workflows/coverity-scan.yaml index 5bc4f9a656..7515d1232c 100644 --- a/.github/workflows/coverity-scan.yaml +++ b/.github/workflows/coverity-scan.yaml @@ -17,7 +17,7 @@ jobs: # only run the workflow on Squid's main repository if: github.repository == 'squid-cache/squid' - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 # this job relies on GitHub repository secrets containing # username and password to access the Coverity Scan service diff --git a/.github/workflows/quick.yaml b/.github/workflows/quick.yaml index 1763bb7c65..bc2e3078e3 100644 --- a/.github/workflows/quick.yaml +++ b/.github/workflows/quick.yaml @@ -40,12 +40,23 @@ jobs: functionality-tests: - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: - - name: Install prerequisite packages + # XXX: A hack to fix Ubuntu runners that were created in April 2025. + - name: Fix /etc/hosts + run: | + cat /etc/hosts + cp -p /etc/hosts /tmp/etc-hosts.bak + sudo sed --in-place -E 's/^(-e.*)/# \1/' /etc/hosts + diff -u /tmp/etc-hosts.bak /etc/hosts || true + + - name: Install prerequisite Linux packages run: | + # required for "apt-get build-dep" to work + sudo sed --in-place -E 's/^(Types: deb)$/\1 deb-src/' /etc/apt/sources.list.d/ubuntu.sources sudo apt-get --quiet=2 update + sudo apt-get --quiet=2 build-dep squid sudo apt-get --quiet=2 install libtool-bin - name: Setup a nodejs environment @@ -83,7 +94,7 @@ jobs: source-maintenance-tests: - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: - name: Install prerequisite packages @@ -111,7 +122,7 @@ jobs: fail-fast: true matrix: os: - - ubuntu-22.04 + - ubuntu-24.04 compiler: - { CC: gcc, CXX: g++ } - { CC: clang, CXX: clang++ } @@ -133,7 +144,7 @@ jobs: - name: Install prerequisite Linux packages run: | # required for "apt-get build-dep" to work - sudo sed --in-place -E 's/# (deb-src.*updates main)/ \1/g' /etc/apt/sources.list + sudo sed --in-place -E 's/^(Types: deb)$/\1 deb-src/' /etc/apt/sources.list.d/ubuntu.sources sudo apt-get --quiet=2 update sudo apt-get --quiet=2 build-dep squid sudo apt-get --quiet=2 install linuxdoc-tools libtool-bin ${{ matrix.compiler.CC }} ccache valgrind @@ -159,17 +170,17 @@ jobs: CodeQL-tests: - runs-on: [ ubuntu-22.04 ] + runs-on: [ ubuntu-24.04 ] permissions: security-events: write steps: - - name: Install Squid prerequisite Linux packages + - name: Install prerequisite Linux packages run: | # required for "apt-get build-dep" to work - sudo sed --in-place -E 's/# (deb-src.*updates main)/ \1/g' /etc/apt/sources.list + sudo sed --in-place -E 's/^(Types: deb)$/\1 deb-src/' /etc/apt/sources.list.d/ubuntu.sources sudo apt-get --quiet=2 update sudo apt-get --quiet=2 build-dep squid sudo apt-get --quiet=2 install linuxdoc-tools libtool-bin diff --git a/.github/workflows/slow.yaml b/.github/workflows/slow.yaml index 55c08dee10..583ca7cedf 100644 --- a/.github/workflows/slow.yaml +++ b/.github/workflows/slow.yaml @@ -50,7 +50,7 @@ jobs: - { name: layer-01-minimal, nick: minimal } - { name: layer-02-maximus, nick: maximus } - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 container: image: squidcache/buildfarm-${{ matrix.os }}:stable options: --user 1001 # uid used by worfklow runner @@ -145,7 +145,7 @@ jobs: - 14.2 - 13.4 - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 name: freebsd(${{ matrix.osversion }}) steps: @@ -186,7 +186,7 @@ jobs: path: btlayer-*.log openbsd: - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: - name: Checkout Sources