updated workflow files #5
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 | |
on: | |
push: | |
branches: | |
- main | |
- feature/* | |
paths-ignore: | |
- '**.md' | |
pull_request: | |
branches: [main] | |
paths-ignore: | |
- '**.md' | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-22.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
gcc: [11, 12, 13] | |
build_type: [Debug, Release] | |
std: [20, 23] | |
env: | |
CC: gcc-${{matrix.gcc}} | |
CXX: g++-${{matrix.gcc}} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install gcc 13 | |
if: matrix.gcc == 13 | |
run: | | |
sudo apt-get update | |
sudo apt-get install software-properties-common | |
sudo add-apt-repository ppa:ubuntu-toolchain-r/ppa -y | |
sudo apt-get update | |
sudo apt-get install -y gcc-13 g++-13 | |
- name: Configure CMake | |
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{matrix.build_type}} -DCMAKE_CXX_STANDARD=${{matrix.std}} | |
- name: Build | |
run: cmake --build build -j 2 | |
- name: Test | |
working-directory: build | |
run: ctest -j 2 --output-on-failure |