From: William Lallemand Date: Tue, 7 Apr 2026 16:05:14 +0000 (+0200) Subject: CI: VTest build with git clone + cache X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=accc9003e84818d5c37c184f3f26fb09bcda80eb;p=thirdparty%2Fhaproxy.git CI: VTest build with git clone + cache The VTest2 tarball URL at code.vinyl-cache.org/vtest/VTest2/archive/main.tar.gz no longer works. Switch scripts/build-vtest.sh to use a git clone of the repository instead. Add a cache step in the setup-vtest CI action so VTest is only rebuilt when its HEAD commit changes, keyed on the runner OS and the VTest2 HEAD SHA. --- diff --git a/.github/actions/setup-vtest/action.yml b/.github/actions/setup-vtest/action.yml index 0d9d85e24..c39c33207 100644 --- a/.github/actions/setup-vtest/action.yml +++ b/.github/actions/setup-vtest/action.yml @@ -20,7 +20,21 @@ runs: ulimit -n 65536 ulimit -c unlimited + - name: Get VTest latest commit SHA + id: vtest-sha + shell: bash + run: | + echo "sha=$(git ls-remote https://code.vinyl-cache.org/vtest/VTest2 HEAD | cut -f1)" >> $GITHUB_OUTPUT + + - name: Cache VTest + id: cache-vtest + uses: actions/cache@v4 + with: + path: ${{ github.workspace }}/../vtest + key: vtest-${{ runner.os }}-${{ steps.vtest-sha.outputs.sha }} + - name: Install VTest + if: steps.cache-vtest.outputs.cache-hit != 'true' shell: bash run: | scripts/build-vtest.sh diff --git a/scripts/build-vtest.sh b/scripts/build-vtest.sh index 9fc0c89ed..18ac42803 100755 --- a/scripts/build-vtest.sh +++ b/scripts/build-vtest.sh @@ -4,9 +4,7 @@ DESTDIR=${DESTDIR:-${PWD}/../vtest/} TMPDIR=${TMPDIR:-$(mktemp -d)} set -eux -curl -fsSL "https://code.vinyl-cache.org/vtest/VTest2/archive/main.tar.gz" -o "${TMPDIR}/VTest.tar.gz" -mkdir -p "${TMPDIR}/vtest" -tar xvf ${TMPDIR}/VTest.tar.gz -C "${TMPDIR}/vtest" --strip-components=1 +git clone https://code.vinyl-cache.org/vtest/VTest2 "${TMPDIR}/vtest" # Special flags due to: https://github.com/vtest/VTest/issues/12 # Note: do not use "make -C ../vtest", otherwise MAKEFLAGS contains "w"