Skip to content

System Refactor

System Refactor #943

Workflow file for this run

name: g++
on:
push:
branches:
- 'main'
workflow_dispatch:
pull_request:
jobs:
build:
name: ci-ubuntu-24.04-gcc-${{ matrix.build_options.gcc_version }}
runs-on: ubuntu-24.04
strategy:
matrix:
build_options: [ {gcc_version: 12, use_system_deps: ON, toolchain_file: build/Debug/generators/conan_toolchain.cmake}, {gcc_version: 13, use_system_deps: OFF, toolchain_file: OFF} ]
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive
- name: Configure python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install conan and ninja
run: pip install conan ninja
- name: Configure Conan profile
if: ${{ matrix.build_options.use_system_deps == 'ON' }}
run: CC=gcc-12 CXX=g++-12 conan profile detect
- name: Install Conan dependencies
if: ${{ matrix.build_options.use_system_deps == 'ON' }}
run: conan install conanfile.txt -r conancenter -s compiler.cppstd=20 -s build_type=Debug -o "*:shared=True" --build=missing
- name: Configure CMake
run: |
cmake -S . --preset=unixlike-gcc-debug \
-DCMAKE_C_COMPILER=gcc-${{ matrix.build_options.gcc_version }} \
-DCMAKE_CXX_COMPILER=g++-${{ matrix.build_options.gcc_version }} \
-DBUILD_TESTING:BOOL=ON \
-DUSE_SYSTEM_DEPENDENCIES:BOOL=${{ matrix.build_options.use_system_deps }} \
-DCMAKE_TOOLCHAIN_FILE=${{ matrix.build_options.toolchain_file }} \
-DCMAKE_EXE_LINKER_FLAGS=-fuse-ld=gold
- name: Build
run: cmake --build --preset=unixlike-gcc-debug
- name: Test
run: ctest --preset=unixlike-gcc-debug