-
Notifications
You must be signed in to change notification settings - Fork 19
183 lines (174 loc) · 5.26 KB
/
meson.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
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
name: Meson
on:
push:
branches:
- master
pull_request:
types: [opened, synchronize, reopened]
jobs:
build:
name: ${{ matrix.os }}/${{ matrix.compiler }}-v${{ matrix.version }}/Mode-${{ matrix.mode }}/Int${{ matrix.int }}
strategy:
fail-fast: false
matrix:
os: [windows-latest, ubuntu-latest, macos-13]
arch: ['x64']
version: ['12']
int: ['32', '64']
mode: ['static', 'shared']
include:
- compiler: gcc
- os: ubuntu-latest
compiler: intel-classic
version: '2021.10'
int: '32'
mode: 'static'
- os: ubuntu-latest
compiler: intel-classic
version: '2021.10'
int: '32'
mode: 'shared'
- os: ubuntu-latest
compiler: intel-classic
version: '2021.10'
int: '64'
mode: 'static'
- os: ubuntu-latest
compiler: intel-classic
version: '2021.10'
int: '64'
mode: 'shared'
- os: windows-latest
compiler: intel
version: '2023.2'
int: '32'
mode: 'static'
- os: windows-latest
compiler: intel
version: '2023.2'
int: '64'
mode: 'static'
- os: ubuntu-latest
compiler: intel
version: '2023.2'
int: '32'
mode: 'static'
- os: ubuntu-latest
compiler: intel
version: '2023.2'
int: '32'
mode: 'shared'
- os: ubuntu-latest
compiler: intel
version: '2023.2'
int: '64'
mode: 'static'
- os: ubuntu-latest
compiler: intel
version: '2023.2'
int: '64'
mode: 'shared'
- os: macos-latest
compiler: gcc
version: '13'
arch: 'arm64'
int: '32'
mode: 'static'
- os: macos-latest
compiler: gcc
version: '13'
arch: 'arm64'
int: '64'
mode: 'static'
- os: macos-latest
compiler: gcc
version: '13'
arch: 'arm64'
int: '32'
mode: 'shared'
- os: macos-latest
compiler: gcc
version: '13'
arch: 'arm64'
int: '64'
mode: 'shared'
# - os: ubuntu-latest
# compiler: nvidia-hpc
# version: '24.05'
runs-on: ${{ matrix.os }}
steps:
- name: Check out CUTEST
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install Meson and Ninja
shell: bash
run: |
pip install meson==1.4.1
pip install ninja
- name: Set the environment variables CUTEST
shell: bash
run: echo "CUTEST=$GITHUB_WORKSPACE" >> $GITHUB_ENV
- name: Install compilers
uses: fortran-lang/setup-fortran@main
with:
compiler: ${{ matrix.compiler }}
version: ${{ matrix.version }}
# Uncomment this section to obtain ssh access to VM
# - name: Setup tmate session
# if: matrix.os == 'macos-13'
# uses: mxschmitt/action-tmate@v3
- name: Setup CUTEST
shell: bash
run: |
INT64="false"
TESTS="true"
if [[ "${{matrix.int}}" == "64" ]]; then
INT64="true"
TESTS="false"
fi
if [[ "${{matrix.mode}}" == "static" ]]; then
MODE="static"
else
MODE="shared"
TESTS="false"
fi
QUADRUPLE="true"
if [[ "${{ matrix.compiler }}" == "intel-classic" || "${{ matrix.compiler }}" == "intel" ]]; then
QUADRUPLE="false"
fi
meson setup builddir --buildtype=debug \
--prefix=$GITHUB_WORKSPACE/cutest \
-Ddefault_library=${MODE} \
-Dquadruple=${QUADRUPLE} \
-Dint64=${INT64} \
-Dtests=${TESTS}
- name: Build CUTEST
shell: bash
run: |
meson compile -C builddir
- uses: actions/upload-artifact@v4
if: failure()
with:
name: ${{ matrix.os }}_${{ matrix.compiler }}-v${{ matrix.version }}_Int${{ matrix.int }}_meson-log.txt
path: builddir/meson-logs/meson-log.txt
- name: Install CUTEST
shell: bash
run: |
meson install -C builddir
- uses: actions/upload-artifact@v4
if: failure()
with:
name: ${{ matrix.os }}_${{ matrix.compiler }}-v${{ matrix.version }}_Int${{ matrix.int }}_install-log.txt
path: builddir/meson-logs/install-log.txt
- name: Test CUTEST
shell: bash
run: |
meson test -C builddir
- uses: actions/upload-artifact@v4
if: failure()
with:
name: ${{ matrix.os }}_${{ matrix.compiler }}-v${{ matrix.version }}_Int${{ matrix.int }}_testlog.txt
path: builddir/meson-logs/testlog.txt