-
Notifications
You must be signed in to change notification settings - Fork 55
105 lines (92 loc) · 3.43 KB
/
windows.yml
File metadata and controls
105 lines (92 loc) · 3.43 KB
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
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@v4
- 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@v4
- 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.17.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@v4
- 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
build_win_32bit:
name: MSVC 32bit
runs-on: windows-2019
if: github.event.pull_request.draft == false
env:
CMAKE_GENERATOR: "Visual Studio 16 2019"
steps:
- uses: actions/checkout@v4
- uses: conda-incubator/setup-miniconda@v3
name: Setup conda
with:
architecture: "x86"
auto-update-conda: true
activate-environment: openpmd-api-win32-dev
environment-file: .github/workflows/dependencies/conda_win32.yml
channels: defaults
channel-priority: true
- name: Build & Install
run: |
cmake -S . -B build `
-DCMAKE_BUILD_TYPE=Release `
-DopenPMD_USE_MPI=OFF
cmake --build build --config Release --parallel 2
ctest --test-dir build --output-on-failure -C Release
cmake --build build --config Release --target install