CI: introduce scripts/build-vtest.sh for installing VTest

we install VTest for all CI systems, let us unify instalation
This commit is contained in:
Ilya Shipitsin 2021-05-15 11:46:15 +05:00 committed by Willy Tarreau
parent 18c7d83934
commit 0b03895620
5 changed files with 15 additions and 13 deletions

View File

@ -6,8 +6,7 @@ FreeBSD_task:
install_script:
- pkg update -f && pkg upgrade -y && pkg install -y openssl git gmake lua53 socat pcre
script:
- git clone https://github.com/VTest/VTest.git ../vtest
- make -C ../vtest
- scripts/build-vtest.sh
- gmake CC=clang V=1 ERR=1 TARGET=freebsd USE_ZLIB=1 USE_PCRE=1 USE_OPENSSL=1 USE_LUA=1 LUA_INC=/usr/local/include/lua53 LUA_LIB=/usr/local/lib LUA_LIB_NAME=lua-5.3
- ./haproxy -vv
- ldd haproxy

View File

@ -23,8 +23,7 @@ jobs:
- uses: actions/checkout@v1
- name: prepare VTest
run: |
git clone https://github.com/VTest/VTest.git ../vtest
make -C ../vtest FLAGS="-O2 -s -Wall"
scripts/build-vtest.sh
- name: build haproxy
run: |
make DEFINE="-DOPENSSL_API_COMPAT=0x10100000L -DOPENSSL_NO_DEPRECATED" -j3 CC=gcc ERR=1 TARGET=linux-glibc USE_OPENSSL=1

View File

@ -60,11 +60,7 @@ jobs:
brew install lua
- name: Install VTest
run: |
curl -fsSL https://github.com/vtest/VTest/archive/master.tar.gz -o VTest.tar.gz
mkdir VTest
tar xvf VTest.tar.gz -C VTest --strip-components=1
make -C VTest -j$(nproc) FLAGS="-O2 -s -Wall"
sudo install -m755 VTest/vtest /usr/local/bin/vtest
scripts/build-vtest.sh
- name: Install SSL ${{ matrix.ssl }}
if: ${{ matrix.ssl && matrix.ssl != 'stock' }}
run: env ${{ matrix.ssl }} scripts/build-ssl.sh
@ -101,7 +97,7 @@ jobs:
- name: Run VTest for HAProxy ${{ steps.show-version.outputs.version }}
id: vtest
# sudo is required, because macOS fails due to an open files limit.
run: sudo make reg-tests REGTESTS_TYPES=default,bug,devel
run: sudo make reg-tests VTEST_PROGRAM=../vtest/vtest REGTESTS_TYPES=default,bug,devel
- name: Show results
if: ${{ failure() }}
# The chmod / sudo is necessary due to the `sudo` while running the tests.

View File

@ -38,9 +38,7 @@ matrix:
if: type == cron
install:
- git clone https://github.com/VTest/VTest.git ../vtest
# Special flags due to: https://github.com/vtest/VTest/issues/12
- make -C ../vtest FLAGS="-O2 -s -Wall"
- scripts/build-vtest.sh
script:
- make -j$(nproc) ERR=1 TARGET=linux-glibc CC=$CC DEBUG=-DDEBUG_STRICT=1 $FLAGS

10
scripts/build-vtest.sh Executable file
View File

@ -0,0 +1,10 @@
#!/bin/sh
set -eux
curl -fsSL https://github.com/vtest/VTest/archive/master.tar.gz -o VTest.tar.gz
mkdir ../vtest
tar xvf VTest.tar.gz -C ../vtest --strip-components=1
# Special flags due to: https://github.com/vtest/VTest/issues/12
make -C ../vtest FLAGS="-O2 -s -Wall"