-
Notifications
You must be signed in to change notification settings - Fork 78
186 lines (161 loc) · 4.71 KB
/
Copy pathcmake.yml
File metadata and controls
186 lines (161 loc) · 4.71 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
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
name: CMake CI
on:
push:
branches: [master]
pull_request:
paths-ignore:
- '.github/workflows/make.yml'
- '.gitignore'
- 'README'
- '**README'
- 'LICENSE'
- '**Makefile'
- 'SLmake.inc.example'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
CFLAGS: "-Wall -pedantic"
FFLAGS: "-fcheck=all,no-bounds"
CMAKE_BUILD_TYPE: Release
MPIEXEC_PREFLAGS: "--oversubscribe"
defaults:
run:
shell: bash
jobs:
build-all:
name: >
CMake ${{ matrix.cmake }}
runs-on: ubuntu-latest
strategy:
matrix:
# CMake versions to test:
# - minimum and maximum in the `cmake_minimum_required`
# (if needed expand this to add all intermediate values
# for *temporary* CI testing)
# - latest version
cmake: ["3.26", "4.0", latest]
fail-fast: false
steps:
- &checkout
name: Checkout ScaLAPACK
uses: actions/checkout@v6
- &setup-mpi
name: Setup MPI
# uses: mpi4py/setup-mpi@v1
run: |
sudo apt -y update
sudo apt -y install openmpi-bin libopenmpi-dev
- &setup-num
name: Install BLAS and LAPACK
run: sudo apt -y install libblas-dev liblapack-dev
- name: Setup CMake
uses: jwlawson/actions-setup-cmake@v2
with:
cmake-version: ${{ matrix.cmake }}
- name: CMake configuration
# TODO: Use cmake presets for newer versions
# TODO: Simplify the defaults to not require configuration
run: >
cmake -B build \
-G Ninja \
-DCMAKE_BUILD_TYPE=${{env.CMAKE_BUILD_TYPE}} \
-DBUILD_SHARED_LIBS=ON \
-DSCALAPACK_BUILD_TESTS=ON \
-DMPIEXEC_PREFLAGS=${{env.MPIEXEC_PREFLAGS}}
- &cmake-build
name: Build
run: >
cmake --build build
- &cmake-test
name: Test
run: >
ctest --test-dir build --output-on-failure -j $(nproc)
- &cmake-install
name: Install
run: cmake --install build --prefix scalapack_install
select-precision:
name: >
Precision
${{ matrix.single && 'single' || '' }}
${{ matrix.double && 'double' || '' }}
${{ matrix.complex && 'complex' || '' }}
${{ matrix.complex16 && 'complex16' || '' }}
runs-on: ubuntu-latest
strategy:
matrix:
include:
- single: true
double: false
complex: false
complex16: false
- single: false
double: true
complex: false
complex16: false
- single: false
double: false
complex: true
complex16: false
- single: false
double: false
complex: false
complex16: true
- single: true
double: false
complex: true
complex16: false
- single: false
double: true
complex: false
complex16: true
- single: true
double: true
complex: false
complex16: false
fail-fast: true
steps:
- *checkout
- *setup-mpi
- *setup-num
- name: CMake configuration
# TODO: Use cmake presets for newer versions
# TODO: Simplify the defaults to not require configuration
run: >
cmake -B build \
-G Ninja \
-DBUILD_SHARED_LIBS=ON \
-DSCALAPACK_BUILD_TESTS=ON \
-DMPIEXEC_PREFLAGS=${{env.MPIEXEC_PREFLAGS}} \
-DBUILD_SINGLE:BOOL=${{ matrix.single }} \
-DBUILD_DOUBLE:BOOL=${{ matrix.double }} \
-DBUILD_COMPLEX:BOOL=${{ matrix.complex }} \
-DBUILD_COMPLEX16:BOOL=${{ matrix.complex16 }}
- *cmake-build
- *cmake-test
- *cmake-install
freebsd:
runs-on: ubuntu-latest
steps:
- *checkout
- uses: cross-platform-actions/action@v0.29.0
with:
operating_system: 'freebsd'
version: '14.3'
architecture: 'x86_64'
run: |
# Use latest package set
sudo mkdir -p /usr/local/etc/pkg/repos/
sudo cp /etc/pkg/FreeBSD.conf /usr/local/etc/pkg/repos/FreeBSD.conf
sudo sed -i.bak -e 's|/quarterly|/latest|' /usr/local/etc/pkg/repos/FreeBSD.conf
echo "::group::Dependencies installation"
sudo -E pkg install -y \
cmake ninja mpich gcc13 openblas
echo "::endgroup::"
echo "::group::CMake configuration"
cmake -B build -G Ninja \
-DCMAKE_Fortran_COMPILER="/usr/local/bin/gfortran13"
echo "::endgroup::"
echo "::group::Building"
cmake --build build
echo "::endgroup::"