Skip to content

Build & runs tests on Windows #123

Build & runs tests on Windows

Build & runs tests on Windows #123

Workflow file for this run

# __________________________________ CONTENTS ___________________________________
#
# This is a workflow file for GitHub Actions that runs tests on Windows.
# The workflow is triggered automatically on every push or pull request.
# Run results are then archived as GitHub artifacts.
#
# By default, Windows provides MSVC which links 'STL' stdlib.
# _______________________________________________________________________________
name: "Run tests: Windows"
run-name: "Build & runs tests on Windows"
on: [ push, pull_request ]
jobs:
build-and-test:
runs-on: windows-latest
# 'windows-latest' uses corresponding year's MSVC as a default toolchain,
# see https://github.com/actions/virtual-environments
steps:
- name: "Checkout repository"
uses: actions/checkout@v4
- name: "Configure CMake"
run: cmake --preset msvc
- name: "Build project"
run: cmake --build --preset msvc
- name: "Run tests"
run: ctest --preset msvc -C Debug
# Visual Studio is a multi-configuration generator, we need to specify one for the run
- name: "Upload test artifacts"
uses: actions/upload-artifact@v4
if: always()
with:
name: "artifact-${{matrix.os}}-${{matrix.cxx}}"
path: |
build/
!build/auxiliary/
!build/benchmarks/
!build/examples/
!build/tests/