-
Notifications
You must be signed in to change notification settings - Fork 2
62 lines (52 loc) · 1.32 KB
/
fpm.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
name: fpm
on:
push:
paths:
- "src/**.f90"
- "fpm.toml"
pull_request:
branches:
- main
paths:
- "src/**.f90"
- "fpm.toml"
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
gcc_v: [10] # Version of GFortran we want to use.
include:
- os: ubuntu-latest
os-arch: linux-x86_64
- os: macos-11
os-arch: macos-x86_64
env:
FC: gfortran
GCC_V: ${{ matrix.gcc_v }}
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Install GFortran macOS
if: contains(matrix.os, 'macos')
run: |
ln -s /usr/local/bin/gfortran-${GCC_V} /usr/local/bin/gfortran
which gfortran-${GCC_V}
which gfortran
- name: Install GFortran Linux
if: contains(matrix.os, 'ubuntu')
run: |
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-${GCC_V} 100 \
--slave /usr/bin/gfortran gfortran /usr/bin/gfortran-${GCC_V} \
--slave /usr/bin/gcov gcov /usr/bin/gcov-${GCC_V}
- name: Install fpm
uses: fortran-lang/setup-fpm@v5
with:
fpm-version: 'v0.9.0'
- name: Build & Test
run: |
gfortran --version
fpm build
fpm test