Skip to content

Merge pull request #21 from rsps/add-gcc-info #92

Merge pull request #21 from rsps/add-gcc-info

Merge pull request #21 from rsps/add-gcc-info #92

Workflow file for this run

# --------------------------------------------------------------------------------------------------------- #
# Code analysis and tests workflow
# --------------------------------------------------------------------------------------------------------- #
name: 'Tests'
on:
push:
pull_request:
# TODO: Schedule tests to run once in a while at 06:00 (if possible)
# schedule:
# - cron: '0 6 * * *'
jobs:
cmake_scripts:
name: "CMake Scripts Tests"
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest ]
# Version(s) of cmake to test
cmake_version: [
'3.30.0',
'latest'
]
steps:
# ------------------------------------------------------------------------------------------------------- #
# Checkout code ...
# ------------------------------------------------------------------------------------------------------- #
- name: "Checkout"
uses: actions/checkout@v4
# ------------------------------------------------------------------------------------------------------- #
# Setup CMake
# ------------------------------------------------------------------------------------------------------- #
- name: "Setup CMake"
uses: jwlawson/actions-setup-cmake@v2
with:
cmake-version: ${{ matrix.cmake_version }}
# ------------------------------------------------------------------------------------------------------- #
# Configure Git
# ------------------------------------------------------------------------------------------------------- #
# This step is required due to some of the git related tests in the project.
- name: "Configure locale git"
run: |
git config --global user.email "[email protected]"
git config --global user.name "RSP Systems A/S"
# ------------------------------------------------------------------------------------------------------- #
# Build
# ------------------------------------------------------------------------------------------------------- #
- name: "Build"
run: cmake -DRSP_CMAKE_SCRIPTS_BUILD_TESTS=ON -DCMAKE_BUILD_TYPE=Debug -B build
# ------------------------------------------------------------------------------------------------------- #
# Tests
# ------------------------------------------------------------------------------------------------------- #
- name: "Run Tests"
run: ctest --output-on-failure --parallel --test-dir build/tests