Skip to content

Commit 1dbcdb7

Browse files
authored
Merge pull request #3 from fortran-fans/add_github_ci
Add CI: fpm.yml
2 parents a8f7ae8 + 73d7795 commit 1dbcdb7

File tree

1 file changed

+57
-0
lines changed

1 file changed

+57
-0
lines changed

.github/workflows/fpm.yml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: fpm
2+
3+
on: [push, pull_request]
4+
5+
jobs:
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
22+
# Windows GFortran Version: 8.1
23+
24+
env:
25+
FC: gfortran
26+
GCC_V: ${{ matrix.gcc_v }}
27+
28+
steps:
29+
- name: Checkout code
30+
uses: actions/checkout@v1
31+
32+
- name: Install GFortran macOS
33+
if: contains(matrix.os, 'macos')
34+
run: |
35+
ln -s /usr/local/bin/gfortran-${GCC_V} /usr/local/bin/gfortran
36+
which gfortran-${GCC_V}
37+
which gfortran
38+
- name: Install GFortran Linux
39+
if: contains(matrix.os, 'ubuntu')
40+
run: |
41+
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-${GCC_V} 100 \
42+
--slave /usr/bin/gfortran gfortran /usr/bin/gfortran-${GCC_V} \
43+
--slave /usr/bin/gcov gcov /usr/bin/gcov-${GCC_V}
44+
45+
- name: Install fpm
46+
uses: fortran-lang/setup-fpm@v3
47+
with:
48+
github-token: ${{ secrets.GITHUB_TOKEN }}
49+
50+
- name: Build fftpack
51+
run: |
52+
gfortran --version
53+
fpm build --flag "-O2"
54+
- name: Run tests
55+
run: |
56+
gfortran --version
57+
fpm test --flag "-O2" tstfft

0 commit comments

Comments
 (0)