-
Notifications
You must be signed in to change notification settings - Fork 195
130 lines (118 loc) · 4.61 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
name: 🪟 Windows
on:
push:
branches:
- "development"
pull_request:
paths-ignore:
- "Docs/**"
concurrency:
group: ${{ github.ref }}-${{ github.head_ref }}-windows
cancel-in-progress: true
jobs:
build_win_msvc:
name: MSVC C++17 w/o MPI
runs-on: windows-latest
# disabled due to issues in #5230
if: 0
#if: github.event.pull_request.draft == false
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
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/AMReX.cmake') }}
restore-keys: |
ccache-windows-winmsvc-${{ hashFiles('.github/workflows/windows.yml') }}-
ccache-windows-winmsvc-
- name: Build & Install
run: |
cmake -S . -B build `
-DCMAKE_BUILD_TYPE=Debug `
-DCMAKE_VERBOSE_MAKEFILE=ON `
-DWarpX_COMPUTE=NOACC `
-DWarpX_OPENPMD=ON `
-DWarpX_MPI=OFF `
-DWarpX_PYTHON=ON
if(!$?) { Exit $LASTEXITCODE }
cmake --build build --config Debug --parallel 4
if(!$?) { Exit $LASTEXITCODE }
python3 -m pip install --upgrade pip
if(!$?) { Exit $LASTEXITCODE }
python3 -m pip install --upgrade build packaging setuptools wheel
if(!$?) { Exit $LASTEXITCODE }
cmake --build build --config Debug --target install
if(!$?) { Exit $LASTEXITCODE }
cmake --build build --config Debug --target pip_install
if(!$?) { Exit $LASTEXITCODE }
- name: Test
run: |
$env:PATH += ';C:/Program Files (x86)/WarpX/bin/'
python3 Examples/Tests/gaussian_beam/inputs_test_3d_gaussian_beam_picmi.py
# JSON writes are currently very slow (50min) with MSVC
# --diagformat=openpmd
build_win_clang:
name: Clang C++17 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
with:
python-version: '3.8'
- uses: seanmiddleditch/gha-setup-ninja@master
- 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/AMReX.cmake') }}
restore-keys: |
ccache-windows-winclang-${{ hashFiles('.github/workflows/windows.yml') }}-
ccache-windows-winclang-
- name: Build & Install
shell: cmd
run: |
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\vc\Auxiliary\build\vcvarsall.bat" x64
cmake -S . -B build ^
-G "Ninja" ^
-DCMAKE_C_COMPILER=clang-cl ^
-DCMAKE_CXX_COMPILER=clang-cl ^
-DCMAKE_BUILD_TYPE=Release ^
-DCMAKE_VERBOSE_MAKEFILE=ON ^
-DWarpX_COMPUTE=OMP ^
-DWarpX_EB=OFF ^
-DWarpX_PYTHON=ON ^
-DWarpX_MPI=OFF ^
-DWarpX_OPENPMD=ON
if errorlevel 1 exit 1
cmake --build build --config Release --parallel 4
if errorlevel 1 exit 1
cmake --build build --config Release --target install
if errorlevel 1 exit 1
python3 -m pip install --upgrade pip
if errorlevel 1 exit 1
python3 -m pip install --upgrade build packaging setuptools wheel
if errorlevel 1 exit 1
python3 -m pip install --upgrade -r requirements.txt
if errorlevel 1 exit 1
cmake --build build --config Release --target pip_install
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
set "PATH=C:/Program Files (x86)/WarpX/bin/;%PATH%"
python3 Examples/Tests/gaussian_beam/inputs_test_3d_gaussian_beam_picmi.py --diagformat=openpmd
if errorlevel 1 exit 1