Skip to content

Commit

Permalink
CI: Windows on GH Actions (MSVC, Clang)
Browse files Browse the repository at this point in the history
Add two new builds on GH Actions: MSVC and Clang on Windows.
  • Loading branch information
ax3l committed Jan 27, 2021
1 parent 400d2e7 commit 0e18527
Showing 1 changed file with 53 additions and 0 deletions.
53 changes: 53 additions & 0 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: windows

on: [push, pull_request]

jobs:
build_win_msvc:
name: MSVC w/o MPI
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: Build & Test
run: |
$erroractionpreference = "stop"
md build
cd build
powershell.exe ..\share\openPMD\download_samples.ps1
cmake .. `
-DCMAKE_BUILD_TYPE=Debug `
-DCMAKE_VERBOSE_MAKEFILE=ON
cmake --build . --config Debug --parallel 2
if (-not $?) { throw "CMake build failed" }
ctest -V --output-on-failure --build-config Debug
if (-not $?) { throw "CTest failed" }
cmake --build . --config Debug --target install
if (-not $?) { throw "CMake install failed" }
build_win_clang:
name: Clang w/o MPI
runs-on: windows-2019
steps:
- uses: actions/checkout@v2
- uses: seanmiddleditch/gha-setup-ninja@master
- name: Build & Test
shell: cmd
run: |
md build
cd build
Powershell.exe -File ..\share\openPMD\download_samples.ps1
if errorlevel 1 exit 1
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\vc\Auxiliary\build\vcvarsall.bat" x64
cmake .. ^
-G "Ninja" ^
-DCMAKE_C_COMPILER=clang-cl ^
-DCMAKE_CXX_COMPILER=clang-cl ^
-DCMAKE_BUILD_TYPE=Release ^
-DCMAKE_VERBOSE_MAKEFILE=ON
if errorlevel 1 exit 1
cmake --build . --config Release --parallel 2
if errorlevel 1 exit 1
ctest -V --output-on-failure --build-config Release
if errorlevel 1 exit 1
cmake --build . --config Release --target install
if errorlevel 1 exit 1

0 comments on commit 0e18527

Please sign in to comment.