msvc windows #510
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: msvc windows | |
on: | |
push: | |
pull_request: | |
workflow_dispatch: | |
schedule: | |
- cron: '20 3 * * *' | |
env: | |
TEST_DIR: tests | |
jobs: | |
all: | |
strategy: | |
fail-fast: false | |
matrix: | |
platform: [x64, Win32] | |
# The values of 'cpp_version' and 'buildmode' are used to build the name of the configuration | |
# in the solution file. In other words, the values do not correspond directly to compiler | |
# switches but instead to parts of the configuration names from the .sln file. | |
cpp_version: [C++17, C++20] | |
buildmode: [Debug, Release] | |
include: | |
- cpp_version: "C++17 permissive" | |
platform: x64 | |
buildmode: Debug | |
- cpp_version: "C++20 permissive" | |
platform: x64 | |
buildmode: Debug | |
# Also include a variation with disabled UB tricks (not for all to limit resource consumption). | |
- cpp_version: "C++20 No UB" | |
platform: x64 | |
buildmode: Debug | |
runs-on: windows-2022 | |
timeout-minutes: 10 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Add MSBuild to PATH | |
uses: microsoft/setup-msbuild@v2 | |
- name: Build | |
working-directory: ${{env.TEST_DIR}} | |
run: msbuild /m /p:Configuration="Msvc ${{ matrix.buildmode }} ${{ matrix.cpp_version }}" /p:Platform=${{matrix.platform}} tiny-optional.sln | |
- name: Execute | |
working-directory: ${{env.TEST_DIR}} | |
run: | | |
& "../bin/Msvc ${{ matrix.buildmode }} ${{ matrix.cpp_version }} ${{matrix.platform}}/Tests.exe" 2>&1 |