-
Notifications
You must be signed in to change notification settings - Fork 0
77 lines (66 loc) · 2.11 KB
/
CI.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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
name: CI
on: [push, release]
jobs:
Build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
gcc_v: [10] # Version of GFortran we want to use.
python-version: [3.9]
env:
FC: gfortran-${{ matrix.gcc_v }}
GCC_V: ${{ matrix.gcc_v }}
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
submodules: recursive
- name: Install Python
uses: actions/setup-python@v1 # Use pip to install latest CMake, & FORD/Jin2For, etc.
with:
python-version: ${{ matrix.python-version }}
- name: Setup Graphviz
uses: ts-graphviz/setup-graphviz@v1
- name: Setup Fortran Package Manager
uses: fortran-lang/setup-fpm@v4
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Install Python dependencies
if: contains( matrix.os, 'ubuntu')
run: |
python -m pip install --upgrade pip
pip install ford numpy matplotlib gcovr numpy scipy
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Install GFortran Linux
if: contains( matrix.os, 'ubuntu')
run: |
sudo apt-get install lcov
sudo update-alternatives \
--install /usr/bin/gcc gcc /usr/bin/gcc-${{ matrix.gcc_v }} 100 \
--slave /usr/bin/gfortran gfortran /usr/bin/gfortran-${{ matrix.gcc_v }} \
--slave /usr/bin/gcov gcov /usr/bin/gcov-${{ matrix.gcc_v }}
- name: Compile release version
run: fpm build --profile release
test:
needs: Build
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
gcc_v: [10] # Version of GFortran we want to use.
python-version: [3.9]
steps:
- name: Run tests
run: |
fpm test --profile debug --flag -coverage
bash ci/ci.sh
- name: Coverage
run: bash ci/ci.sh coverage
- name: Upload coverage reports to Codecov
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: ipqa-research/yaeos