2626 ninja
2727 cmake
2828 gcovr
29+
2930jobs :
3031 gcc-build :
31- runs-on : ${{ matrix.os }}
3232 strategy :
3333 fail-fast : false
3434 matrix :
4343 sanitizer : none
4444 buildtype : release
4545
46+ runs-on : ${{ matrix.os }}
47+
48+ permissions :
49+ contents : read
50+
4651 env :
4752 FC : gfortran
4853 CC : gcc
5257
5358 steps :
5459 - name : Checkout code
55- uses : actions/checkout@v3
60+ uses : actions/checkout@v4
61+ with :
62+ persist-credentials : false
5663
5764 - name : Set up Python ${{ matrix.python-version }}
5865 uses : actions/setup-python@v4
@@ -62,23 +69,29 @@ jobs:
6269 - name : Install GCC ${{ matrix.GCC_V }} (OSX)
6370 if : contains(matrix.os, 'macos')
6471 run : |
65- ln -s /usr/local/bin/gfortran-${{ env.GCC_V }} /usr/local/bin/gfortran
66- ln -s /usr/local/bin/gcc-${{ env.GCC_V }} /usr/local/bin/gcc
67- ln -s /usr/local/bin/g++-${{ env.GCC_V }} /usr/local/bin/g++
72+ ln -s /usr/local/bin/gfortran-${GCC_V} /usr/local/bin/gfortran
73+ ln -s /usr/local/bin/gcc-${GCC_V} /usr/local/bin/gcc
74+ ln -s /usr/local/bin/g++-${GCC_V} /usr/local/bin/g++
75+ env :
76+ GCC_V : ${{ env.GCC_V }}
6877
6978 - name : Install GCC (Linux)
7079 run : |
7180 sudo add-apt-repository ppa:ubuntu-toolchain-r/test
7281 sudo apt-get update
73- sudo apt-get install gcc-${{ env.GCC_V }} g++-${{ env.GCC_V }} gfortran-${{ env.GCC_V }}
82+ sudo apt-get install gcc-${GCC_V} g++-${GCC_V} gfortran-${GCC_V}
83+ env :
84+ GCC_V : ${{ env.GCC_V }}
7485
7586 - name : Set GCC Version (Linux)
7687 if : contains(matrix.os, 'ubuntu')
7788 run : >-
7889 sudo update-alternatives
79- --install /usr/bin/gcc gcc /usr/bin/gcc-${{ env.GCC_V }} 100
80- --slave /usr/bin/gfortran gfortran /usr/bin/gfortran-${{ env.GCC_V }}
81- --slave /usr/bin/gcov gcov /usr/bin/gcov-${{ env.GCC_V }}
90+ --install /usr/bin/gcc gcc /usr/bin/gcc-${GCC_V} 100
91+ --slave /usr/bin/gfortran gfortran /usr/bin/gfortran-${GCC_V}
92+ --slave /usr/bin/gcov gcov /usr/bin/gcov-${GCC_V}
93+ env :
94+ GCC_V : ${{ env.GCC_V }}
8295
8396 - name : Install CBLAS and LAPACKE
8497 if : contains(matrix.os, 'ubuntu')
95108 --libdir=lib
96109 --warnlevel=0
97110 -Dsanitizer=${{ matrix.sanitizer }}
98- -Db_coverage=${{ env. COVERAGE } }
111+ -Db_coverage=${COVERAGE}
99112 env :
100113 COVERAGE : ${{ contains(matrix.os, 'ubuntu') && 'true' || 'false' }}
101114
@@ -107,7 +120,7 @@ jobs:
107120 meson test -C ${{ env.M_BUILD_DIR }} --print-errorlogs --no-rebuild --num-processes 2 -t 2
108121
109122 - name : Create coverage report
110- if : matrix.os == 'ubuntu-latest' && matrix.GCC_V == '11 '
123+ if : matrix.os == 'ubuntu-latest' && matrix.GCC_V == '12 '
111124 run : |
112125 ninja -C ${{ env.M_BUILD_DIR }} coverage
113126
@@ -117,7 +130,8 @@ jobs:
117130 echo "DFTD4_PREFIX=$PWD/_dist" >> $GITHUB_ENV
118131
119132 - name : Upload coverage to Codecov
120- uses : codecov/codecov-action@v3
121- if : matrix.os == 'ubuntu-latest' && matrix.GCC_V == '11 '
133+ uses : codecov/codecov-action@7f8b4b4bde536c465e797be725718b88c5d95e0e # 5.1.1
134+ if : matrix.os == 'ubuntu-latest' && matrix.GCC_V == '12 '
122135 with :
123136 files : ./coverage.xml # optional
137+ verbose : true # optional (default = false)
0 commit comments