Skip to content

Commit

Permalink
Run testsuite via GHA
Browse files Browse the repository at this point in the history
  • Loading branch information
beutlich committed Jan 4, 2025
1 parent 06201a3 commit e085947
Showing 1 changed file with 53 additions and 0 deletions.
53 changes: 53 additions & 0 deletions .github/workflows/checkCI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,60 @@ on:
pull_request:
workflow_dispatch:

defaults:
run:
shell: bash

jobs:
test:
name: build_cmake_${{ matrix.toolchain }}
runs-on: ${{ matrix.os }}
timeout-minutes: 10
strategy:
fail-fast: false
matrix:
toolchain:
- linux-gcc
- windows-msvc
- windows-mingw
configuration:
- Release
include:
- toolchain: linux-gcc
os: ubuntu-latest
compiler: gcc
- toolchain: windows-msvc
os: windows-latest
compiler: msvc
- toolchain: windows-mingw
os: windows-latest
compiler: mingw
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 5
- name: Configure
run: |
if [ "${{ matrix.compiler }}" == "msvc" ]; then
cmake -S "$SRCDIR" -B build
elif [ "${{ matrix.compiler }}" == "mingw" ]; then
cmake -S "$SRCDIR" -B build -DCMAKE_BUILD_TYPE=${{ matrix.configuration }} -G "MinGW Makefiles"
else
cmake -S "$SRCDIR" -B build -DCMAKE_BUILD_TYPE=${{ matrix.configuration }} -DCMAKE_C_FLAGS="-Wall -Wextra"
fi
env:
SRCDIR: ${{ github.workspace }}/ExternData/Resources
- name: Build with ${{ matrix.compiler }}
run: |
if [ "${{ matrix.compiler }}" == "msvc" ]; then
cmake --build build --config ${{ matrix.configuration }}
else
cmake --build build -- -j8
fi
- name: Run tests
run: ctest --no-tests=error --test-dir build --build-config ${{ matrix.configuration }} --parallel 8

html_documentation_checks:
timeout-minutes: 5
runs-on: ubuntu-latest
Expand Down

0 comments on commit e085947

Please sign in to comment.