Skip to content

remove inline configuration directives #22

remove inline configuration directives

remove inline configuration directives #22

Workflow file for this run

# This starter workflow is for a CMake project running on multiple platforms. There is a different starter workflow if you just want a single platform.
# See: https://github.com/actions/starter-workflows/blob/main/ci/cmake-single-platform.yml
name: CMake on multiple platforms
on:
push:
branches: [ "trunk" ]
pull_request:
branches: [ "trunk" ]
jobs:
build:
runs-on: ${{ matrix.os }}
env:
LANG: en_US.UTF-8
strategy:
# Set fail-fast to false to ensure that feedback is delivered for all matrix combinations. Consider changing this to true when your workflow is stable.
fail-fast: false
matrix:
os: [ubuntu-latest] #, windows-latest]
c_compiler: [clang] #, gcc, cl]
include:
# - os: windows-latest
# c_compiler: cl
# cpp_compiler: cl
# - os: ubuntu-latest
# c_compiler: gcc
# cpp_compiler: g++
- os: ubuntu-latest
c_compiler: clang
cpp_compiler: clang++
# exclude:
# - os: windows-latest
# c_compiler: gcc
# - os: windows-latest
# c_compiler: clang
# - os: ubuntu-latest
# c_compiler: cl
steps:
- uses: actions/checkout@v4
- uses: flox/install-flox-action@v2
- name: Set reusable strings
# Turn repeated input strings (such as the build output directory) into step outputs. These step outputs can be used throughout the workflow file.
id: strings
shell: bash
run: |
echo "build-output-dir=${{ github.workspace }}/.build" >> "$GITHUB_OUTPUT"
- name: Run Maud
uses: flox/activate-action@v1
with:
command: >
cmake -P cmake_modules/maud_cli.cmake --
--log-level=VERBOSE
-DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }}
-DCMAKE_C_COMPILER=${{ matrix.c_compiler }}
--generate-only
- name: Build
uses: flox/activate-action@v1
with:
command: cmake --build ${{ steps.strings.outputs.build-output-dir }} --config Debug
- name: Test
uses: flox/activate-action@v1
with:
command: >
ctest --build-config Debug \
--test-dir ${{ steps.strings.outputs.build-output-dir }} \
--output-on-failure