Merge pull request #204 from offa/clang19 #150
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: ci | |
on: [push, pull_request] | |
jobs: | |
build_linux: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
build_config: | |
- { compiler: gcc, version: 14 } | |
- { compiler: gcc, version: 13 } | |
- { compiler: gcc, version: 12 } | |
- { compiler: gcc, version: 11 } | |
- { compiler: gcc, version: 10 } | |
- { compiler: gcc, version: 9 } | |
- { compiler: clang, version: 19 } | |
- { compiler: clang, version: 18 } | |
- { compiler: clang, version: 17 } | |
- { compiler: clang, version: 16 } | |
- { compiler: clang, version: 15 } | |
- { compiler: clang, version: 14 } | |
- { compiler: clang, version: 13 } | |
- { compiler: clang, version: 12 } | |
- { compiler: clang, version: 11 } | |
- { compiler: gcc, version: 10, args: "-DDEFLATE_SUPPORT=OFF" } | |
container: | |
image: ${{ matrix.build_config.compiler == 'clang' && 'teeks99/clang-ubuntu' || matrix.build_config.compiler }}:${{ matrix.build_config.version }} | |
env: | |
JOBS: 2 | |
name: "${{ matrix.build_config.compiler }}-${{ matrix.build_config.version }} ${{ matrix.build_config.args }}" | |
steps: | |
- uses: actions/checkout@main | |
- name: Setup Clang | |
if: matrix.build_config.compiler == 'clang' | |
run: | | |
scripts/ci_setup_clang.sh ${{ matrix.build_config.version }} | |
echo "CXXFLAGS=-stdlib=libc++" >> $GITHUB_ENV | |
echo "CC=clang-${{ matrix.build_config.version }}" >> $GITHUB_ENV | |
echo "CXX=clang++-${{ matrix.build_config.version }}" >> $GITHUB_ENV | |
- name: Setup | |
run: apt-get update && apt-get install -y cmake valgrind zlib1g-dev git | |
- name: Build | |
run: | | |
cmake . -Bbuild -DCMAKE_BUILD_TYPE=Release -DCOVERAGE=ON ${{ matrix.build_config.args }} | |
cmake --build build -- -j${JOBS} | |
- name: Test | |
run: | | |
cd build | |
cmake --build . --target test | |
ctest -D ExperimentalBuild -j${JOBS} | |
ctest -D ExperimentalMemCheck -j${JOBS} | |
- name: CodeCov | |
uses: codecov/codecov-action@v4 | |
with: | |
gcov: true | |
build_msvc: | |
runs-on: windows-latest | |
strategy: | |
matrix: | |
build_config: | |
- {args: "-DDEFLATE_SUPPORT=OFF", config: "Debug"} | |
steps: | |
- uses: actions/checkout@main | |
- name: Build | |
run: | | |
cmake . -Bbuild ${{ matrix.build_config.args }} | |
cmake --build build --parallel --config ${{ matrix.build_config.config }} | |
- name: Test | |
run: | | |
cd build | |
ctest -C ${{ matrix.build_config.config }} |