@@ -4,7 +4,7 @@ on: [push, pull_request]
4
4
5
5
jobs :
6
6
build-mingw :
7
- name : ${{matrix.sys}}-${{matrix.env}}-${{matrix.build_type}}-${{matrix.lib}}-${{matrix.components}}
7
+ name : ${{matrix.sys}}-${{matrix.env}}-${{matrix.build_type}}-${{matrix.lib}}-${{matrix.components}}-${{matrix.metis}}
8
8
runs-on : windows-latest
9
9
defaults :
10
10
run :
18
18
sys : [mingw32, mingw64]
19
19
lib : [shared, static]
20
20
components : [minimal, lgpl, gpl]
21
+ metis : [no-metis, metis]
22
+ exclude :
23
+ # METIS is only usable if CHOLMOD is compiled
24
+ - components : minimal
25
+ metis : metis
21
26
include :
22
27
- sys : mingw32
23
28
env : i686
26
31
27
32
steps :
28
33
- uses : actions/checkout@v2
29
- - uses : msys2/setup-msys2@v2
34
+
35
+ - name : Setup Dependencies
36
+ uses : msys2/setup-msys2@v2
30
37
with :
31
38
msystem : ${{matrix.sys}}
32
39
install : >-
@@ -36,13 +43,18 @@ jobs:
36
43
mingw-w64-${{matrix.env}}-gcc-fortran
37
44
mingw-w64-${{matrix.env}}-intel-tbb
38
45
mingw-w64-${{matrix.env}}-lapack
39
- mingw-w64-${{matrix.env}}-metis
40
46
mingw-w64-${{matrix.env}}-ninja
41
47
mingw-w64-${{matrix.env}}-openblas
42
48
mingw-w64-${{matrix.env}}-openmp
43
49
unzip
44
50
wget
45
51
52
+ - name : Setup METIS Dependencies
53
+ if : ${{matrix.metis == 'metis'}}
54
+ run : >-
55
+ pacman --noconfirm -S
56
+ mingw-w64-${{matrix.env}}-metis
57
+
46
58
- name : Setup Environment
47
59
if : ${{matrix.build_type == 'Release'}}
48
60
run : |
54
66
uses : actions/cache@v2
55
67
with :
56
68
path : ${{env.CCACHE_DIR}}
57
- key : ${{runner.os}}-${{matrix.sys}}-${{matrix.env}}-ccache-${{github.run_id}}
58
- restore-keys : ${{runner.os}}-${{matrix.sys}}-${{matrix.env}}-ccache-
69
+ key : ${{runner.os}}-${{matrix.sys}}-${{matrix.env}}-${{matrix.build_type}}-${{matrix.lib}}-${{matrix.components}}-${{matrix.metis}}- ccache-${{github.run_id}}
70
+ restore-keys : ${{runner.os}}-${{matrix.sys}}-${{matrix.env}}-${{matrix.build_type}}-${{matrix.lib}}-${{matrix.components}}-${{matrix.metis}}- ccache-
59
71
60
72
- name : Configure
61
73
env :
68
80
-DCMAKE_CXX_COMPILER_LAUNCHER:FILEPATH=ccache \
69
81
-DCMAKE_Fortran_COMPILER_LAUNCHER:FILEPATH=ccache \
70
82
-DCMAKE_INSTALL_PREFIX:PATH=./install \
83
+ -DCMAKE_REQUIRE_FIND_PACKAGE_METIS=${{matrix.metis == 'metis'}} \
71
84
-DWITH_GPL=${{matrix.components == 'gpl'}} \
72
85
-DWITH_LGPL=${{contains(matrix.components, 'gpl')}} \
86
+ -DWITH_METIS=${{matrix.metis == 'metis'}} \
73
87
-G Ninja
74
88
75
89
- name : Build
@@ -84,10 +98,11 @@ jobs:
84
98
--target install
85
99
86
100
build-msvc :
87
- name : ${{matrix.msvc}}-${{matrix.build_type}}-${{matrix.lib}}-${{matrix.components}}
101
+ name : ${{matrix.msvc}}-${{matrix.build_type}}-${{matrix.lib}}-${{matrix.components}}-${{matrix.metis}}
88
102
runs-on : ${{matrix.os}}
89
103
env :
90
104
CCACHE_DIR : ${{github.workspace}}/ccache
105
+ CL : /MP
91
106
defaults :
92
107
run :
93
108
shell : powershell
@@ -99,6 +114,11 @@ jobs:
99
114
sys : [mingw64]
100
115
lib : [shared, static]
101
116
components : [minimal, lgpl, gpl]
117
+ metis : [no-metis, metis]
118
+ exclude :
119
+ # METIS is only usable if CHOLMOD is compiled
120
+ - components : minimal
121
+ metis : metis
102
122
include :
103
123
- sys : mingw64
104
124
env : x86_64
@@ -123,7 +143,8 @@ jobs:
123
143
with :
124
144
version : 1.10.0
125
145
126
- - uses : msys2/setup-msys2@v2
146
+ - name : Setup MSYS2
147
+ uses : msys2/setup-msys2@v2
127
148
with :
128
149
msystem : ${{matrix.sys}}
129
150
path-type : inherit
@@ -132,6 +153,15 @@ jobs:
132
153
mingw-w64-${{matrix.env}}-ccache
133
154
mingw-w64-${{matrix.env}}-gcc-fortran
134
155
156
+ - name : Cache LAPACK
157
+ id : cache-lapack
158
+ uses : actions/cache@v2
159
+ with :
160
+ path : |
161
+ ${{env.CCACHE_DIR}}
162
+ ${{github.workspace}}/install
163
+ key : ${{runner.os}}-lapack-3.10
164
+
135
165
- name : Download LAPACK
136
166
if : steps.cache-lapack.outputs.cache-hit != 'true'
137
167
shell : msys2 {0}
@@ -155,14 +185,40 @@ jobs:
155
185
--config ${{matrix.build_type}} \
156
186
--target install
157
187
158
- - name : Cache LAPACK
159
- id : cache-lapack
188
+ - name : Cache METIS
189
+ if : matrix.metis == 'metis'
190
+ id : cache-metis
160
191
uses : actions/cache@v2
161
192
with :
162
- path : |
163
- ${{env.CCACHE_DIR}}
164
- ${{github.workspace}}/install
165
- key : ${{runner.os}}-lapack-3.10
193
+ path : metis/
194
+ key : ${{runner.os}}-metis-5.1.1
195
+
196
+ - name : Download METIS
197
+ if : matrix.metis == 'metis' && steps.cache-metis.outputs.cache-hit != 'true'
198
+ run : |
199
+ (New-Object System.Net.WebClient).DownloadFile("https://github.com/KarypisLab/METIS/archive/refs/tags/v5.1.1-DistDGL-v0.5.zip", "v5.1.1-DistDGL-v0.5.zip");
200
+ (New-Object System.Net.WebClient).DownloadFile("https://github.com/KarypisLab/GKlib/archive/refs/tags/METIS-v5.1.1-DistDGL-0.5.zip", "v5.1.1-DistDGL-v0.5-GKlib.zip");
201
+ 7z x v5.1.1-DistDGL-v0.5.zip;
202
+ 7z x v5.1.1-DistDGL-v0.5-GKlib.zip;
203
+
204
+ - name : Build METIS
205
+ if : matrix.metis == 'metis' && steps.cache-metis.outputs.cache-hit != 'true'
206
+ run : |
207
+ Push-Location METIS-5.1.1-DistDGL-v0.5
208
+ Copy-Item ${{github.workspace}}/GKlib-METIS-v5.1.1-DistDGL-0.5/* -Destination GKlib/ -Recurse
209
+ New-Item -ItemType directory -Path build
210
+ Copy-Item include -Destination build/xinclude -Recurse
211
+ (Get-Content CMakeLists.txt) -Replace 'MSVC', 'FALSE' | Set-Content CMakeLists.txt
212
+ (Get-Content include/metis.h) -Replace '//#define', '#define' | Set-Content build/xinclude/metis.h
213
+ Pop-Location
214
+
215
+ cmake -S METIS-5.1.1-DistDGL-v0.5 -B build-metis `
216
+ -A x64 `
217
+ -DBUILD_SHARED_LIBS=OFF `
218
+ -DCMAKE_INSTALL_PREFIX=${{github.workspace}}/metis `
219
+ -DMETIS_INSTALL:BOOL=ON `
220
+ -G "${{matrix.generator}}"
221
+ cmake --build build-metis --target install
166
222
167
223
- name : Setup MSYS2 Environment
168
224
shell : msys2 {0}
@@ -172,19 +228,22 @@ jobs:
172
228
- name : Setup Environment
173
229
run : |
174
230
echo "${{github.workspace}}/install/bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
175
- echo "VERSION_SUFFIX=$(git describe --tags)-${{matrix.marker}}-${{matrix.system}}-${{matrix.build_type}}-${{matrix.lib}}-${{matrix.components}}" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
231
+ echo "VERSION_SUFFIX=$(git describe --tags)-${{matrix.marker}}-${{matrix.system}}-${{matrix.build_type}}-${{matrix.lib}}-${{matrix.components}}-${{matrix.metis}} " | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
176
232
177
233
- name : Configure
178
234
run : |
179
235
cmake -S . -B build_${{matrix.build_type}}/ `
180
236
-A x64 `
181
237
-DBLAS_blas_LIBRARY=${{github.workspace}}/install/lib/libblas.lib `
182
238
-DBUILD_SHARED_LIBS=${{matrix.lib == 'shared'}} `
183
- -DCMAKE_INSTALL_PREFIX:PATH=${{github.workspace}}/install-suitesparse `
239
+ -DCMAKE_INSTALL_PREFIX=${{github.workspace}}/install-suitesparse `
240
+ -DCMAKE_PREFIX_PATH=${{github.workspace}}/metis `
241
+ -DCMAKE_REQUIRE_FIND_PACKAGE_METIS=${{matrix.metis == 'metis'}} `
184
242
-DLAPACK_lapack_LIBRARY=${{github.workspace}}/install/lib/liblapack.lib `
185
243
-DWITH_FORTRAN=OFF `
186
244
-DWITH_GPL=${{matrix.components == 'gpl'}} `
187
245
-DWITH_LGPL=${{contains(matrix.components, 'gpl')}} `
246
+ -DWITH_METIS=${{matrix.metis == 'metis'}} `
188
247
-G "${{matrix.generator}}"
189
248
190
249
- name : Build
@@ -203,6 +262,14 @@ jobs:
203
262
New-Item -ItemType "directory" -Path "${{github.workspace}}/deploy"
204
263
Copy-Item -Path "${{github.workspace}}/install/*" -Destination "${{github.workspace}}/deploy/" -Recurse -Force
205
264
Copy-Item -Path "${{github.workspace}}/install-suitesparse/*" -Destination "${{github.workspace}}/deploy/" -Recurse -Force
265
+
266
+ - name : Prepare METIS Deployment
267
+ if : matrix.metis == 'metis'
268
+ run : |
269
+ Copy-Item -Path "${{github.workspace}}/metis/*" -Destination "${{github.workspace}}/deploy/" -Recurse -Force
270
+
271
+ - name : Generate Archive
272
+ run : |
206
273
Compress-Archive -Path "${{github.workspace}}/deploy/*" -Destination "SuiteSparse-${{env.VERSION_SUFFIX}}.zip"
207
274
208
275
- uses : actions/upload-artifact@v2
0 commit comments