Skip to content

Commit 437cf24

Browse files
author
Grok Compression
committed
ci: run full test suite in the Alpine (musl) job
Clone grok-test-data and build with BUILD_TESTING=ON + GRK_DATA_ROOT so the static musl job runs ctest like the other matrix jobs (replacing the build-only smoke check). Validated locally: 1730/1730 pass on Alpine musl.
1 parent e185914 commit 437cf24

1 file changed

Lines changed: 6 additions & 7 deletions

File tree

.github/workflows/build.yml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -186,27 +186,26 @@ jobs:
186186
- uses: actions/checkout@v4
187187
with:
188188
submodules: true
189-
- name: static build + smoke test in Alpine (musl) container
189+
- name: static build + test in Alpine (musl) container
190190
run: |
191191
docker run --rm -v "$PWD":/src -w /src alpine:3.20 sh -c '
192192
set -e
193193
apk add --no-cache build-base cmake git bash perl nasm linux-headers python3
194+
git clone --depth=1 --branch=master \
195+
https://github.com/GrokImageCompression/grok-test-data.git /tmp/grok-test-data
194196
cmake -S . -B build-alpine \
195197
-DCMAKE_BUILD_TYPE=Release \
196198
-DBUILD_SHARED_LIBS=OFF \
197-
-DBUILD_TESTING=OFF \
199+
-DBUILD_TESTING=ON \
198200
-DGRK_ENABLE_LIBCURL=OFF \
199201
-DGRK_BUILD_CODEC=ON \
202+
-DGRK_DATA_ROOT=/tmp/grok-test-data \
200203
-DCMAKE_EXE_LINKER_FLAGS=-static
201204
cmake --build build-alpine -j"$(nproc)"
202205
if ldd build-alpine/bin/grk_compress >/dev/null 2>&1; then
203206
echo "ERROR: grk_compress is not statically linked"; exit 1
204207
fi
205208
echo "confirmed fully static musl binary"
206-
printf "P5\n2 2\n255\n" > /tmp/t.pgm
207-
printf "\x00\x40\x80\xc0" >> /tmp/t.pgm
208-
./build-alpine/bin/grk_compress -i /tmp/t.pgm -o /tmp/t.jp2
209-
./build-alpine/bin/grk_decompress -i /tmp/t.jp2 -o /tmp/out.pgm
210-
echo "PNM round-trip OK on musl"
209+
ctest --test-dir build-alpine --output-on-failure
211210
'
212211

0 commit comments

Comments
 (0)