-
Notifications
You must be signed in to change notification settings - Fork 97
82 lines (61 loc) · 2.46 KB
/
CI-windows.yml
File metadata and controls
82 lines (61 loc) · 2.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
# Some convenient links:
# - https://github.com/actions/virtual-environments/blob/master/images/win/Windows2019-Readme.md
#
name: CI-windows
on: [push,pull_request]
permissions:
contents: read
defaults:
run:
shell: cmd
jobs:
build:
strategy:
matrix:
os: [windows-2022, windows-2025, windows-11-arm]
config: [Release, Debug]
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v6
with:
persist-credentials: false
- name: Setup msbuild.exe
uses: microsoft/setup-msbuild@v2
- name: Set up Python 3.13
uses: actions/setup-python@v6
with:
python-version: '3.13'
check-latest: true
- name: Install missing Python packages
run: |
python -m pip install pip --upgrade || exit /b !errorlevel!
python -m pip install pytest || exit /b !errorlevel!
- name: Run CMake
run: |
cmake -G "Visual Studio 17 2022" -A x64 -Werror=dev --warn-uninitialized -DCMAKE_COMPILE_WARNING_AS_ERROR=On . || exit /b !errorlevel!
- name: Build
run: |
msbuild -m simplecpp.sln /p:Configuration=${{ matrix.config }} /p:Platform=x64 || exit /b !errorlevel!
- name: Test
run: |
.\${{ matrix.config }}\testrunner.exe || exit /b !errorlevel!
- name: Selfcheck
run: |
.\${{ matrix.config }}\simplecpp.exe simplecpp.cpp -e || exit /b !errorlevel!
- name: integration test
run: |
set SIMPLECPP_EXE_PATH=.\${{ matrix.config }}\simplecpp.exe
python -m pytest integration_test.py -vv || exit /b !errorlevel!
- name: Run CMake (c++17)
run: |
cmake -S . -B build.cxx17 -G "Visual Studio 17 2022" -A x64 -Werror=dev --warn-uninitialized -DCMAKE_CXX_STANDARD=17 -DCMAKE_COMPILE_WARNING_AS_ERROR=On || exit /b !errorlevel!
- name: Build (c++17)
run: |
msbuild -m build.cxx17\simplecpp.sln /p:Configuration=${{ matrix.config }} /p:Platform=x64 || exit /b !errorlevel!
- name: Run CMake (c++20)
run: |
cmake -S . -B build.cxx20 -G "Visual Studio 17 2022" -A x64 -Werror=dev --warn-uninitialized -DCMAKE_CXX_STANDARD=20 -DCMAKE_COMPILE_WARNING_AS_ERROR=On || exit /b !errorlevel!
- name: Build (c++20)
run: |
msbuild -m build.cxx20\simplecpp.sln /p:Configuration=${{ matrix.config }} /p:Platform=x64 || exit /b !errorlevel!