Skip to content

Commit fda54c1

Browse files
authored
Merge pull request #77 from sourceryinstitute/fix-ci
test(CI): add build/test script
2 parents 7ad7cd7 + 8f1b609 commit fda54c1

3 files changed

Lines changed: 70 additions & 25 deletions

File tree

.github/workflows/build.yml

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ main, master ]
6+
pull_request:
7+
branches: [ main, master ]
8+
9+
jobs:
10+
test:
11+
name: ${{ matrix.compiler }}-${{ matrix.compiler-version }} on ${{ matrix.os }}
12+
runs-on: ${{ matrix.os }}
13+
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
include:
18+
# gfortran on Linux
19+
- os: ubuntu-latest
20+
compiler: gfortran
21+
compiler-version: 13
22+
fpm-compiler: gfortran
23+
- os: ubuntu-latest
24+
compiler: gfortran
25+
compiler-version: 14
26+
fpm-compiler: gfortran
27+
28+
steps:
29+
- name: Checkout code
30+
uses: actions/checkout@v4
31+
32+
- name: Install gfortran (Linux)
33+
if: matrix.compiler == 'gfortran' && runner.os == 'Linux'
34+
run: |
35+
sudo apt-get update -y
36+
sudo apt-get install -y gfortran-${{ matrix.compiler-version }}
37+
sudo update-alternatives --install /usr/bin/gfortran gfortran \
38+
/usr/bin/gfortran-${{ matrix.compiler-version }} 100
39+
40+
- name: Install gfortran (macOS)
41+
if: matrix.compiler == 'gfortran' && runner.os == 'macOS'
42+
run: |
43+
brew install gcc@${{ matrix.compiler-version }}
44+
ln -sf /opt/homebrew/bin/gfortran-${{ matrix.compiler-version }} \
45+
/opt/homebrew/bin/gfortran
46+
47+
- name: Install flang (Linux)
48+
if: matrix.compiler == 'flang' && runner.os == 'Linux'
49+
run: |
50+
sudo apt-get update -y
51+
sudo apt-get install -y flang-${{ matrix.compiler-version }}
52+
sudo update-alternatives --install /usr/bin/flang flang \
53+
/usr/bin/flang-${{ matrix.compiler-version }} 100
54+
55+
- name: Install flang (macOS)
56+
if: matrix.compiler == 'flang' && runner.os == 'macOS'
57+
run: |
58+
brew install llvm@${{ matrix.compiler-version }}
59+
ln -sf /opt/homebrew/opt/llvm@${{ matrix.compiler-version }}/bin/flang \
60+
/opt/homebrew/bin/flang
61+
62+
- name: Install fpm
63+
uses: fortran-lang/setup-fpm@v7
64+
with:
65+
fpm-version: 'v0.13.0'
66+
67+
- name: Build and test
68+
run: fpm test --compiler ${{ matrix.fpm-compiler }} --profile release

.github/workflows/deploy-docs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99

1010
steps:
1111
- name: Checkout code
12-
uses: actions/checkout@v2
12+
uses: actions/checkout@v4
1313

1414
- name: Install Dependencies Ubuntu
1515
run: |
@@ -22,7 +22,7 @@ jobs:
2222
ford ford.md
2323
2424
- name: Upload Documentation
25-
uses: actions/upload-artifact@v2
25+
uses: actions/upload-artifact@v5
2626
with:
2727
name: documentation
2828
path: doc/html

.github/workflows/draft-pdf.yml

Lines changed: 0 additions & 23 deletions
This file was deleted.

0 commit comments

Comments
 (0)