blob: 930a22e018d2726bff650d15ef97b88ae2d6d4e0 [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 Duesterhus425ed652023-09-06 16:57:29 +020023 - uses: actions/checkout@v4
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: |
Ilya Shipitsin2bfeaf62023-09-06 19:04:48 +020043 failed=false
William Lallemand64358012022-10-20 15:01:01 +020044 ls /tmp/core/
45 for file in /tmp/core/core.*; do
Ilya Shipitsin2bfeaf62023-09-06 19:04:48 +020046 failed=true
William Lallemand64358012022-10-20 15:01:01 +020047 printf "::group::"
48 gdb -ex 'thread apply all bt full' ./haproxy $file
49 echo "::endgroup::"
50 done
Ilya Shipitsin2bfeaf62023-09-06 19:04:48 +020051 if [ "$failed" = true ]; then
52 exit 1;
53 fi
Tim Duesterhus662896e2021-10-16 18:10:27 +020054 - name: Show results
55 if: ${{ failure() }}
56 run: |
57 for folder in /tmp/haregtests-*/vtc.*; do
58 printf "::group::"
59 cat $folder/INFO
60 cat $folder/LOG
61 echo "::endgroup::"
62 done