-
Notifications
You must be signed in to change notification settings - Fork 3
56 lines (45 loc) · 1.28 KB
/
test.yaml
File metadata and controls
56 lines (45 loc) · 1.28 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
name: test
on: [push, pull_request]
jobs:
cmake:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install GFortran and LAPACK
run: sudo apt-get install -y gfortran liblapack-dev libblas-dev
- name: Configure
run: cmake -B build -DCMAKE_BUILD_TYPE=Release
- name: Build
run: cmake --build build
- name: Test
run: ctest --test-dir build --output-on-failure
flang:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macos-latest]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install flang macOS
if: contains(matrix.os, 'macos')
run: |
brew install flang
FC_PATH="$(command -v flang || command -v flang-new)"
if [ -z "${FC_PATH}" ]; then
echo "flang compiler not found on PATH" >&2
exit 1
fi
echo "FC=${FC_PATH}" >> "$GITHUB_ENV"
echo "FPM_FC=${FC_PATH}" >> "$GITHUB_ENV"
- name: Install fpm
uses: fortran-lang/setup-fpm@v7
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Run example programs (debug)
run: |
"${FC}" --version
fpm run --example robertson
fpm run --example vanpol