forked from openPMD/openPMD-api
-
Notifications
You must be signed in to change notification settings - Fork 1
79 lines (67 loc) · 2.56 KB
/
windows.yml
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
name: 🪟 Windows
on: [push, pull_request]
concurrency:
group: ${{ github.ref }}-${{ github.head_ref }}-windows
cancel-in-progress: true
jobs:
build_win_msvc:
name: MSVC w/o MPI
runs-on: windows-latest
if: github.event.pull_request.draft == false
steps:
- uses: actions/checkout@v3
- name: Build & Install
run: |
python3.exe -m pip install --upgrade pip
python3.exe -m pip install --upgrade numpy
pwsh "share\openPMD\download_samples.ps1" build
cmake -S . -B build `
-DCMAKE_BUILD_TYPE=Debug `
-DopenPMD_USE_MPI=OFF
cmake --build build --config Debug --parallel 2
cmake --build build --config Debug --target install
# add before install, and fix Python path:
# ctest --test-dir build -C Debug --output-on-failure
build_win_msvc_pip:
name: MSVC w/o MPI via pip
runs-on: windows-latest
if: github.event.pull_request.draft == false
steps:
- uses: actions/checkout@v3
- name: Build & Install
run: |
python3.exe -m pip install --upgrade pip setuptools wheel
python3.exe -m pip install --upgrade cmake
python3.exe -m pip install --upgrade numpy
python3.exe -m pip wheel .
if(!$?) { Exit $LASTEXITCODE }
python3.exe -m pip install openPMD_api-0.16.0.dev0-cp39-cp39-win_amd64.whl
if(!$?) { Exit $LASTEXITCODE }
python3.exe -c "import openpmd_api as api; print(api.variants)"
if(!$?) { Exit $LASTEXITCODE }
python3.exe -m openpmd_api.ls --help
if(!$?) { Exit $LASTEXITCODE }
build_win_clang:
name: Clang w/o MPI
runs-on: windows-2019
if: github.event.pull_request.draft == false
steps:
- uses: actions/checkout@v3
- uses: seanmiddleditch/gha-setup-ninja@master
- name: Build & Install
shell: cmd
run: |
python3.exe -m pip install --upgrade pip
python3.exe -m pip install --upgrade numpy
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\vc\Auxiliary\build\vcvarsall.bat" x64
pwsh "share\openPMD\download_samples.ps1" build
cmake -S . -B build ^
-G "Ninja" ^
-DCMAKE_C_COMPILER=clang-cl ^
-DCMAKE_CXX_COMPILER=clang-cl ^
-DCMAKE_BUILD_TYPE=Release ^
-DopenPMD_USE_MPI=OFF
cmake --build build --config Release --parallel 2
cmake --build build --config Debug --target install
# add before install, and fix Python path:
# ctest --test-dir build -C Debug --output-on-failure