From 9d1c5b108ce96cc61604a3d8b49a171b8a293fed Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Wed, 27 Nov 2024 02:15:08 +0100 Subject: [PATCH] Stop using checkout and other actions for Ubuntu 18.04 CI builds Even actions/checkout@v3 doesn't work in the container any longer, because none of JS actions can run on Ubuntu 18.04 which doesn't have a new enough glibc version any longer, so perform the checkout manually. Disable ccache for the builds using this OS too for the same reason: even though we could install ccache itself manually too, we don't have any easy way to save and restore its cache without this action. This also means that we can use v4 of the action for the other builds. --- .github/workflows/ci.yml | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 67162ecf2a..efd713a77f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -159,6 +159,18 @@ jobs: # - xvfb is used for running the GUI tests. apt-get update -qq apt-get install -qq coreutils ${compiler-g++} git locales make pkg-config python3 python3-pip sudo xvfb + + # Checkout action doesn't work under Ubuntu 18.04 any more, so + # run checkout manually. + git config --global --add safe.directory $GITHUB_WORKSPACE + git config --global gc.auto 0 + git init $GITHUB_WORKSPACE + cd $GITHUB_WORKSPACE + git remote add origin $GITHUB_SERVER_URL/$GITHUB_REPOSITORY + git fetch --depth=1 origin $GITHUB_REF + git checkout FETCH_HEAD + git submodule update --init --depth=1 --recursive + git log -1 --format='%H' ;; '') @@ -170,11 +182,13 @@ jobs: esac - name: Checkout - uses: actions/checkout@v3 + if: matrix.container == '' + uses: actions/checkout@v4 with: submodules: 'recursive' - name: Install CCache + if: matrix.container == '' uses: hendrikmuhs/ccache-action@v1.2.3 with: key: ${{ matrix.name }} @@ -245,7 +259,7 @@ jobs: echo echo "ccache version:" - ccache --version + ccache --version || echo "ccache not available" echo - name: Configuring