-
Notifications
You must be signed in to change notification settings - Fork 15
165 lines (151 loc) · 5.25 KB
/
standalone.yml
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
name: standalone
on:
push:
branches:
- master
pull_request:
types: [opened, synchronize, reopened]
jobs:
build:
name: GALAHAD/${{ matrix.os }}/${{ matrix.fc_cmd }}/${{ matrix.compiler_version }}
strategy:
fail-fast: false
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
compiler_version: [12]
include:
- compiler: gnu
cc_cmd: gcc
fc_cmd: gfortran
cxx_cmd: g++
int64: false
- os: ubuntu-latest
compiler: gnu
compiler_version: 13
cc_cmd: gcc
fc_cmd: gfortran
cxx_cmd: g++
int64: true
allow_failure: true
- os: ubuntu-latest
compiler: intel-llvm
compiler_version: 2023.2.0
cc_cmd: icx
fc_cmd: ifort
cxx_cmd: icpx
int64: false
allow_failure: true
# - os: ubuntu-latest
# compiler: intel-llvm
# compiler_version: 2023.2
# cc_cmd: icx
# fc_cmd: ifx
# cxx_cmd: icpx
# allow_failure: true
runs-on: ${{ matrix.os }}
steps:
- name: Check out GALAHAD
uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install Meson and Ninja
run: pip install meson ninja numpy
- name: Set the environment variables GALAHAD and DEPS
shell: bash
run: |
echo "GALAHAD=$GITHUB_WORKSPACE" >> $GITHUB_ENV
echo "DEPS=$GITHUB_WORKSPACE/.." >> $GITHUB_ENV
- name: Install dependencies
shell: bash
run: |
cd $DEPS
mkdir deps
if [[ "${{matrix.int64}}" == "true" ]]; then
wget https://github.com/Reference-LAPACK/lapack/archive/refs/tags/v3.11.tar.gz
tar -xzvf v3.11.tar.gz -C deps
cd deps/lapack-*
mkdir build
cd build
cmake -DCMAKE_INSTALL_LIBDIR=$DEPS/lapack -DBUILD_SHARED_LIBS=ON -DBUILD_INDEX64=ON ..
make -j4
make install
fi
- name: Set the environment variable LD_LIBRARY_PATH
if: matrix.os != 'windows-latest'
shell: bash
run: echo "LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$GITHUB_WORKSPACE/galahad/lib" >> $GITHUB_ENV
- name: Set environment variables for OpenMP
if: matrix.os != 'windows-latest'
shell: bash
run: |
echo "OMP_CANCELLATION=TRUE" >> $GITHUB_ENV
echo "OMP_PROC_BIND=TRUE" >> $GITHUB_ENV
- name: Install GNU compilers
if: matrix.compiler == 'gnu'
uses: awvwgk/setup-fortran@main
with:
compiler: gcc
version: ${{ matrix.compiler_version }}
- name: Install classic Intel compilers
if: matrix.compiler == 'intel'
uses: awvwgk/setup-fortran@main
with:
compiler: intel-classic
version: ${{ matrix.compiler_version }}
- name: Install nextgen Intel compilers
if: matrix.compiler == 'intel-llvm'
uses: awvwgk/setup-fortran@main
with:
compiler: intel
version: ${{ matrix.compiler_version }}
- name: Setup GALAHAD
shell: bash
run: |
if [[ "${{matrix.int64}}" == "true" ]]; then
meson setup builddir --buildtype=debug -Dexamples=true -Dtests=true \
--prefix=$GITHUB_WORKSPACE/galahad -Dpythoniface=true \
-Dgalahad_int64=true -Dlibblas_path=$DEPS/lapack \
-Dliblapack_path=$DEPS/lapack -Dlibblas=blas64 \
-Dliblapack=lapack64
else
meson setup builddir --buildtype=debug -Dexamples=true -Dtests=true \
--prefix=$GITHUB_WORKSPACE/galahad -Dpythoniface=true \
-Dgalahad_int64=false
fi
env:
CC: ${{ matrix.cc_cmd }}
FC: ${{ matrix.fc_cmd }}
CXX: ${{ matrix.cxx_cmd }}
- name: Build GALAHAD
shell: bash
run: |
meson compile -C builddir
- uses: actions/upload-artifact@v3
if: failure()
with:
name: ${{ matrix.os }}_${{ matrix.fc_cmd }}_${{ matrix.compiler_version }}_meson-log.txt
path: builddir/meson-logs/meson-log.txt
- name: Install GALAHAD
shell: bash
run: |
meson install -C builddir
- uses: actions/upload-artifact@v3
if: failure()
with:
name: ${{ matrix.os }}_${{ matrix.fc_cmd }}_${{ matrix.compiler_version }}_install-log.txt
path: builddir/meson-logs/install-log.txt
# Uncomment this section to obtain ssh access to VM
# - name: Setup tmate session
# if: matrix.os == 'windows-latest'
# uses: mxschmitt/action-tmate@v3
- name: Test GALAHAD
shell: bash
run: |
meson test -C builddir
- uses: actions/upload-artifact@v3
if: failure()
with:
name: ${{ matrix.os }}_${{ matrix.fc_cmd }}_${{ matrix.compiler_version }}_testlog.txt
path: builddir/meson-logs/testlog.txt