10
10
fail-fast : false
11
11
matrix :
12
12
os : [ubuntu-latest]
13
- gcc_v : [10] # Version of GFortran we want to use.
13
+ gcc_v : [8,9,10,11,12] # gfortran versions to test
14
14
python-version : [3.9]
15
15
env :
16
16
FC : gfortran-${{ matrix.gcc_v }}
@@ -23,11 +23,13 @@ jobs:
23
23
submodules : recursive
24
24
25
25
- name : Install Python
26
+ if : contains( matrix.gcc_v, 10 )
26
27
uses : actions/setup-python@v4 # Use pip to install latest CMake, & FORD/Jin2For, etc.
27
28
with :
28
29
python-version : ${{ matrix.python-version }}
29
30
30
31
- name : Setup Graphviz
32
+ if : contains( matrix.gcc_v, 10 )
31
33
uses : ts-graphviz/setup-graphviz@v1
32
34
33
35
- name : Setup Fortran Package Manager
@@ -36,14 +38,13 @@ jobs:
36
38
github-token : ${{ secrets.GITHUB_TOKEN }}
37
39
38
40
- name : Install Python dependencies
39
- if : contains( matrix.os, 'ubuntu' )
41
+ if : contains( matrix.gcc_v, 10 )
40
42
run : |
41
43
python -m pip install --upgrade pip
42
44
pip install ford numpy matplotlib
43
45
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
44
46
45
47
- name : Install GFortran Linux
46
- if : contains( matrix.os, 'ubuntu')
47
48
run : |
48
49
sudo apt-get install lcov
49
50
sudo update-alternatives \
58
59
run : fpm test --profile debug --flag -coverage
59
60
60
61
- name : Create coverage report
62
+ if : contains( matrix.gcc_v, 10 )
61
63
run : |
62
64
mkdir -p ${{ env.COV_DIR }}
63
65
lcov --capture --initial --base-directory . --directory build/gfortran_*/ --output-file ${{ env.COV_DIR }}/coverage.base
@@ -67,15 +69,17 @@ jobs:
67
69
COV_DIR : build/coverage
68
70
69
71
- name : Upload coverage report
72
+ if : contains( matrix.gcc_v, 10 )
70
73
uses : codecov/codecov-action@v3
71
74
with :
72
75
files : build/coverage/coverage.info
73
76
74
77
- name : Build documentation
78
+ if : contains( matrix.gcc_v, 10 )
75
79
run : ford ./fortran-csv-module.md
76
80
77
81
- name : Deploy Documentation
78
- if : github.ref == 'refs/heads/master'
82
+ if : contains( matrix.gcc_v, 10 ) && github.ref == 'refs/heads/master'
79
83
80
84
with :
81
85
branch : gh-pages # The branch the action should deploy to.
0 commit comments