Suppress clang-19 warning when building tests with C++17. Add clang-19 in CI. #1612
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: linux | |
on: | |
push: | |
branches: | |
- master | |
paths-ignore: | |
- '**.md' | |
- 'docs/**' | |
pull_request: | |
branches: | |
- master | |
paths-ignore: | |
- '**.md' | |
- 'docs/**' | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
cxx: [ g++-8, g++-10 ] | |
build_type: [ Debug, Release ] | |
std: [ 17 ] | |
os: [ ubuntu-20.04 ] | |
with_tests: [ ON ] | |
include: | |
# Build and with g++8 | |
- cxx: g++-8 | |
std: 17 | |
os: ubuntu-20.04 | |
with_tests: ON | |
install: sudo apt -o Acquire::Retries=5 install g++-8 | |
- cxx: g++-13 | |
build_type: Release | |
std: 23 | |
os: ubuntu-20.04 | |
with_tests: ON | |
install: sudo apt -o Acquire::Retries=5 install g++-13 | |
- cxx: g++-13 | |
build_type: Debug | |
std: 23 | |
os: ubuntu-20.04 | |
with_tests: ON | |
install: sudo apt -o Acquire::Retries=5 install g++-13 | |
# Builds the examples with no exceptions | |
- cxx: g++-10 | |
build_type: Release | |
std: 17 | |
os: ubuntu-20.04 | |
with_tests: OFF | |
cmake_options: -DQUILL_NO_EXCEPTIONS=ON -DQUILL_BUILD_TESTS=ON | |
# Build and test with valgrind | |
- cxx: g++-10 | |
build_type: Release | |
std: 20 | |
os: ubuntu-20.04 | |
with_tests: ON | |
cmake_options: -DQUILL_USE_VALGRIND=ON | |
ctest_options: -T memcheck | |
install: sudo apt -o Acquire::Retries=5 install valgrind | |
# Build and test address sanitizers | |
- cxx: clang++-12 | |
build_type: Release | |
std: 20 | |
os: ubuntu-20.04 | |
with_tests: ON | |
cmake_options: -DQUILL_SANITIZE_ADDRESS=ON | |
# Build and test thread sanitizers | |
- cxx: clang++-12 | |
build_type: Release | |
std: 20 | |
os: ubuntu-20.04 | |
with_tests: ON | |
cmake_options: -DQUILL_SANITIZE_THREAD=ON | |
# Build with modern clang version | |
- cxx: clang++-19 | |
build_type: Release | |
std: 17 | |
os: ubuntu-20.04 | |
with_tests: ON | |
install: | | |
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - | |
sudo add-apt-repository "deb http://apt.llvm.org/focal/ llvm-toolchain-focal-19 main" | |
sudo apt-get update | |
for i in {1..3}; do | |
sudo apt-get -o Acquire::Retries=3 install -y clang-19 libc++-19-dev libc++abi-19-dev && break || sleep 15 | |
done | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Add repositories for newer GCC | |
run: | | |
sudo apt-add-repository ppa:ubuntu-toolchain-r/test | |
if: ${{ matrix.cxx == 'g++-13' }} | |
- name: Create Build Environment | |
run: | | |
sudo apt-get update | |
${{matrix.install}} | |
if [[ "${{matrix.cxx}}" == "clang++-19" ]]; then | |
sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-19 100 | |
sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-19 100 | |
fi | |
cmake -E make_directory ${{runner.workspace}}/build | |
- name: Configure | |
working-directory: ${{runner.workspace}}/build | |
env: | |
CXX: ${{matrix.cxx}} | |
CXXFLAGS: ${{matrix.cxxflags}} | |
run: | | |
cmake -DCMAKE_BUILD_TYPE=${{matrix.build_type}} ${{matrix.cmake_options}} \ | |
-DCMAKE_CXX_STANDARD=${{matrix.std}} -DQUILL_BUILD_TESTS=${{matrix.with_tests}} \ | |
-DQUILL_BUILD_EXAMPLES=ON -DQUILL_VERBOSE_MAKEFILE=ON $GITHUB_WORKSPACE | |
- name: Build | |
working-directory: ${{runner.workspace}}/build | |
run: | | |
threads=`nproc` | |
cmake --build . --config ${{matrix.build_type}} --parallel $threads | |
- name: Test | |
working-directory: ${{runner.workspace}}/build | |
run: | | |
threads=`nproc` | |
ctest --build-config ${{matrix.build_type}} ${{matrix.ctest_options}} --parallel $threads --output-on-failure | |
env: | |
CTEST_OUTPUT_ON_FAILURE: True |