Skip to content

Build

Build #8

Workflow file for this run

name: Build
# keep manual for now (or we would run out of minutes while we're private)
on: [workflow_dispatch]
jobs:
build-and-test:
name: ${{ matrix.cfg.name }}
runs-on: ${{ matrix.cfg.os }}
strategy:
matrix:
cfg:
- {name: "linux gcc dbg", os: ubuntu-latest, preset: debug }
steps:
- name: Clone
uses: actions/checkout@v4
with:
submodules: true
- name: Install Ninja
uses: seanmiddleditch/gha-setup-ninja@v5
- name: Install SDL
uses: libsdl-org/setup-sdl@main
id: sdl
with:
# install-linux-dependencies: true
version: 2.30.7
- name: Cache CPM packages
uses: actions/cache@v3
with:
key: cpm-packages
path: .cpm
enableCrossOsArchive: true
- name: VC Vars
# Setup vcvars on Windows
# MSVC's address sanitizer attaches dependencies to several DLLs which are not in PATH
# vcvars will add them to PATH and allow msvc asan executables to run
if: matrix.cfg.os == 'windows-latest'
uses: ilammy/msvc-dev-cmd@v1
- name: Setup Java
uses: actions/setup-java@v4
with:
java-version: '17'
- name: Configure
run: cmake --preset ${{ matrix.cfg.preset }} -DAC_BUILD_POC=0 -B build
- name: Build
run: cmake --build build
- name: Test
run: ctest --test-dir build --output-on-failure
env:
# just set this to all configs, it will be used where it matters and ignored otherwise
UBSAN_OPTIONS: halt_on_error=1