Skip to content

Testrules

Testrules #21

name: Minimal Linux CI build
on:
pull_request:
branches:
- cleanup
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Clang
uses: egor-tensin/setup-clang@v1
with:
version: latest
- name: Prepare build (gcc, c++17)
run: cmake -S . -B build -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER=g++
- name: Build (gcc, c++17)
run: cmake --build build --target all --config Release -- -j4
- name: Run tests
run: ctest --test-dir build
- name: Build with Clang (c++17)
run: |
cmake -S . -B build -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER=clang++
cmake --build build --target all --config Release -- -j4
- name: Build with gcc (c++20)
run: |
cmake -S . -B build -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_STANDARD=20 -DCMAKE_CXX_COMPILER=g++
cmake --build build --target all --config Release -- -j4