-
Notifications
You must be signed in to change notification settings - Fork 112
81 lines (72 loc) · 2.02 KB
/
ci.yml
File metadata and controls
81 lines (72 loc) · 2.02 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
name: CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
# GCC 12
- cc: gcc-12
cxx: g++-12
f77: gfortran-12
packages: gcc-12 g++-12 gfortran-12
# GCC 14
- cc: gcc-14
cxx: g++-14
f77: gfortran-14
packages: gcc-14 g++-14 gfortran-14
# Clang 18
- cc: clang-18
cxx: clang++-18
f77: gfortran-14
packages: gfortran-14 clang-18
env:
CC: ${{ matrix.cc }}
CXX: ${{ matrix.cxx }}
FC: ${{ matrix.f77 }}
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y ccache mpich libmpich-dev libopenblas-dev ${{ matrix.packages }}
- name: Set up ccache
uses: hendrikmuhs/ccache-action@v1
with:
key: ${{ matrix.cc }}
- name: Configure ccache symlinks
run: |
sudo update-ccache-symlinks
for cc in /usr/bin/clang-[0-9.]* /usr/bin/clang++-[0-9.]* ; do
if [ -e "$cc" ]; then
lnk=$(basename "$cc")
if [ ! -e "/usr/lib/ccache/$lnk" ]; then
sudo ln -s /usr/bin/ccache "/usr/lib/ccache/$lnk"
fi
fi
done
echo "/usr/lib/ccache" >> $GITHUB_PATH
- name: Print tool info
run: |
nproc
which $CC
which $CXX
which $FC
cmake --version
ctest --version
- name: Build and test
run: |
ccache -s
mkdir build && cd build
cmake -DEL_TESTS=ON -DEL_EXAMPLES=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=~/Install .. || \
(cat CMakeFiles/CMakeError.log; exit 1)
make -j$(nproc)
make install
ctest --output-on-failure
ccache -s