Skip to content

Pull request with the latest version of the project #7

Pull request with the latest version of the project

Pull request with the latest version of the project #7

Workflow file for this run

name: CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
cancel-in-progress: true
jobs:
build:
name: ${{ matrix.compiler }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
compiler: [gcc, clang]
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.11
- name: Install dependencies
run: |
sudo apt-get update
if [ "${{ matrix.compiler }}" = "gcc" ]; then
sudo apt-get install -y gcc g++ cmake make
echo "CC=gcc" >> $GITHUB_ENV
echo "CXX=g++" >> $GITHUB_ENV
else
sudo apt-get install -y clang cmake make
echo "CC=clang" >> $GITHUB_ENV
echo "CXX=clang++" >> $GITHUB_ENV
fi
- name: Configure project
run: |
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
- name: Build project
run: |
cmake --build build -- -j$(nproc)
- name: Run tests
run: |
ctest --test-dir build --output-on-failure