-
Notifications
You must be signed in to change notification settings - Fork 20
233 lines (218 loc) · 9.68 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
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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
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 shared
runs-on: windows-latest
if: github.event.pull_request.draft == false
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
name: Install Python
with:
python-version: '3.x'
- name: CCache Cache
uses: actions/cache@v4
# - once stored under a key, they become immutable (even if local cache path content changes)
# - for a refresh the key has to change, e.g., hash of a tracked file in the key
with:
path: |
~/.ccache
~/.cache/ccache
key: ccache-windows-winmsvc-${{ hashFiles('.github/workflows/windows.yml') }}-${{ hashFiles('cmake/dependencies/ABLASTR.cmake') }}
restore-keys: |
ccache-windows-winmsvc-${{ hashFiles('.github/workflows/windows.yml') }}-
ccache-windows-winmsvc-
- name: Download Dependencies
run: |
Invoke-WebRequest http://fftw.org/fftw-3.3.10.tar.gz -OutFile fftw-3.3.10.tar.gz
7z.exe x -r fftw-3.3.10.tar.gz
7z.exe x -r fftw-3.3.10.tar
Invoke-WebRequest https://github.com/HDFGroup/hdf5/archive/refs/tags/hdf5-1_12_2.tar.gz -OutFile hdf5-1_12_2.tar.gz
7z.exe x -r hdf5-1_12_2.tar.gz
7z.exe x -r hdf5-1_12_2.tar
- name: Install Dependencies
env:
# Work-around for windows-latest GH runner issue, see
# https://github.com/actions/runner-images/issues/10004
CXXFLAGS: "/D_DISABLE_CONSTEXPR_MUTEX_CONSTRUCTOR"
run: |
cmake -S fftw-3.3.10 -B build_fftw `
-DBUILD_SHARED_LIBS=OFF `
-DBUILD_TESTS=OFF `
-DCMAKE_BUILD_TYPE=RelWithDebInfo `
-DDISABLE_FORTRAN=ON
if(!$?) { Exit $LASTEXITCODE }
cmake --build build_fftw --config RelWithDebInfo --target install --parallel 4
if(!$?) { Exit $LASTEXITCODE }
cmake -S hdf5-hdf5-1_12_2 -B build_hdf5 `
-DCMAKE_BUILD_TYPE=RelWithDebInfo `
-DBUILD_SHARED_LIBS=OFF `
-DBUILD_TESTING=OFF `
-DHDF5_BUILD_HL_LIB=OFF `
-DHDF5_BUILD_TOOLS=OFF `
-DHDF5_BUILD_EXAMPLES=OFF `
-DHDF5_ENABLE_SZIP_SUPPORT=OFF `
-DHDF5_ENABLE_Z_LIB_SUPPORT=OFF
if(!$?) { Exit $LASTEXITCODE }
cmake --build build_hdf5 --config RelWithDebInfo --target install --parallel 4
if(!$?) { Exit $LASTEXITCODE }
$env:HDF5_DIR = "C:/Program Files/HDF_Group/HDF5/1.12.2/cmake/"
$env:HDF5_USE_STATIC_LIBRARIES = "ON"
python3 -m pip install -U pip
python3 -m pip install -U build packaging setuptools wheel
python3 -m pip install -U -r requirements.txt
python3 -m pip install -U -r src/python/impactx/dashboard/requirements.txt
python3 -m pip install -U -r examples/requirements.txt
python3 -m pip install -U -r tests/python/requirements.txt
python3 -m pip install -U openPMD-validator
- name: Build
env:
# Work-around for windows-latest GH runner issue, see
# https://github.com/actions/runner-images/issues/10004
CXXFLAGS: "/D_DISABLE_CONSTEXPR_MUTEX_CONSTRUCTOR"
# FFTW3 install prefix path
FFTW3_DIR: "C:/Program Files (x86)/fftw/"
run: |
$env:HDF5_DIR = "C:/Program Files/HDF_Group/HDF5/1.12.2/cmake/"
cmake -S . -B build `
-DBUILD_SHARED_LIBS=ON `
-DCMAKE_BUILD_TYPE=RelWithDebInfo `
-DCMAKE_VERBOSE_MAKEFILE=ON `
-DHDF5_USE_STATIC_LIBRARIES=ON `
-DImpactX_COMPUTE=NOACC `
-DImpactX_FFT=ON `
-DImpactX_MPI=OFF `
-DImpactX_PYTHON=ON `
-DopenPMD_USE_HDF5=ON `
-DPython_EXECUTABLE=python3
if(!$?) { Exit $LASTEXITCODE }
cmake --build build --config RelWithDebInfo --parallel 4
if(!$?) { Exit $LASTEXITCODE }
- name: Test
run: |
ctest --test-dir build --build-config RelWithDebInfo --output-on-failure -E AMReX
if(!$?) { Exit $LASTEXITCODE }
- name: Install
run: |
cmake --build build --config RelWithDebInfo --target install
if(!$?) { Exit $LASTEXITCODE }
cmake --build build --config RelWithDebInfo --target pip_install
if(!$?) { Exit $LASTEXITCODE }
- name: validate created openPMD files
run: Get-ChildItem -Path build -Recurse -Filter *.h5 | %{openPMD_check_h5 -i $_}
build_win_clang:
name: Clang w/ OMP w/o MPI
runs-on: windows-2019
if: github.event.pull_request.draft == false
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
name: Install Python
with:
python-version: '3.x'
- name: CCache Cache
uses: actions/cache@v4
# - once stored under a key, they become immutable (even if local cache path content changes)
# - for a refresh the key has to change, e.g., hash of a tracked file in the key
with:
path: |
~/.ccache
~/.cache/ccache
key: ccache-windows-winclang-${{ hashFiles('.github/workflows/windows.yml') }}-${{ hashFiles('cmake/dependencies/ABLASTR.cmake') }}
restore-keys: |
ccache-windows-winclang-${{ hashFiles('.github/workflows/windows.yml') }}-
ccache-windows-winclang-
- uses: seanmiddleditch/gha-setup-ninja@master
- name: Download Dependencies
run: |
Invoke-WebRequest http://fftw.org/fftw-3.3.10.tar.gz -OutFile fftw-3.3.10.tar.gz
7z.exe x -r fftw-3.3.10.tar.gz
7z.exe x -r fftw-3.3.10.tar
Invoke-WebRequest https://github.com/HDFGroup/hdf5/archive/refs/tags/hdf5-1_12_2.tar.gz -OutFile hdf5-1_12_2.tar.gz
7z.exe x -r hdf5-1_12_2.tar.gz
7z.exe x -r hdf5-1_12_2.tar
- name: Install Dependencies
shell: cmd
run: |
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\vc\Auxiliary\build\vcvarsall.bat" x64
cmake -S fftw-3.3.10 ^
-B build_fftw ^
-G "Ninja" ^
-DBUILD_TESTS=OFF ^
-DBUILD_SHARED_LIBS=OFF ^
-DCMAKE_BUILD_TYPE=Release ^
-DDISABLE_FORTRAN=ON
if errorlevel 1 exit 1
cmake --build build_fftw --config Release --target install --parallel 4
if errorlevel 1 exit 1
cmake -S hdf5-hdf5-1_12_2 -B build_hdf5 ^
-G "Ninja" ^
-DCMAKE_C_COMPILER=clang-cl ^
-DCMAKE_CXX_COMPILER=clang-cl ^
-DCMAKE_BUILD_TYPE=Release ^
-DBUILD_SHARED_LIBS=OFF ^
-DBUILD_TESTING=OFF ^
-DHDF5_BUILD_HL_LIB=OFF ^
-DHDF5_BUILD_TOOLS=OFF ^
-DHDF5_BUILD_EXAMPLES=OFF ^
-DHDF5_ENABLE_SZIP_SUPPORT=OFF ^
-DHDF5_ENABLE_Z_LIB_SUPPORT=OFF
if errorlevel 1 exit 1
cmake --build build_hdf5 --config Release --target install --parallel 4
if errorlevel 1 exit 1
set "HDF5_DIR=C:/Program Files/HDF_Group/HDF5/1.12.2/cmake/"
set "HDF5_USE_STATIC_LIBRARIES=ON"
python3 -m pip install -U pip
python3 -m pip install -U build packaging setuptools wheel
python3 -m pip install -U -r requirements.txt
python3 -m pip install -U -r src/python/impactx/dashboard/requirements.txt
python3 -m pip install -U -r examples/requirements.txt
python3 -m pip install -U -r tests/python/requirements.txt
python3 -m pip install -U openPMD-validator
- name: Build
shell: cmd
env:
# FFTW3 install prefix path
FFTW3_DIR: "C:/Program Files (x86)/fftw/"
run: |
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\vc\Auxiliary\build\vcvarsall.bat" x64
set "HDF5_DIR=C:/Program Files/HDF_Group/HDF5/1.12.2/cmake/"
cmake -S . -B build ^
-G "Ninja" ^
-DCMAKE_C_COMPILER=clang-cl ^
-DCMAKE_CXX_COMPILER=clang-cl ^
-DBUILD_SHARED_LIBS=OFF ^
-DCMAKE_BUILD_TYPE=Release ^
-DCMAKE_VERBOSE_MAKEFILE=ON ^
-DHDF5_USE_STATIC_LIBRARIES=ON ^
-DImpactX_COMPUTE=OMP ^
-DImpactX_FFT=ON ^
-DImpactX_MPI=OFF ^
-DImpactX_PYTHON=ON ^
-DopenPMD_USE_HDF5=ON ^
-DPython_EXECUTABLE=python3
if errorlevel 1 exit 1
cmake --build build --parallel 4
if errorlevel 1 exit 1
- name: Test
shell: cmd
run: |
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\vc\Auxiliary\build\vcvarsall.bat" x64
ctest --test-dir build --output-on-failure -E AMReX
if errorlevel 1 exit 1
# - name: Install
# shell: cmd
# run: |
# call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\vc\Auxiliary\build\vcvarsall.bat" x64
# set "HDF5_DIR=C:/Program Files/HDF_Group/HDF5/1.12.2/cmake/"
#
# cmake --build build --target install
# if errorlevel 1 exit 1
# cmake --build build --target pip_install
# if errorlevel 1 exit 1
- name: validate created openPMD files
run: Get-ChildItem -Path build -Recurse -Filter *.h5 | %{openPMD_check_h5 -i $_}