mirror of
https://github.com/haproxy/haproxy.git
synced 2026-04-08 18:36:18 -04:00
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.
This commit is contained in:
parent
06673291d7
commit
accc9003e8
2 changed files with 15 additions and 3 deletions
14
.github/actions/setup-vtest/action.yml
vendored
14
.github/actions/setup-vtest/action.yml
vendored
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
Loading…
Reference in a new issue