CI: VTest build with git clone + cache
Some checks are pending
Contrib / build (push) Waiting to run
alpine/musl / gcc (push) Waiting to run
VTest / Generate Build Matrix (push) Waiting to run
VTest / (push) Blocked by required conditions
Windows / Windows, gcc, all features (push) Waiting to run

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.
This commit is contained in:
William Lallemand 2026-04-07 18:05:14 +02:00
parent 06673291d7
commit accc9003e8
2 changed files with 15 additions and 3 deletions

View file

@ -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

View file

@ -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"