5858 --slave /usr/bin/gfortran gfortran /usr/bin/gfortran-${GCC_V} \
5959 --slave /usr/bin/gcov gcov /usr/bin/gcov-${GCC_V}
6060
61- - name : Compile_with_build_mkdocs
62- if : matrix.gcc_v == 7
63- run : |
64- GFORTRAN=gfortran-${{matrix.gcc_v}}
65- GCOV=gcov-${{matrix.gcc_v}}
66- # build with build.sh, make documentation, run unit tests
67- # and perform coverage analysis
68- ./build.sh --coverage --skip-documentation
69- ./build.sh --coverage --enable-unicode
70- CODE_COVERAGE="yes"
71- DEPLOY_DOCUMENTATION="yes"
72-
7361 - name : Compile_with_build
7462 if : matrix.gcc_v != 7
7563 run : |
@@ -78,24 +66,32 @@ jobs:
7866 # build with build.sh, run unit tests
7967 ./build.sh --skip-documentation
8068 ./build.sh --skip-documentation --enable-unicode
81- CODE_COVERAGE="no"
82- DEPLOY_DOCUMENTATION="no"
8369
8470 - name : Compile_with_cmake
71+ # CMake build with unit tests, no documentation, with coverage analysis
72+ # No unicode so that coverage combined with the build script will cover unicode
73+ # and non-unicode code paths
8574 if : matrix.gcc_v == 9
8675 run : |
8776 GFORTRAN=gfortran-${{matrix.gcc_v}}
8877 GCOV=gcov-${{matrix.gcc_v}}
89- # CMake build with unit tests, no documentation, with coverage analysis
90- # No unicode so that coverage combined with the build script will cover unicode
91- # and non-unicode code paths
9278 mkdir cmake-build
9379 cd cmake-build
9480 cmake ..
9581 make -j 4 check
9682
83+ - name : Compile_with_build_mkdocs
84+ # build with build.sh, make documentation, run unit tests
85+ # and perform coverage analysis - used for doc deployment
86+ if : matrix.gcc_v == 7
87+ run : |
88+ GFORTRAN=gfortran-${{matrix.gcc_v}}
89+ GCOV=gcov-${{matrix.gcc_v}}
90+ ./build.sh --coverage --skip-documentation
91+ ./build.sh --coverage --enable-unicode
92+
9793 - name : Deploy Documentation for master
98- if : github.ref == 'refs/heads/master' && $DEPLOY_DOCUMENTATION == 'yes '
94+ if : matrix.gcc_v == 7 && github.ref == 'refs/heads/master '
9995 uses : JamesIves/github-pages-deploy-action@4.1.3
10096 with :
10197 branch : gh-pages # The branch the action should deploy to.
@@ -107,7 +103,7 @@ jobs:
107103 - name : Rebuild documentation for tagged release
108104 env :
109105 TAGNAME : ${{ steps.vars.outputs.tag }}
110- if : $DEPLOY_DOCUMENTATION == 'yes' && startsWith(github.ref, 'refs/tags/')
106+ if : matrix.gcc_v == 7 && startsWith(github.ref, 'refs/tags/')
111107 run : |
112108 echo ${TAGNAME}
113109 rm -rf doc
@@ -117,15 +113,15 @@ jobs:
117113 - name : Deploy documentation for tagged release
118114 env :
119115 TAGNAME : ${{ steps.vars.outputs.tag }}
120- if : $DEPLOY_DOCUMENTATION == 'yes' && startsWith(github.ref, 'refs/tags/')
116+ if : matrix.gcc_v == 7 && startsWith(github.ref, 'refs/tags/')
121117 uses : JamesIves/github-pages-deploy-action@4.1.3
122118 with :
123119 branch : gh-pages # The branch the action should deploy to.
124120 folder : doc # The folder the action should deploy.
125121 target-folder : prev/$TAGNAME # deploy to a version-specific folder
126122
127123 - name : Upload coverage
128- if : $CODE_COVERAGE == 'yes'
124+ if : matrix.gcc_v == 7
129125 run : |
130126 rm json_*.F90-*unicode.gcov || true
131127 mv json_*.F90.gcov src/
0 commit comments