Skip to content

Commit adf2cac

Browse files
committed
CI-windows.yml: also run tests in Windows Server (Core) Docker container
1 parent d381ec2 commit adf2cac

1 file changed

Lines changed: 49 additions & 0 deletions

File tree

.github/workflows/CI-windows.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,4 +63,53 @@ jobs:
6363
run: |
6464
set SIMPLECPP_EXE_PATH=.\${{ matrix.config }}\simplecpp.exe
6565
python -m pytest integration_test.py -vv || exit /b !errorlevel!
66+
67+
- name: Cache Binaries
68+
if: matrix.os == 'windows-2025'
69+
uses: actions/cache@v4
70+
with:
71+
path: |
72+
.\${{ matrix.config }}\testrunner.exe
73+
.\${{ matrix.config }}\simplecpp.exe
74+
key: ${{ runner.os }}-simplecpp-${{ matrix.config }}-${{ github.sha }}
75+
76+
test-core:
77+
needs: build
78+
runs-on: windows-2025
79+
strategy:
80+
matrix:
81+
image: [ "mcr.microsoft.com/windows/server:ltsc2025", "mcr.microsoft.com/windows/servercore:ltsc2025" ]
82+
config: [Release, Debug]
83+
fail-fast: false
84+
85+
container:
86+
image: ${{ matrix.image }}
87+
88+
steps:
89+
- uses: actions/checkout@v4
90+
with:
91+
persist-credentials: false
92+
93+
# TODO: bailout on error
94+
- name: Restore Binaries
95+
uses: actions/cache@v4
96+
with:
97+
path: |
98+
.\${{ matrix.config }}\testrunner.exe
99+
.\${{ matrix.config }}\simplecpp.exe
100+
key: ${{ runner.os }}-simplecpp-${{ github.sha }}
101+
102+
# TODO: how to share the following steps
103+
- name: Test
104+
run: |
105+
.\${{ matrix.config }}\testrunner.exe || exit /b !errorlevel!
106+
107+
- name: Selfcheck
108+
run: |
109+
.\${{ matrix.config }}\simplecpp.exe simplecpp.cpp -e || exit /b !errorlevel!
110+
111+
- name: integration test
112+
run: |
113+
set SIMPLECPP_EXE_PATH=.\${{ matrix.config }}\simplecpp.exe
114+
python -m pytest integration_test.py -vv || exit /b !errorlevel!
66115

0 commit comments

Comments
 (0)