Skip to content

Commit

Permalink
github: test build on alpine:latest for musl
Browse files Browse the repository at this point in the history
  • Loading branch information
thom311 committed Aug 3, 2023
1 parent dcc4c0a commit 2f210d9
Showing 1 changed file with 62 additions and 2 deletions.
64 changes: 62 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ jobs:
./configure
make -j 5
shell: bash

- name: Build Unit Tests
run: make -j 5 check-progs

Expand All @@ -90,17 +91,17 @@ jobs:
set -x
export NLTST_SEED_RAND=
for i in `seq 1 5`; do
tests/check-all
tests/check-direct
tests/check-all
make -j check
done
- name: Run Unit Tests w/Valgrind
run: |
set -x
export NLTST_SEED_RAND=
CK_FORK=no libtool --mode=execute valgrind --error-exitcode=66 --leak-check=full -s --show-leak-kinds=all ./tests/check-all
CK_FORK=no libtool --mode=execute valgrind --error-exitcode=66 --leak-check=full -s --show-leak-kinds=all ./tests/check-direct
CK_FORK=no libtool --mode=execute valgrind --error-exitcode=66 --leak-check=full -s --show-leak-kinds=all ./tests/check-all
shell: bash

- name: Install packages for Release
Expand Down Expand Up @@ -152,3 +153,62 @@ jobs:
make -j 5 V=1
- run: echo "🍏 This job's status is ${{ job.status }}."

ci-alpine:
runs-on: ubuntu-latest
container:
image: alpine:latest
steps:
- name: Install packages
run: |
apk add \
autoconf \
automake \
bash \
bison \
check-dev \
flex \
gcc \
git \
libtool \
linux-headers \
make \
musl-dev \
pkgconfig
- name: Check out repository code
uses: actions/checkout@v3

- name: Setup git
run: |
git config --global --add safe.directory "$PWD"
- name: Build
run: |
set -x
export CC="${{ matrix.cc }}"
export CFLAGS="-DNL_MORE_ASSERTS=1000 -O2 -Werror -Wall -Wdeclaration-after-statement -Wvla -std=gnu11"
if [ "$CC" = "clang" ]; then
CFLAGS="$CFLAGS -Wno-error=unused-command-line-argument -Wno-error=unused-function"
export LDFLAGS="-Wl,--no-undefined-version,--fatal-warnings"
else
export LDFLAGS="-Wl,--no-undefined-version"
fi
./autogen.sh
./configure
make -j 5
make -j 5 check-progs
- name: Run Unit Tests
run: |
set -x
export NLTST_SEED_RAND=
for i in `seq 1 5`; do
tests/check-direct
# unshare() does not work (EPERM). This test currently cannot pass
# (odd).
# tests/check-all
# make -j check
done

0 comments on commit 2f210d9

Please sign in to comment.