Skip to content

Commit 82596e0

Browse files
committed
[C++] Add Windows build to the CI matrix
1 parent 814d838 commit 82596e0

File tree

3 files changed

+23
-2
lines changed

3 files changed

+23
-2
lines changed

.github/workflows/ci.yml

+14
Original file line numberDiff line numberDiff line change
@@ -168,3 +168,17 @@ jobs:
168168
sudo xcode-select -switch /Applications/Xcode_${{ matrix.version }}.app
169169
- name: Build
170170
run: ./cppbuild/cppbuild
171+
172+
cpp-msvc-build:
173+
name: C++ MSVC (Windows)
174+
runs-on: windows-latest
175+
strategy:
176+
fail-fast: false
177+
env:
178+
CC: cl
179+
CXX: cl
180+
steps:
181+
- name: Checkout code
182+
uses: actions/checkout@v2
183+
- name: Build
184+
run: cppbuild/cppbuild.cmd
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,19 @@
11
@if "%DEBUG%" == "" @echo off
2-
setlocal
2+
setlocal EnableDelayedExpansion
33

44
set SOURCE_DIR=%CD%
55
set BUILD_DIR=%CD%\cppbuild\Release
66

7+
call cppbuild/vs-helper.cmd
8+
if %ERRORLEVEL% neq 0 exit /b %ERRORLEVEL%
9+
710
if EXIST %BUILD_DIR% rd /S /Q %BUILD_DIR%
811

912
md %BUILD_DIR%
1013
pushd %BUILD_DIR%
1114

12-
cmake -G "Visual Studio 14 Win64" %SOURCE_DIR%
1315
cmake --build . --clean-first --config Release
16+
if %ERRORLEVEL% neq 0 exit /b %ERRORLEVEL%
17+
1418
ctest -C Release
19+
if %ERRORLEVEL% neq 0 exit /b %ERRORLEVEL%

cppbuild/vs-helper.cmd

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
rem Invoke script to set all of the Visual Studio ENV variables
2+
@for /f "usebackq delims=#" %%a in (`"%programfiles(x86)%\Microsoft Visual Studio\Installer\vswhere" -latest -property installationPath`) do "%%a\Common7\Tools\VsDevCmd.bat"

0 commit comments

Comments
 (0)