Skip to content

Commit a297fdb

Browse files
author
Carlos Une
committed
Update CI: add windows and macOS; Closes #2.
1 parent 17fc00d commit a297fdb

File tree

1 file changed

+27
-4
lines changed

1 file changed

+27
-4
lines changed

.github/workflows/fpm.yml

Lines changed: 27 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,40 @@ name: fpm
33
on: [push, pull_request]
44

55
jobs:
6-
gfortran:
7-
runs-on: ubuntu-latest
6+
build:
7+
runs-on: ${{ matrix.os }}
8+
strategy:
9+
fail-fast: false
10+
matrix:
11+
os: [ubuntu-latest, macos-latest, windows-latest]
12+
gcc_v: [10] # Version of GFortran we want to use.
13+
include:
14+
- os: ubuntu-latest
15+
os-arch: linux-x86_64
16+
17+
- os: macos-latest
18+
os-arch: macos-x86_64
19+
20+
- os: windows-latest
21+
os-arch: windows-x86_64
822

923
env:
1024
FC: gfortran
11-
GCC_V: 10
25+
GCC_V: ${{ matrix.gcc_v }}
1226

1327
steps:
1428
- name: Checkout code
1529
uses: actions/checkout@v1
1630

17-
- name: Install gfortran
31+
- name: Install GFortran macOS
32+
if: contains(matrix.os, 'macos')
33+
run: |
34+
ln -s /usr/local/bin/gfortran-${GCC_V} /usr/local/bin/gfortran
35+
which gfortran-${GCC_V}
36+
which gfortran
37+
38+
- name: Install GFortran Linux
39+
if: contains(matrix.os, 'ubuntu')
1840
run: |
1941
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-${GCC_V} 100 \
2042
--slave /usr/bin/gfortran gfortran /usr/bin/gfortran-${GCC_V} \
@@ -36,3 +58,4 @@ jobs:
3658
fpm run --example example_lmder1
3759
fpm run --example example_lmdif1
3860
fpm run --example example_primes
61+
fpm run --example example_hybrd1

0 commit comments

Comments
 (0)