From e307f964e824ce270dadfab01e3d54cc3a7fb7ef Mon Sep 17 00:00:00 2001 From: Edward Hartnett Date: Mon, 10 Aug 2020 05:32:37 -0600 Subject: [PATCH] now trying caching for strict pnetcdf build --- .github/workflows/strict_autotools.yml | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/.github/workflows/strict_autotools.yml b/.github/workflows/strict_autotools.yml index 0f8f51de1a4..cd009f1c927 100644 --- a/.github/workflows/strict_autotools.yml +++ b/.github/workflows/strict_autotools.yml @@ -1,4 +1,4 @@ -name: strict_autotools +name: strict_autotools_ubuntu_latest on: push: @@ -14,7 +14,8 @@ jobs: env: CC: mpicc FC: mpifort - CPPFLAGS: "-I/usr/include -I/usr/local/include" + CPPFLAGS: "-I/usr/include -I/usr/local/include -I/home/runner/pnetcdf/include" + LDFLAGS: "-L/home/runner/pnetcdf/lib" steps: - uses: actions/checkout@v2 @@ -22,13 +23,21 @@ jobs: run: | sudo apt-get install netcdf-bin libnetcdf-dev doxygen graphviz wget gfortran libjpeg-dev libz-dev openmpi-bin libopenmpi-dev - - name: pnetcdf build + - name: cache-pnetcdf + id: cache-pnetcdf + uses: actions/cache@v2 + with: + path: ~/pnetcdf + key: pnetcdf-${{ runner.os }}-1.12.1 + + - name: build-pnetcdf + if: steps.cache-pnetcdf.outputs.cache-hit != 'true' run: | - wget https://parallel-netcdf.github.io/Release/pnetcdf-1.12.1.tar.gz + set -x + wget https://parallel-netcdf.github.io/Release/pnetcdf-1.12.1.tar.gz &> /dev/null tar -xzvf pnetcdf-1.12.1.tar.gz - ls -l pushd pnetcdf-1.12.1 - ./configure --prefix=/usr --enable-shared --disable-cxx + ./configure --prefix=/home/runner/pnetcdf --enable-shared --disable-cxx make sudo make install popd