Skip to content

Commit efc243c

Browse files
authored
add CI (#7)
2 parents d591332 + 2582a52 commit efc243c

File tree

1 file changed

+51
-0
lines changed

1 file changed

+51
-0
lines changed

.github/workflows/ci.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: CI
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
build-and-test:
7+
runs-on: ${{ matrix.os }}
8+
timeout-minutes: 10
9+
strategy:
10+
matrix:
11+
os: [ubuntu-latest]
12+
toolchain:
13+
- {compiler: gcc, version: 9}
14+
- {compiler: gcc, version: 10}
15+
- {compiler: gcc, version: 11}
16+
- {compiler: gcc, version: 12}
17+
- {compiler: gcc, version: 13}
18+
- {compiler: gcc, version: 14}
19+
- {compiler: intel, version: '2023.2'}
20+
- {compiler: intel, version: '2024.0'}
21+
- {compiler: intel, version: '2025.0'}
22+
steps:
23+
- name: Checkout repository
24+
uses: actions/checkout@v4
25+
26+
- name: Setup fortran
27+
uses: fortran-lang/setup-fortran@v1.6.3
28+
with:
29+
compiler: ${{ matrix.toolchain.compiler }}
30+
version: ${{ matrix.toolchain.version }}
31+
32+
- name: Setup fpm
33+
uses: fortran-lang/setup-fpm@v7
34+
with:
35+
fpm-version: 'v0.11.0'
36+
37+
- name: Set correct Fortran compiler and library path
38+
if: matrix.os == 'macos-latest'
39+
run: |
40+
echo "FPM_FC=gfortran-${{ matrix.toolchain.version }}" >> $GITHUB_ENV
41+
echo "$(brew --prefix gcc)/bin" >> $GITHUB_PATH
42+
echo "DYLD_FALLBACK_LIBRARY_PATH=$(brew --prefix gcc)/lib/gcc/current" >> $GITHUB_ENV
43+
44+
- name: Build
45+
run: |
46+
fpm build --profile debug
47+
48+
- name: Run unit tests
49+
run: fpm test
50+
51+

0 commit comments

Comments
 (0)