Ilya Shipitsin | b89c0e4 | 2021-06-12 15:46:29 +0500 | [diff] [blame] | 1 | name: alpine/musl |
| 2 | |
Tim Duesterhus | 662896e | 2021-10-16 18:10:27 +0200 | [diff] [blame] | 3 | on: |
| 4 | push: |
Ilya Shipitsin | b89c0e4 | 2021-06-12 15:46:29 +0500 | [diff] [blame] | 5 | |
Tim Duesterhus | 89c9d0a | 2021-10-16 18:10:26 +0200 | [diff] [blame] | 6 | permissions: |
| 7 | contents: read |
| 8 | |
Ilya Shipitsin | b89c0e4 | 2021-06-12 15:46:29 +0500 | [diff] [blame] | 9 | jobs: |
| 10 | musl: |
| 11 | name: gcc |
| 12 | runs-on: ubuntu-latest |
| 13 | container: |
| 14 | image: alpine:latest |
William Lallemand | 6435801 | 2022-10-20 15:01:01 +0200 | [diff] [blame] | 15 | options: --privileged --ulimit core=-1 --security-opt seccomp=unconfined |
| 16 | volumes: |
| 17 | - /tmp/core:/tmp/core |
Ilya Shipitsin | b89c0e4 | 2021-06-12 15:46:29 +0500 | [diff] [blame] | 18 | steps: |
William Lallemand | 6435801 | 2022-10-20 15:01:01 +0200 | [diff] [blame] | 19 | - name: Setup coredumps |
| 20 | run: | |
| 21 | ulimit -c unlimited |
| 22 | echo '/tmp/core/core.%h.%e.%t' > /proc/sys/kernel/core_pattern |
Tim Duesterhus | 5f4ddb5 | 2022-04-09 22:08:41 +0200 | [diff] [blame] | 23 | - uses: actions/checkout@v3 |
Tim Duesterhus | 662896e | 2021-10-16 18:10:27 +0200 | [diff] [blame] | 24 | - name: Install dependencies |
William Lallemand | 6435801 | 2022-10-20 15:01:01 +0200 | [diff] [blame] | 25 | 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 Duesterhus | 662896e | 2021-10-16 18:10:27 +0200 | [diff] [blame] | 26 | - name: Install VTest |
| 27 | run: scripts/build-vtest.sh |
| 28 | - name: Build |
William Lallemand | 6435801 | 2022-10-20 15:01:01 +0200 | [diff] [blame] | 29 | 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 Duesterhus | 662896e | 2021-10-16 18:10:27 +0200 | [diff] [blame] | 30 | - 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 Lallemand | 6435801 | 2022-10-20 15:01:01 +0200 | [diff] [blame] | 40 | - 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 Duesterhus | 662896e | 2021-10-16 18:10:27 +0200 | [diff] [blame] | 49 | - 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 |