diff options
author | Jia Tan <jiat0218@gmail.com> | 2023-11-22 21:20:12 +0800 |
---|---|---|
committer | Jia Tan <jiat0218@gmail.com> | 2023-11-30 20:09:46 +0800 |
commit | fd170e8557727bed6bec0518c16415064d972e4e (patch) | |
tree | 27315311c8b3efbc310db8240353116a64f10a7c /.github/workflows | |
parent | CI: Allow ci_build.sh to set a different C compiler. (diff) | |
download | xz-fd170e8557727bed6bec0518c16415064d972e4e.tar.xz |
CI: Test musl libc builds on Ubuntu runner.
Diffstat (limited to '.github/workflows')
-rw-r--r-- | .github/workflows/ci.yml | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0ab27beb..3ba089c5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -38,7 +38,7 @@ jobs: if: ${{ matrix.os == 'ubuntu-latest' && matrix.build_system == 'autotools' }} run: | sudo apt-get update - sudo apt-get install -y autoconf automake build-essential po4a autopoint gcc-multilib doxygen + sudo apt-get install -y autoconf automake build-essential po4a autopoint gcc-multilib doxygen musl-tools # Install Autotools on Mac - name: Install Dependencies @@ -50,7 +50,7 @@ jobs: if: ${{ matrix.os == 'ubuntu-latest' && matrix.build_system == 'cmake' }} run: | sudo apt-get update - sudo apt-get install -y build-essential cmake + sudo apt-get install -y build-essential cmake musl-tools # Install CMake on Mac - name: Install Dependencies @@ -93,6 +93,21 @@ jobs: ./build-aux/ci_build.sh -b autotools -p test -f "-fsanitize=address,undefined" -d ifunc,sandbox cd ../xz_build && make distclean + # musl libc has some slight differences compared to glibc, including + # the lack of ifunc support. This tests if the ifunc detection + # functions properly since musl-gcc can compile with ifunc support, + # but will fail at runtime. + - name: Build with musl libc + if: ${{ matrix.os == 'ubuntu-latest'}} + run: ./build-aux/ci_build.sh -b ${{ matrix.build_system }} -p build -m "/usr/bin/musl-gcc" + - name: Test with musl libc + if: ${{ matrix.os == 'ubuntu-latest'}} + run: | + ./build-aux/ci_build.sh -b ${{ matrix.build_system }} -p test -m "/usr/bin/musl-gcc" + - name: Clean up musl libc run + if: ${{ matrix.os == 'ubuntu-latest' && matrix.build_system == 'autotools' }} + run: cd ../xz_build && make distclean + - name: Build with full features run: ./build-aux/ci_build.sh -b ${{ matrix.build_system }} -p build - name: Test with full features |