99 strategy :
1010 fail-fast : false
1111 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.
1414 python-version : [3.11]
1515 env :
1616 FC : gfortran-${{matrix.gcc_v}}
1717 GCC_V : ${{matrix.gcc_v}}
1818
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+
1929 steps :
2030
2131 - name : Checkout code
22- uses : actions/checkout@v4.1.6
32+ uses : actions/checkout@v4.2.2
2333 with :
2434 submodules : recursive
2535
2636 - name : Setup cmake
27- if : contains( matrix.gcc_v, 9 )
37+ if : contains( matrix.gcc_v, 12 )
2838 uses : jwlawson/actions-setup-cmake@v2.0.2
2939 with :
3040 cmake-version : ' 3.28.x'
@@ -37,11 +47,24 @@ jobs:
3747 - name : Setup Graphviz
3848 uses : ts-graphviz/setup-graphviz@v2.0.2
3949
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+
4058 - name : Install Python dependencies
4159 if : contains( matrix.os, 'ubuntu')
4260 run : |
4361 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
4568 if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
4669
4770 - name : Install GFortran Linux
5578 --slave /usr/bin/gcov gcov /usr/bin/gcov-${GCC_V}
5679
5780 - name : Compile_with_build
58- if : matrix.gcc_v != 7 && matrix.gcc_v != 11
81+ if : matrix.gcc_v == 10
5982 run : |
6083 GFORTRAN=gfortran-${{matrix.gcc_v}}
6184 GCOV=gcov-${{matrix.gcc_v}}
@@ -125,7 +148,7 @@ jobs:
125148 # CMake build with unit tests, no documentation, with coverage analysis
126149 # No unicode so that coverage combined with the build script will cover unicode
127150 # and non-unicode code paths
128- if : matrix.gcc_v == 9
151+ if : matrix.gcc_v == 12
129152 run : |
130153 GFORTRAN=gfortran-${{matrix.gcc_v}}
131154 GCOV=gcov-${{matrix.gcc_v}}
@@ -137,15 +160,18 @@ jobs:
137160 - name : Compile_with_build_mkdocs
138161 # build with build.sh, make documentation, run unit tests
139162 # and perform coverage analysis - used for doc deployment
140- if : matrix.gcc_v == 7
163+ if : matrix.gcc_v == 9
141164 run : |
142165 GFORTRAN=gfortran-${{matrix.gcc_v}}
143166 GCOV=gcov-${{matrix.gcc_v}}
144167 ./build.sh --coverage --skip-documentation
168+ # delete old coverage files:
169+ find . -name '*.gcda' -delete
170+ find . -name '*.gcov' -delete
145171 ./build.sh --coverage --enable-unicode
146172
147173 - 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'
149175 uses : JamesIves/github-pages-deploy-action@v4.7.3
150176 with :
151177 branch : gh-pages # The branch the action should deploy to.
@@ -157,15 +183,15 @@ jobs:
157183 - name : Rebuild documentation for tagged release
158184 env :
159185 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/')
161187 run : |
162188 echo ${TAGNAME}
163189 rm -rf doc
164190 sed "2 s/^/version: ${TAGNAME}\n/" json-fortran.md > json-fortran.tagged.md
165191 ford --debug json-fortran.tagged.md
166192
167193 - 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/')
169195 uses : JamesIves/github-pages-deploy-action@v4.7.3
170196 with :
171197 branch : gh-pages # The branch the action should deploy to.
@@ -174,7 +200,7 @@ jobs:
174200 single-commit : true
175201
176202 - name : Upload coverage
177- if : matrix.gcc_v == 7
203+ if : matrix.gcc_v == 9
178204 run : |
179205 rm json_*.F90-*unicode.gcov || true
180206 mv json_*.F90.gcov src/
0 commit comments