80
80
run : lscpu
81
81
82
82
- name : checkout repository
83
- uses : actions/checkout@v3
83
+ uses : actions/checkout@v4
84
84
85
85
- name : install dependencies
86
86
env :
@@ -101,7 +101,7 @@ jobs:
101
101
102
102
- name : restore ccache
103
103
# setup the GitHub cache used to maintain the ccache from one job to the next
104
- uses : actions/cache/restore@v3
104
+ uses : actions/cache/restore@v4
105
105
with :
106
106
path : ~/.ccache
107
107
key : ${{ steps.ccache-prepare.outputs.key }}
@@ -135,6 +135,22 @@ jobs:
135
135
ccache -s
136
136
echo "/usr/lib/ccache" >> $GITHUB_PATH
137
137
138
+ - name : check auto-dependency resolution
139
+ # no need to check this with all runners. One is enough.
140
+ if : ${{ matrix.cc == 'gcc' && matrix.cuda == 'without' }}
141
+ run : |
142
+ mkdir -p ${GITHUB_WORKSPACE}/build-dep && cd ${GITHUB_WORKSPACE}/build-dep
143
+ IFS=':' read -r -a libs <<< "${INSTALLED_LIBS}"
144
+ for lib in "${libs[@]}"; do
145
+ printf "::group:: \033[0;32m==>\033[0m Configuring to build only \033[0;32m${lib}\033[0m\n"
146
+ cmake --fresh \
147
+ -DCMAKE_BUILD_TYPE="Release" \
148
+ -DBLA_VENDOR="OpenBLAS" \
149
+ -DSUITESPARSE_ENABLE_PROJECTS="${lib,,}" \
150
+ ..
151
+ echo "::endgroup::"
152
+ done
153
+
138
154
- name : configure
139
155
run : |
140
156
mkdir -p ${GITHUB_WORKSPACE}/build && cd ${GITHUB_WORKSPACE}/build
@@ -174,7 +190,7 @@ jobs:
174
190
- name : save ccache
175
191
# Save the cache after we are done (successfully) building.
176
192
# This helps to retain the ccache even if the subsequent steps are failing.
177
- uses : actions/cache/save@v3
193
+ uses : actions/cache/save@v4
178
194
with :
179
195
path : ~/.ccache
180
196
key : ${{ steps.ccache-prepare.outputs.key }}
@@ -273,7 +289,7 @@ jobs:
273
289
# https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners
274
290
runs-on : windows-latest
275
291
276
- name : msvc (${{ matrix.openmp }} OpenMP ${{ matrix.cuda }} CUDA, ${{ matrix.link }})
292
+ name : msvc (${{ matrix.cc }} ${{ matrix. openmp }} OpenMP ${{ matrix.cuda }} CUDA, ${{ matrix.link }})
277
293
278
294
defaults :
279
295
run :
@@ -288,6 +304,7 @@ jobs:
288
304
openmp : [with, without]
289
305
cuda : [without]
290
306
link : [both]
307
+ cc : [cl]
291
308
include :
292
309
- openmp : without
293
310
openmp-cmake-flags : " -DSUITESPARSE_USE_OPENMP=OFF"
@@ -297,6 +314,7 @@ jobs:
297
314
-DSUITESPARSE_USE_CUDA=ON
298
315
-DCMAKE_CUDA_COMPILER_LAUNCHER="ccache"
299
316
link : both
317
+ cc : cl
300
318
- openmp : with
301
319
cuda : with
302
320
cuda-cmake-flags :
@@ -306,6 +324,11 @@ jobs:
306
324
link-cmake-flags :
307
325
-DBUILD_SHARED_LIBS=OFF
308
326
-DBUILD_STATIC_LIBS=ON
327
+ cc : cl
328
+ - openmp : with
329
+ cuda : without
330
+ link : both
331
+ cc : clang-cl
309
332
310
333
env :
311
334
CHERE_INVOKING : 1
@@ -317,15 +340,15 @@ jobs:
317
340
Get-CIMInstance -Class Win32_Processor | Select-Object -Property Name
318
341
319
342
- name : checkout repository
320
- uses : actions/checkout@v3
343
+ uses : actions/checkout@v4
321
344
322
- - uses : conda-incubator/setup-miniconda@v2
345
+ - uses : conda-incubator/setup-miniconda@v3
323
346
with :
324
347
auto-update-conda : true
325
348
326
349
- name : cache conda packages
327
350
id : conda-cache
328
- uses : actions/cache/restore@v3
351
+ uses : actions/cache/restore@v4
329
352
with :
330
353
path : C:/Miniconda/envs/test
331
354
key : conda:msvc
@@ -361,7 +384,7 @@ jobs:
361
384
362
385
msystem : UCRT64
363
386
364
- - uses : Jimver/cuda-toolkit@v0.2.11
387
+ - uses : Jimver/cuda-toolkit@v0.2.14
365
388
name : install CUDA toolkit
366
389
if : matrix.cuda == 'with'
367
390
id : cuda-toolkit
@@ -401,18 +424,18 @@ jobs:
401
424
shell : msys2 {0}
402
425
run : |
403
426
echo "ccachedir=$(cygpath -m $(${CCACHE} -k cache_dir))" >> $GITHUB_OUTPUT
404
- echo "key=ccache:msvc:root:${{ matrix.openmp }}:${{ matrix.cuda }}:${{ matrix.link }}:${{ github.ref }}:$(date +"%Y-%m-%d_%H-%M-%S"):${{ github.sha }}" >> $GITHUB_OUTPUT
427
+ echo "key=ccache:msvc:root:${{ matrix.cc }}:${{ matrix. openmp }}:${{ matrix.cuda }}:${{ matrix.link }}:${{ github.ref }}:$(date +"%Y-%m-%d_%H-%M-%S"):${{ github.sha }}" >> $GITHUB_OUTPUT
405
428
406
429
- name : restore ccache
407
430
# Setup the GitHub cache used to maintain the ccache from one job to the next
408
- uses : actions/cache/restore@v3
431
+ uses : actions/cache/restore@v4
409
432
with :
410
433
path : ${{ steps.ccache-prepare.outputs.ccachedir }}
411
434
key : ${{ steps.ccache-prepare.outputs.key }}
412
435
# Prefer caches from the same branch. Fall back to caches from the dev branch.
413
436
restore-keys : |
414
- ccache:msvc:root:${{ matrix.openmp }}:${{ matrix.cuda }}:${{ matrix.link }}:${{ github.ref }}
415
- ccache:msvc:root:${{ matrix.openmp }}:${{ matrix.cuda }}:${{ matrix.link }}:
437
+ ccache:msvc:root:${{ matrix.cc }}:${{ matrix. openmp }}:${{ matrix.cuda }}:${{ matrix.link }}:${{ github.ref }}
438
+ ccache:msvc:root:${{ matrix.cc }}:${{ matrix. openmp }}:${{ matrix.cuda }}:${{ matrix.link }}:
416
439
417
440
- name : configure ccache
418
441
# Limit the maximum size and switch on compression to avoid exceeding the total disk or cache quota.
@@ -435,6 +458,8 @@ jobs:
435
458
fi
436
459
mkdir -p ${GITHUB_WORKSPACE}/build && cd ${GITHUB_WORKSPACE}/build
437
460
cmake -G"Ninja Multi-Config" \
461
+ -DCMAKE_C_COMPILER=${{ matrix.cc }} \
462
+ -DCMAKE_CXX_COMPILER=${{ matrix.cc }} \
438
463
-DCMAKE_BUILD_TYPE="Release" \
439
464
-DCMAKE_INSTALL_PREFIX=".." \
440
465
-DCMAKE_PREFIX_PATH="C:/Miniconda/envs/test/Library;${GITHUB_WORKSPACE}/dependencies" \
@@ -476,7 +501,7 @@ jobs:
476
501
- name : save ccache
477
502
# Save the cache after we are done (successfully) building
478
503
# This helps to retain the ccache even if the subsequent steps are failing.
479
- uses : actions/cache/save@v3
504
+ uses : actions/cache/save@v4
480
505
with :
481
506
path : ${{ steps.ccache-prepare.outputs.ccachedir }}
482
507
key : ${{ steps.ccache-prepare.outputs.key }}
@@ -497,7 +522,9 @@ jobs:
497
522
run : |
498
523
cd ${GITHUB_WORKSPACE}/Example/build
499
524
printf "::group::\033[0;32m==>\033[0m Configuring example\n"
500
- cmake \
525
+ cmake -G"Ninja Multi-Config" \
526
+ -DCMAKE_C_COMPILER=${{ matrix.cc }} \
527
+ -DCMAKE_CXX_COMPILER=${{ matrix.cc }} \
501
528
-DCMAKE_PREFIX_PATH="${GITHUB_WORKSPACE}/lib/cmake;C:/Miniconda/envs/test/Library;${GITHUB_WORKSPACE}/dependencies" \
502
529
-DBLA_VENDOR="All" \
503
530
${{ matrix.openmp-cmake-flags }} \
@@ -533,7 +560,9 @@ jobs:
533
560
printf "::group:: \033[0;32m==>\033[0m Building with Config.cmake with library \033[0;32m${lib}\033[0m\n"
534
561
cd ${GITHUB_WORKSPACE}/TestConfig/${lib}
535
562
cd build
536
- cmake \
563
+ cmake -G"Ninja Multi-Config" \
564
+ -DCMAKE_C_COMPILER=${{ matrix.cc }} \
565
+ -DCMAKE_CXX_COMPILER=${{ matrix.cc }} \
537
566
-DCMAKE_PREFIX_PATH="${GITHUB_WORKSPACE}/lib/cmake;C:/Miniconda/envs/test/Library;${GITHUB_WORKSPACE}/dependencies" \
538
567
..
539
568
cmake --build . --config Release
0 commit comments