Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: Windows on GH Actions (MSVC, Clang) #840

Open
wants to merge 5 commits into
base: dev
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
CI: Windows on GH Actions (MSVC, Clang)
Add two new builds on GH Actions: MSVC and Clang on Windows.
  • Loading branch information
ax3l committed Feb 11, 2021
commit ca94bdaa40816152c285fa33820ae674558eee4a
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
ax3l marked this conversation as resolved.
Show resolved Hide resolved
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
Copy link
Member Author

@ax3l ax3l Jan 5, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add Python_EXECUTABLE hint?

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