-
-
Notifications
You must be signed in to change notification settings - Fork 234
170 lines (147 loc) · 6.95 KB
/
windows.yml
File metadata and controls
170 lines (147 loc) · 6.95 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
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
name: CI (Windows)
on:
push:
branches:
- release
tags:
- "v*"
pull_request:
branches:
- main
workflow_dispatch:
jobs:
windows-build:
name: Windows vcpkg build
runs-on: windows-2022
permissions:
packages: write
env:
USERNAME: FEniCS
VCPKG_EXE: C:/vcpkg/vcpkg
FEED_URL: https://nuget.pkg.github.com/FEniCS/index.json
VCPKG_BINARY_SOURCES: "clear;nuget,https://nuget.pkg.github.com/FEniCS/index.json,readwrite"
steps:
- name: Add NuGet sources
shell: pwsh
run: |
.$(${{ env.VCPKG_EXE }} fetch nuget) `
sources add `
-Source "${{ env.FEED_URL }}" `
-StorePasswordInClearText `
-Name GitHubPackages `
-UserName "${{ env.USERNAME }}" `
-Password "${{ secrets.GITHUB_TOKEN }}"
.$(${{ env.VCPKG_EXE }} fetch nuget) `
setapikey "${{ secrets.GITHUB_TOKEN }}" `
-Source "${{ env.FEED_URL }}"
- name: Checkout DOLFINx
uses: actions/checkout@v6
with:
path: dolfinx-src
- name: Load environment variables
run: |
cat dolfinx-src/.github/workflows/fenicsx-refs.env >> $env:GITHUB_ENV
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.12"
- name: Checkout UFL
uses: actions/checkout@v6
with:
repository: "fenics/ufl"
path: ufl
ref: ${{ env.ufl_ref }}
- name: Install UFL
working-directory: ufl
run: pip install .
- name: Checkout Basix
uses: actions/checkout@v6
with:
repository: "fenics/basix"
path: basix
ref: ${{ env.basix_ref }}
- name: Insert add_dll_directory calls into Basix
working-directory: basix/python/basix
run: |
(Get-Content __init__.py).Replace('# WINDOWSDLL', 'import os; os.add_dll_directory("D:/a/dolfinx/basix-install/bin")') | Set-Content __init__.py
Get-Content __init__.py
- name: Install Basix (C++)
working-directory: basix/cpp
run: |
cmake -DINSTALL_RUNTIME_DEPENDENCIES=ON -DCMAKE_TOOLCHAIN_FILE="$env:VCPKG_INSTALLATION_ROOT/scripts/buildsystems/vcpkg.cmake" -B build-dir -S .
cmake --build build-dir --config Release
cmake --install build-dir --config Release --prefix "D:/a/dolfinx/basix-install"
echo "D:/a/dolfinx/basix-install/bin" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
- name: Install Basix Python build dependencies
run: |
python -m pip install scikit-build-core[pyproject] setuptools wheel nanobind
- name: Install Basix (Python)
working-directory: basix/python
run: |
python -m pip -v install --check-build-dependencies --no-build-isolation --no-cache-dir .[ci] --config-settings=cmake.args=-DBasix_DIR="D:/a/dolfinx/basix-install/lib/cmake/basix" --config-settings=cmake.build-type="Release"
- name: Checkout FFCx
uses: actions/checkout@v6
with:
repository: "fenics/ffcx"
path: ffcx
ref: ${{ env.ffcx_ref }}
- name: Install UFCx header
working-directory: ffcx
run: |
cmake -B build-dir -S cmake/
cmake --build build-dir --config Release
cmake --install build-dir --config Release --prefix D:/a/dolfinx/ufcx-install
- name: Install FFCx
working-directory: ffcx
run: |
pip install .
- name: Insert add_dll_directory calls into DOLFINx
working-directory: dolfinx-src/python/dolfinx
run: |
(Get-Content __init__.py).Replace('# WINDOWSDLL', 'import os; os.add_dll_directory("D:/a/dolfinx/dolfinx-install/bin"); os.add_dll_directory("C:/Program Files (x86)/Intel/oneAPI/mpi/latest/opt/mpi/libfabric/bin")') | Set-Content __init__.py
Get-Content __init__.py
- uses: mpi4py/setup-mpi@v1.4.2
with:
mpi: "intelmpi"
- name: Install DOLFINx (C++)
working-directory: dolfinx-src/cpp
run: |
cmake -DBUILD_TESTING=ON -DINSTALL_RUNTIME_DEPENDENCIES=ON -DDOLFINX_BASIX_PYTHON=OFF -DBasix_DIR="D:/a/dolfinx/basix-install/lib/cmake/basix" -DDOLFINX_UFCX_PYTHON=OFF -Dufcx_DIR="D:/a/dolfinx/ufcx-install/share/ufcx/cmake" -DCMAKE_TOOLCHAIN_FILE="$env:VCPKG_INSTALLATION_ROOT/scripts/buildsystems/vcpkg.cmake" -DVCPKG_OVERLAY_PORTS=".vcpkg-overlay" -B build-dir -S .
cmake --build build-dir --config Release
cmake --install build-dir --config Release --prefix D:/a/dolfinx/dolfinx-install
echo "D:/a/dolfinx/dolfinx-install/bin" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
- name: Run tests, skip la_matrix (C++, serial)
working-directory: dolfinx-src/cpp/build-dir/test/Release
run: |
ls
mpiexec -n 1 ./unittests "~[la_matrix]"
# - name: Run tests, skip la_matrix, geometry_compat, create_box (C++, MPI, np=3)
# working-directory: dolfinx-src/cpp/build-dir/test/Release
# run: |
# mpiexec -n 3 ./unittests "~[la_matrix]"
- name: Install DOLFINx Python build dependencies
working-directory: dolfinx-src/python
run: |
pip install scikit-build-core
python -m pip install (python -m scikit_build_core.build requires | Out-String | ConvertFrom-Json)
- name: Install DOLFINx (Python)
working-directory: dolfinx-src/python
run: |
pip -v install --check-build-dependencies --no-build-isolation .[test] --config-settings=cmake.build-type="Release" --config-settings=cmake.args=-DBasix_DIR="D:/a/dolfinx/basix-install/lib/cmake/basix" --config-settings=cmake.args=-Dufcx_DIR="D:/a/dolfinx/ufcx-install/share/ufcx/cmake" --config-settings=cmake.args=-DDOLFINX_DIR="D:/a/dolfinx/dolfinx-install/lib/cmake/dolfinx" --config-settings=cmake.args=-DCMAKE_TOOLCHAIN_FILE="$env:VCPKG_INSTALLATION_ROOT/scripts/buildsystems/vcpkg.cmake" --config-settings=cmake.args=-DVCPKG_OVERLAY_PORTS="../cpp/.vcpkg-overlay"
- name: Run tests, skip test_mixed_topology_partitioning (Python, serial)
working-directory: dolfinx-src/python/test
run: |
pip install pytest-xdist
python -m pytest -n auto -m "not petsc4py and not adios2" -k "not test_mixed_topology_partitioning" unit/
# - name: Run tests, skip test_mixed_topology_partitioning (Python, MPI, np=3)
# working-directory: dolfinx-src/python/test
# run: |
# mpiexec -n 3 python -m pytest -m "not petsc4py and not adios2" -k "not test_mixed_topology_partitioning" unit/
# - name: Run Python demos (serial)
# working-directory: dolfinx-src/python/demo
# run: |
# python3 -m pytest -n auto -m serial --durations=10 test.py
# - name: Run Python demos (MPI, np=3)
# working-directory: dolfinx-src/python/demo
# run: |
# python3 -m pytest -m mpi --num-proc=3 test.py