Skip to content

CI builds: Add Clang 18, remove GCC 7/8 #143

CI builds: Add Clang 18, remove GCC 7/8

CI builds: Add Clang 18, remove GCC 7/8 #143

Workflow file for this run

name: ci
on: [push, pull_request]
jobs:
build_linux:
runs-on: ubuntu-latest
strategy:
matrix:
build_config:
- { compiler: gcc, version: 13 }
- { compiler: gcc, version: 12 }
- { compiler: gcc, version: 11 }
- { compiler: gcc, version: 10 }
- { compiler: gcc, version: 9 }
- { 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@v3
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 }}