changeset 30482:ddd58087ca97 stable

GitHub-CI: More standard way to use ccache on Ubuntu runners. * .github/workflows/make.yaml (ubuntu): Add folder with ccache symlinks to PATH instead of overriding CC, CXX and F77.
author Markus Mützel <markus.muetzel@gmx.de>
date Thu, 09 Dec 2021 19:05:53 +0100
parents 83dbee7c8f08
children 58c15e09e3d4 02b11b9f1e61
files .github/workflows/make.yaml
diffstat 1 files changed, 17 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/.github/workflows/make.yaml	Wed Dec 08 16:57:37 2021 +0100
+++ b/.github/workflows/make.yaml	Thu Dec 09 19:05:53 2021 +0100
@@ -32,6 +32,10 @@
             compiler: gcc
             ccache-max: 6G
 
+    env:
+      CC: ${{ matrix.cc }}
+      CXX: ${{ matrix.cxx }}
+
     steps:
       - name: checkout repository
         uses: actions/checkout@v2
@@ -81,25 +85,28 @@
           test -d ~/.ccache || mkdir ~/.ccache
           echo "max_size = $CCACHE_MAX" >> ~/.ccache/ccache.conf
           ccache -s
+          echo "/usr/lib/ccache" >> $GITHUB_PATH
 
       - name: bootstrap
         run: GNULIB_URL=https://github.com/coreutils/gnulib.git ./bootstrap
 
       - name: configure
         timeout-minutes: 30
-        env:
-          MY_CC: ${{ matrix.cc }}
-          MY_CXX: ${{ matrix.cxx }}
         run: |
-          echo $MY_CC --version
-          $MY_CC --version
-          echo $MY_CXX --version
-          $MY_CXX --version
+          echo $PATH
+          echo which ccache
+          which ccache
+          which $CC
+          echo $CC --version
+          $CC --version
+          which $CXX
+          echo $CXX --version
+          $CXX --version
+          which gfortran
+          echo gfortran --version
+          gfortran --version
           mkdir .build
           cd .build && ../configure \
-            CC="ccache $MY_CC" \
-            CXX="ccache $MY_CXX" \
-            F77="ccache gfortran" \
             CPPFLAGS="-I/usr/include/hdf5/serial -I/usr/include/suitesparse" \
             LDFLAGS="-L/usr/lib/$(dpkg-architecture -qDEB_HOST_MULTIARCH)/hdf5/serial"