Skip to content

ci(workflow): Add new modules to test workflow #14

ci(workflow): Add new modules to test workflow

ci(workflow): Add new modules to test workflow #14

Workflow file for this run

name: AI4Games Tests
on:
push:
branches: [main, master, develop]
workflow_dispatch:
jobs:
test:
name: Test ${{ matrix.module }} on Ubuntu
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
module: [bt, flocking, fsm, life, maze, rng, utility]
include:
- module: bt
test_executable: bt-tests
test_path: src/bt
- module: flocking
test_executable: flocking-tests
test_path: src/flocking
- module: fsm
test_executable: fsm-tests
test_path: src/fsm
- module: life
test_executable: life-tests
test_path: src/life
- module: maze
test_executable: maze-tests
test_path: src/maze
- module: rng
test_executable: rng-tests
test_path: src/rng
- module: utility
test_executable: utility-tests
test_path: src/utility
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up CMake
uses: jwlawson/actions-setup-cmake@v2
with:
cmake-version: "3.20"
- name: Configure CMake
run: |
cmake -B build -DCMAKE_BUILD_TYPE=Release
- name: Build ${{ matrix.module }} test target
run: cmake --build build --target ${{ matrix.test_executable }} --config Release
- name: Test
working-directory: build
run: ctest --output-on-failure --build-config Release -R ${{ matrix.test_executable }}
- name: Run ${{ matrix.module }} tests specifically
working-directory: build
run: |
./out/${{ matrix.module }}/${{ matrix.test_executable }} --success --verbose