blob: 8eb8310fd82b1f2f115d8f355785c14bbea6b23a [file] [log] [blame]
Ilya Shipitsinb89c0e42021-06-12 15:46:29 +05001name: alpine/musl
2
Tim Duesterhus662896e2021-10-16 18:10:27 +02003on:
4 push:
Ilya Shipitsinb89c0e42021-06-12 15:46:29 +05005
Tim Duesterhus89c9d0a2021-10-16 18:10:26 +02006permissions:
7 contents: read
8
Ilya Shipitsinb89c0e42021-06-12 15:46:29 +05009jobs:
10 musl:
11 name: gcc
12 runs-on: ubuntu-latest
13 container:
14 image: alpine:latest
William Lallemand64358012022-10-20 15:01:01 +020015 options: --privileged --ulimit core=-1 --security-opt seccomp=unconfined
16 volumes:
17 - /tmp/core:/tmp/core
Ilya Shipitsinb89c0e42021-06-12 15:46:29 +050018 steps:
William Lallemand64358012022-10-20 15:01:01 +020019 - name: Setup coredumps
20 run: |
21 ulimit -c unlimited
22 echo '/tmp/core/core.%h.%e.%t' > /proc/sys/kernel/core_pattern
Tim Duesterhus5f4ddb52022-04-09 22:08:41 +020023 - uses: actions/checkout@v3
Tim Duesterhus662896e2021-10-16 18:10:27 +020024 - name: Install dependencies
William Lallemand64358012022-10-20 15:01:01 +020025 run: apk add gcc gdb make tar git python3 libc-dev linux-headers pcre-dev pcre2-dev openssl-dev lua5.3-dev grep socat curl musl-dbg lua5.3-dbg
Tim Duesterhus662896e2021-10-16 18:10:27 +020026 - name: Install VTest
27 run: scripts/build-vtest.sh
28 - name: Build
William Lallemand64358012022-10-20 15:01:01 +020029 run: make -j$(nproc) TARGET=linux-musl DEBUG_CFLAGS='-ggdb3' CC=cc V=1 USE_LUA=1 LUA_INC=/usr/include/lua5.3 LUA_LIB=/usr/lib/lua5.3 USE_OPENSSL=1 USE_PCRE2=1 USE_PCRE2_JIT=1 USE_PROMEX=1
Tim Duesterhus662896e2021-10-16 18:10:27 +020030 - name: Show version
31 run: ./haproxy -vv
32 - name: Show linked libraries
33 run: ldd haproxy
34 - name: Install problem matcher for VTest
35 # This allows one to more easily see which tests fail.
36 run: echo "::add-matcher::.github/vtest.json"
37 - name: Run VTest
38 id: vtest
39 run: make reg-tests VTEST_PROGRAM=../vtest/vtest REGTESTS_TYPES=default,bug,devel
William Lallemand64358012022-10-20 15:01:01 +020040 - name: Show coredumps
41 if: ${{ failure() && steps.vtest.outcome == 'failure' }}
42 run: |
43 ls /tmp/core/
44 for file in /tmp/core/core.*; do
45 printf "::group::"
46 gdb -ex 'thread apply all bt full' ./haproxy $file
47 echo "::endgroup::"
48 done
Tim Duesterhus662896e2021-10-16 18:10:27 +020049 - name: Show results
50 if: ${{ failure() }}
51 run: |
52 for folder in /tmp/haregtests-*/vtc.*; do
53 printf "::group::"
54 cat $folder/INFO
55 cat $folder/LOG
56 echo "::endgroup::"
57 done
58 shopt -s nullglob