Skip to content

Commit 112372a

Browse files
committed
try gcc9 coverage
1 parent 1c79451 commit 112372a

File tree

1 file changed

+18
-20
lines changed

1 file changed

+18
-20
lines changed

.github/workflows/CI.yml

Lines changed: 18 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
fail-fast: false
1111
matrix:
1212
os: [ubuntu-latest]
13-
gcc_v: [9,10,11,12] # Version of GFortran we want to use.
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}}
@@ -19,10 +19,10 @@ jobs:
1919
#
2020
# GCC version
2121
#
22-
# 9 - CMake build with unit tests, no documentation, with coverage analysis. no unicode
22+
# 9 - build.sh with documentation, unit tests and coverage analysis. doc deployment
2323
# 10 - build.sh - no documentation, with and without unicode.
2424
# 11 - FPM
25-
# 12 - build.sh with documentation, unit tests and coverage analysis. doc deployment
25+
# 12 - CMake build with unit tests, no documentation, with coverage analysis. no unicode
2626
#
2727
# NOTE: coverage disabled for now
2828

@@ -34,7 +34,7 @@ jobs:
3434
submodules: recursive
3535

3636
- name: Setup cmake
37-
if: contains( matrix.gcc_v, 9 )
37+
if: contains( matrix.gcc_v, 12 )
3838
uses: jwlawson/actions-setup-cmake@v2.0.2
3939
with:
4040
cmake-version: '3.28.x'
@@ -135,7 +135,7 @@ jobs:
135135
# CMake build with unit tests, no documentation, with coverage analysis
136136
# No unicode so that coverage combined with the build script will cover unicode
137137
# and non-unicode code paths
138-
if: matrix.gcc_v == 9
138+
if: matrix.gcc_v == 12
139139
run: |
140140
GFORTRAN=gfortran-${{matrix.gcc_v}}
141141
GCOV=gcov-${{matrix.gcc_v}}
@@ -147,17 +147,15 @@ jobs:
147147
- name: Compile_with_build_mkdocs
148148
# build with build.sh, make documentation, run unit tests
149149
# and perform coverage analysis - used for doc deployment
150-
if: matrix.gcc_v == 12
150+
if: matrix.gcc_v == 9
151151
run: |
152152
GFORTRAN=gfortran-${{matrix.gcc_v}}
153153
GCOV=gcov-${{matrix.gcc_v}}
154-
# ./build.sh --coverage --skip-documentation # DISABLED FOR NOW
155-
# ./build.sh --coverage --enable-unicode
156-
./build.sh --skip-documentation
157-
./build.sh --enable-unicode
154+
./build.sh --coverage --skip-documentation # DISABLED FOR NOW
155+
./build.sh --coverage --enable-unicode
158156
159157
- name: Deploy Documentation for master
160-
if: matrix.gcc_v == 12 && github.ref == 'refs/heads/master'
158+
if: matrix.gcc_v == 9 && github.ref == 'refs/heads/master'
161159
uses: JamesIves/github-pages-deploy-action@v4.7.3
162160
with:
163161
branch: gh-pages # The branch the action should deploy to.
@@ -169,26 +167,26 @@ jobs:
169167
- name: Rebuild documentation for tagged release
170168
env:
171169
TAGNAME: ${{github.ref_name}}
172-
if: matrix.gcc_v == 12 && startsWith(github.ref, 'refs/tags/')
170+
if: matrix.gcc_v == 9 && startsWith(github.ref, 'refs/tags/')
173171
run: |
174172
echo ${TAGNAME}
175173
rm -rf doc
176174
sed "2 s/^/version: ${TAGNAME}\n/" json-fortran.md > json-fortran.tagged.md
177175
ford --debug json-fortran.tagged.md
178176
179177
- name: Deploy documentation for tagged release
180-
if: matrix.gcc_v == 12 && startsWith(github.ref, 'refs/tags/')
178+
if: matrix.gcc_v == 9 && startsWith(github.ref, 'refs/tags/')
181179
uses: JamesIves/github-pages-deploy-action@v4.7.3
182180
with:
183181
branch: gh-pages # The branch the action should deploy to.
184182
folder: doc # The folder the action should deploy.
185183
target-folder: prev/${{github.ref_name}} # deploy to a version-specific folder
186184
single-commit: true
187185

188-
# - name: Upload coverage
189-
# if: matrix.gcc_v == 12
190-
# run: |
191-
# rm json_*.F90-*unicode.gcov || true
192-
# mv json_*.F90.gcov src/
193-
# mv jf_test*.[fF]90.gcov src/tests/
194-
# bash <(curl -s https://codecov.io/bash) -v -X $GCOV
186+
- name: Upload coverage
187+
if: matrix.gcc_v == 9
188+
run: |
189+
rm json_*.F90-*unicode.gcov || true
190+
mv json_*.F90.gcov src/
191+
mv jf_test*.[fF]90.gcov src/tests/
192+
bash <(curl -s https://codecov.io/bash) -v -X $GCOV

0 commit comments

Comments
 (0)