Run CTest on Windows via GitHub Actions #119
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
build-autoconf: | |
name: linux-autoconf | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v4 | |
- name: Setup | |
run: sudo apt-get install build-essential libtool-bin | |
- name: Autogen | |
run: ./autogen.sh | |
- name: Configure | |
run: ./configure | |
- name: Make | |
run: make | |
- name: Check | |
run: make check | |
- name: Distribution check | |
run: make distcheck | |
build-cmake: | |
name: ${{ matrix.toolchain }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
toolchain: | |
- linux-gcc | |
- macos-clang | |
- windows-msvc | |
configuration: | |
- Release | |
include: | |
- toolchain: linux-gcc | |
os: ubuntu-latest | |
compiler: gcc | |
- toolchain: macos-clang | |
os: macos-latest | |
compiler: clang | |
- toolchain: windows-msvc | |
os: windows-latest | |
compiler: msvc | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v4 | |
- name: Configure (${{ matrix.configuration }}) | |
run: | | |
if [ "${{ matrix.compiler }}" == "msvc" ]; then | |
cmake -S . -Bbuild -DCMAKE_UNITY_BUILD=ON -DCMAKE_COMPILE_WARNING_AS_ERROR=ON -DBUILD_TESTING=ON -DBASH_EXECUTABLE="C:/Program Files/Git/bin/bash.exe" | |
else | |
cmake -S . -Bbuild -DCMAKE_BUILD_TYPE=${{ matrix.configuration }} -DCMAKE_UNITY_BUILD=ON -DCMAKE_COMPILE_WARNING_AS_ERROR=ON -DBUILD_TESTING=ON | |
fi | |
- name: Build with ${{ matrix.compiler }} | |
run: | | |
if [ "${{ matrix.compiler }}" == "msvc" ]; then | |
cmake --build build --config ${{ matrix.configuration }} | |
else | |
cmake --build build | |
fi | |
- name: Test | |
run: ctest --test-dir build --build-config ${{ matrix.configuration }} --verbose |