9
9
strategy :
10
10
fail-fast : false
11
11
matrix :
12
- os : [ubuntu-20.04 ]
13
- gcc_v : [7,8,9, 10,11] # Version of GFortran we want to use.
12
+ os : [ubuntu-latest ]
13
+ gcc_v : [12, 10,11,9 ] # Version of GFortran we want to use.
14
14
python-version : [3.11]
15
15
env :
16
16
FC : gfortran-${{matrix.gcc_v}}
17
17
GCC_V : ${{matrix.gcc_v}}
18
18
19
+ #
20
+ # GCC version
21
+ #
22
+ # 9 - build.sh with documentation, unit tests and coverage analysis. doc deployment
23
+ # 10 - build.sh - no documentation, with and without unicode.
24
+ # 11 - FPM
25
+ # 12 - CMake build with unit tests, no documentation, with coverage analysis. no unicode
26
+ #
27
+ # NOTE: coverage disabled for now
28
+
19
29
steps :
20
30
21
31
- name : Checkout code
22
- uses : actions/checkout@v4.1.6
32
+ uses : actions/checkout@v4.2.2
23
33
with :
24
34
submodules : recursive
25
35
26
36
- name : Setup cmake
27
- if : contains( matrix.gcc_v, 9 )
37
+ if : contains( matrix.gcc_v, 12 )
28
38
uses : jwlawson/actions-setup-cmake@v2.0.2
29
39
with :
30
40
cmake-version : ' 3.28.x'
@@ -37,11 +47,24 @@ jobs:
37
47
- name : Setup Graphviz
38
48
uses : ts-graphviz/setup-graphviz@v2.0.2
39
49
50
+ - name : Set current directory in env variable
51
+ run : echo "MYDIR=$(pwd)" >> $GITHUB_ENV
52
+
53
+ - name : Set PYTHONPATH and PATH for later steps
54
+ run : |
55
+ echo "PYTHONPATH=$MYDIR/FoBiS/src/main/python:$PYTHONPATH" >> $GITHUB_ENV
56
+ echo "PATH=$MYDIR/FoBiS/src/main/python:$PATH" >> $GITHUB_ENV
57
+
40
58
- name : Install Python dependencies
41
59
if : contains( matrix.os, 'ubuntu')
42
60
run : |
43
61
python -m pip install --upgrade pip
44
- pip install ford FoBiS.py pygooglechart fpm
62
+ #pip install ford FoBiS.py pygooglechart fpm
63
+ pip install ford pygooglechart fpm
64
+ # just get the latest FoBiS from git:
65
+ # git clone https://github.com/szaghi/FoBiS.git
66
+ # use a fork until there is a new release:
67
+ git clone https://github.com/jacobwilliams/FoBiS.git
45
68
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
46
69
47
70
- name : Install GFortran Linux
55
78
--slave /usr/bin/gcov gcov /usr/bin/gcov-${GCC_V}
56
79
57
80
- name : Compile_with_build
58
- if : matrix.gcc_v != 7 && matrix.gcc_v != 11
81
+ if : matrix.gcc_v == 10
59
82
run : |
60
83
GFORTRAN=gfortran-${{matrix.gcc_v}}
61
84
GCOV=gcov-${{matrix.gcc_v}}
@@ -125,7 +148,7 @@ jobs:
125
148
# CMake build with unit tests, no documentation, with coverage analysis
126
149
# No unicode so that coverage combined with the build script will cover unicode
127
150
# and non-unicode code paths
128
- if : matrix.gcc_v == 9
151
+ if : matrix.gcc_v == 12
129
152
run : |
130
153
GFORTRAN=gfortran-${{matrix.gcc_v}}
131
154
GCOV=gcov-${{matrix.gcc_v}}
@@ -137,15 +160,18 @@ jobs:
137
160
- name : Compile_with_build_mkdocs
138
161
# build with build.sh, make documentation, run unit tests
139
162
# and perform coverage analysis - used for doc deployment
140
- if : matrix.gcc_v == 7
163
+ if : matrix.gcc_v == 9
141
164
run : |
142
165
GFORTRAN=gfortran-${{matrix.gcc_v}}
143
166
GCOV=gcov-${{matrix.gcc_v}}
144
167
./build.sh --coverage --skip-documentation
168
+ # delete old coverage files:
169
+ find . -name '*.gcda' -delete
170
+ find . -name '*.gcov' -delete
145
171
./build.sh --coverage --enable-unicode
146
172
147
173
- name : Deploy Documentation for master
148
- if : matrix.gcc_v == 7 && github.ref == 'refs/heads/master'
174
+ if : matrix.gcc_v == 9 && github.ref == 'refs/heads/master'
149
175
uses : JamesIves/github-pages-deploy-action@v4.7.3
150
176
with :
151
177
branch : gh-pages # The branch the action should deploy to.
@@ -157,15 +183,15 @@ jobs:
157
183
- name : Rebuild documentation for tagged release
158
184
env :
159
185
TAGNAME : ${{github.ref_name}}
160
- if : matrix.gcc_v == 7 && startsWith(github.ref, 'refs/tags/')
186
+ if : matrix.gcc_v == 9 && startsWith(github.ref, 'refs/tags/')
161
187
run : |
162
188
echo ${TAGNAME}
163
189
rm -rf doc
164
190
sed "2 s/^/version: ${TAGNAME}\n/" json-fortran.md > json-fortran.tagged.md
165
191
ford --debug json-fortran.tagged.md
166
192
167
193
- name : Deploy documentation for tagged release
168
- if : matrix.gcc_v == 7 && startsWith(github.ref, 'refs/tags/')
194
+ if : matrix.gcc_v == 9 && startsWith(github.ref, 'refs/tags/')
169
195
uses : JamesIves/github-pages-deploy-action@v4.7.3
170
196
with :
171
197
branch : gh-pages # The branch the action should deploy to.
@@ -174,7 +200,7 @@ jobs:
174
200
single-commit : true
175
201
176
202
- name : Upload coverage
177
- if : matrix.gcc_v == 7
203
+ if : matrix.gcc_v == 9
178
204
run : |
179
205
rm json_*.F90-*unicode.gcov || true
180
206
mv json_*.F90.gcov src/
0 commit comments