Skip to content

Cleanup

Cleanup #103

Workflow file for this run

name: CI
on: [ pull_request ]
jobs:
build:
strategy:
fail-fast: false
matrix:
config:
# These get queued but never actually run
#- name: macos-x64-gcc,
# os: macos-13.5,
# cxx: g++,
#- name: macos-x64-clang,
# os: macos-13.5,
# cxx: clang++,
- name: linux-x64-clang-14
os: ubuntu-22.04
cxx: clang++-14
- name: linux-x64-clang-15
os: ubuntu-22.04
cxx: clang++-15
- name: linux-x64-clang-16-sanitize
os: ubuntu-22.04
cxx: clang++-16
cxx-flags: -fsanitize=undefined -fsanitize=address -fno-omit-frame-pointer -fno-optimize-sibling-calls
- name: linux-x64-gcc-11-coverage
os: ubuntu-22.04
cxx: g++-11
cxx-flags: --coverage
gcov-tool: gcov-11
- name: linux-x64-gcc-12
os: ubuntu-22.04
cxx: g++-12
- name: linux-x64-gcc-13
os: ubuntu-22.04
cxx: g++-13
runs-on: ${{matrix.config.os}}
steps:
- name: Add Repos for for gcc-13 and clang-16
run: |
# gcc-13
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
# clang-16
source /etc/os-release
echo "deb http://apt.llvm.org/${UBUNTU_CODENAME}/ llvm-toolchain-${UBUNTU_CODENAME}-16 main" | sudo tee /etc/apt/sources.list.d/llvm-16.list
curl https://apt.llvm.org/llvm-snapshot.gpg.key | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/llvm-16.gpg > /dev/null
sudo apt-get update -y
if: runner.os == 'Linux'
- name: Install compiler
id: install_cc
uses: rlalik/setup-cpp-compiler@v1.2
with:
compiler: ${{ matrix.config.cxx }}
if: runner.os == 'Linux'
- name: Check out sources
uses: actions/checkout@v3
- name: Install boost (Linux)
run: sudo apt-get install -y libboost-dev
if: runner.os == 'Linux'
- name: Install boost (macOS)
run: vcpkg install boost-interprocess
if: runner.os == 'macOS'
- name: Configure CMake (Linux)
run: cmake -DBUILD_TESTING=ON -DCMAKE_BUILD_TYPE=Debug -B build
env:
CXX: ${{matrix.config.cxx}}
CXXFLAGS: ${{matrix.config.cxx-flags}}
if: runner.os == 'Linux'
- name: Configure CMake (macOS)
run: cmake -DBUILD_TESTING=ON -DCMAKE_BUILD_TYPE=Debug -DCMAKE_TOOLCHAIN_FILE="$VCPKG_INSTALLATION_ROOT/scripts/buildsystems/vcpkg.cmake" -B build
env:
CXX: ${{matrix.config.cxx}}
CXXFLAGS: ${{matrix.config.cxx-flags}}
if: runner.os == 'macOS'
- name: Build
working-directory: build
run: cmake --build . --verbose --parallel 2
if: runner.os == 'Linux' || runner.os == 'macOS'
- name: Test
working-directory: build
run: ctest --parallel 2 --verbose
if: runner.os == 'Linux' || runner.os == 'macOS'
- name: Coverage
run: |
sudo apt-get install -y lcov
lcov -c -b ${{github.workspace}}/include -d ${{github.workspace}}/build -o ${{github.workspace}}/coverage.info --no-external --gcov-tool ${{matrix.config.gcov-tool}}
bash <(curl -s https://codecov.io/bash) -f ${{github.workspace}}/coverage.info
if: ${{matrix.config.name == 'linux-x64-gcc-11-coverage'}}