diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7e267e6e..6e6bc6a2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -110,4 +110,105 @@ jobs: - name: Build and test distribution run: make distcheck + test-musl: + runs-on: ubuntu-latest + container: alpine:latest + steps: + - uses: actions/checkout@v4 + + - name: Install dependencies + run: | + apk add --no-cache \ + build-base \ + autoconf \ + automake \ + perl \ + patch \ + diffutils \ + xmlto \ + pcre2-dev \ + bash \ + git \ + coreutils \ + python3 + + - name: Clone gnulib for bootstrap + run: | + git clone --depth 1 https://git.savannah.gnu.org/git/gnulib.git /tmp/gnulib + + - name: Bootstrap + run: | + export PATH="/tmp/gnulib:$PATH" + ./bootstrap + + - name: Configure + run: ./configure --with-pcre2 + + - name: Build + run: make -j$(nproc) + + - name: Run tests + run: make check + + - name: Show test results on failure + if: failure() + run: | + echo "=== Test logs ===" + find . -name "*.log" -type f -exec echo "=== {} ===" \; -exec cat {} \; + echo "=== Test arena contents ===" + find test-arena -type f 2>/dev/null | head -20 | while read f; do + echo "=== $f ===" + cat "$f" 2>/dev/null || echo "Cannot read file" + done + + test-musl-without-pcre2: + runs-on: ubuntu-latest + container: alpine:latest + steps: + - uses: actions/checkout@v4 + + - name: Install dependencies (without PCRE2) + run: | + apk add --no-cache \ + build-base \ + autoconf \ + automake \ + perl \ + patch \ + diffutils \ + xmlto \ + bash \ + git \ + coreutils \ + python3 + + - name: Clone gnulib for bootstrap + run: | + git clone --depth 1 https://git.savannah.gnu.org/git/gnulib.git /tmp/gnulib + + - name: Bootstrap + run: | + export PATH="/tmp/gnulib:$PATH" + ./bootstrap + + - name: Configure without PCRE2 + run: ./configure --without-pcre2 + + - name: Build + run: make -j$(nproc) + + - name: Run tests + run: make check + + - name: Show test results on failure + if: failure() + run: | + echo "=== Test logs ===" + find . -name "*.log" -type f -exec echo "=== {} ===" \; -exec cat {} \; + echo "=== Test arena contents ===" + find test-arena -type f 2>/dev/null | head -20 | while read f; do + echo "=== $f ===" + cat "$f" 2>/dev/null || echo "Cannot read file" + done +