Decouple tests from sources #13
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: gcc-12 | |
on: | |
push: | |
branches: | |
- 'main' | |
workflow_dispatch: | |
pull_request: | |
env: | |
BUILD_TYPE: Debug | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: Install apt-get dependencies | |
run: | | |
sudo add-apt-repository ppa:ubuntu-toolchain-r/test | |
sudo apt-get update | |
sudo apt-get install -y g++-12 ninja-build build-essential | |
- name: Initialize submodules | |
run: git submodule update --init --recursive | |
- name: Configure CMake | |
run: | | |
cmake -B ${{github.workspace}}/build \ | |
-DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} \ | |
-DCMAKE_C_COMPILER=gcc-12 \ | |
-DCMAKE_CXX_COMPILER=g++-12 \ | |
-DBUILD_TESTING:BOOL=ON \ | |
-GNinja | |
- name: Build | |
run: cmake --build ${{github.workspace}}/build | |
- name: Test | |
working-directory: ${{github.workspace}}/build/tests | |
run: ctest --output-on-failure |