Skip to content

correct flags for github actions #68

correct flags for github actions

correct flags for github actions #68

Workflow file for this run

name: Ubuntu unit
# adapted from: https://github.com/trase-cpp/trase/tree/master/.github/workflows
on:
push:
branches:
- main
- develop
pull_request:
branches:
- '**'
jobs:
build-and-test:
name: Ubuntu unit ${{matrix.CC}}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- CC: gcc-10
CXX: g++-10
compiler: gcc-10 g++-10
- CC: gcc-11
CXX: g++-11
compiler: gcc-11 g++-11
- CC: gcc-12
CXX: g++-12
compiler: gcc-12 g++-12
- CC: gcc-13
CXX: g++-13
compiler: gcc-13 g++-13
- CC: clang-12
CXX: clang++-12
compiler: clang-12 libomp-12-dev
- CC: clang-13
CXX: clang++-13
compiler: clang-13 libomp-13-dev
- CC: clang-14
CXX: clang++-14
compiler: clang-14 libomp-14-dev
- CC: clang-15
CXX: clang++-15
compiler: clang-15 libomp-15-dev
# - CC: clang-16 -> we don't have these as package.
# CXX: clang++-16
# compiler: clang-16
# - CC: clang-17
# CXX: clang++-17
# compiler: clang-17
steps:
- uses: actions/checkout@v3
- name: update
run: sudo apt update
- name: install compiler
run: sudo apt install ${{matrix.compiler}}
- name: make build directory
run: mkdir build_dir
- name: cmake configure
run: cmake .. -DCMAKE_BUILD_TYPE=Debug -DDTWC_ENABLE_COVERAGE:BOOL=TRUE -DDTWC_BUILD_TESTING=ON
working-directory: build_dir
env:
CC: ${{matrix.CC}}
CXX: ${{matrix.CXX}}
- name: cmake build
run: cmake --build . --parallel 2
working-directory: build_dir
- name: cmake test
run: ctest -j2 -C Debug --output-on-failure
working-directory: build_dir