Skip to content

Build system upgrades #15

Build system upgrades

Build system upgrades #15

Workflow file for this run

name: Tests
on:
pull_request:
branches: [main]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
run_tests:
name: ${{ matrix.os }}, ${{ matrix.build_type }}, ${{ matrix.config.cxx }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macos-14, ubuntu-22.04, ubuntu-24.04]
build_type:
- { preset: "release", name: "Release" }
- { preset: "debug", name: "Debug" }
config:
- { cc: "gcc", cxx: "g++" }
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Install dependencies
run: |
scripts/install_dependencies.sh --dev
- name: Restore build caches
uses: hendrikmuhs/ccache-action@v1.2
with:
key: ${{ github.job }}-${{ matrix.os }}-${{ matrix.config.cxx }}-${{ matrix.build_type.name }}
- name: Build
id: run_cmake
env:
CC: ${{ matrix.config.cc }}
CXX: ${{ matrix.config.cxx }}
run: cmake --preset ${{ matrix.build_type.preset }} && cmake --build --preset ${{ matrix.build_type.preset }}
- name: Run tests
id: run_tests
run: cd build/${{ matrix.build_type.name }} && ctest -C ${{ matrix.build_type.name }} -V
- name: Run sc-machine
id: run_sc_machine
run: |
mkdir kb
build/${{ matrix.build_type.name }}/bin/sc-builder -i kb -o kb.bin --clear -f
build/${{ matrix.build_type.name }}/bin/sc-server -t -c sc-machine.ini -r kb.bin
build/${{ matrix.build_type.name }}/bin/sc-machine -t -c sc-machine.ini -r kb.bin