feat: testing ci c++17, c++20, c++23 aswell as gcc and clang #1
Workflow file for this run
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: Ubuntu 22.04 | |
on: | |
push: | |
branches: | |
- 'main' | |
pull_request: | |
workflow_dispatch: | |
concurrency: | |
group: ubuntu2204-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: ${{ github.event_name != 'push' }} | |
env: | |
TZ: Europe/Berlin | |
defaults: | |
run: | |
shell: bash -Eexuo pipefail {0} | |
jobs: | |
build: | |
name: ${{ matrix.name }} | |
runs-on: ubuntu-22.04 | |
timeout-minutes: 120 | |
strategy: | |
fail-fast: true | |
matrix: | |
include: | |
- name: "gcc12 (c++17)" | |
compiler: "gcc-12" | |
build_type: Release | |
cpp: 17 | |
- name: "gcc11 (c++17)" | |
compiler: "gcc-11" | |
build_type: Release | |
cpp: 17 | |
- name: "gcc10 (c++17)" | |
compiler: "gcc-10" | |
build_type: Release | |
cpp: 17 | |
- name: "clang14 (c++17)" | |
compiler: "clang-14" | |
build_type: Release | |
cpp: 17 | |
- name: "clang17 (c++23)" | |
compiler: "clang-17" | |
build_type: Release | |
cpp: 23 | |
- name: "gcc12 (c++20)" | |
compiler: "gcc-12" | |
build_type: Release | |
cpp: 20 | |
- name: "gcc11 (c++20)" | |
compiler: "gcc-11" | |
build_type: Release | |
cpp: 20 | |
- name: "gcc10 (c++20)" | |
compiler: "gcc-10" | |
build_type: Release | |
cpp: 20 | |
- name: "gcc12 (c++23)" | |
compiler: "gcc-12" | |
build_type: Release | |
cpp: 23 | |
- name: "gcc12 (c++20, Debug)" | |
compiler: "gcc-12" | |
build_type: Debug | |
cpp: 20 | |
steps: | |
- name: Checkout cwl-cpp-auto | |
uses: actions/checkout@v4 | |
with: | |
path: repo | |
fetch-depth: 2 | |
- name: Setup compiler | |
uses: seqan/actions/setup-compiler@main | |
with: | |
compiler: ${{ matrix.compiler }} | |
- name: Install CMake | |
uses: seqan/actions/setup-cmake@main | |
with: | |
cmake: ${{ contains(matrix.cpp, 23) && '3.20.6' || '3.15.4' }} | |
- name: Configure tests | |
run: | | |
mkdir build | |
cd build | |
cmake ../repo -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \ | |
-DCMAKE_CXX_FLAGS="-Wall -Wextra -pedantic" \ | |
-DCMAKE_CXX_STANDARD=${{ matrix.cpp }} | |
- name: Build tests | |
run: | | |
cd build | |
make -k -j2 | |
- name: Run tests | |
run: | | |
cd build | |
ctest . -j2 --output-on-failure |