From ec76c15f5121acbbc26300a4457a2b77789e4b5a Mon Sep 17 00:00:00 2001 From: Gabriel Gerlero Date: Sun, 9 Jul 2023 17:32:43 -0300 Subject: [PATCH] Update build workflow --- .github/workflows/build-test.yml | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index 13831e8..bcb30b6 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -72,32 +72,23 @@ jobs: BUILD_RESTORE_KEY="build-${{ env.OPENFOAM }}-${{ env.BUILD_OS }}-${{ hashFiles('make_build.txt', 'Brewfile', format('OpenFOAM-v${0}.tgz.sha256', inputs.openfoam-version), 'configure.sh') }}-" echo "DEPS_RESTORE_KEY=$DEPS_RESTORE_KEY" >> "$GITHUB_OUTPUT" echo "BUILD_RESTORE_KEY=$BUILD_RESTORE_KEY" >> "$GITHUB_OUTPUT" - - name: Look up cached build + - name: Look up cached build or deps if: inputs.use-cached - id: cache_build + id: cache uses: actions/cache/restore@v3 with: - path: build/*-build.sparsebundle + path: build/*.sparsebundle key: ignore restore-keys: ${{ steps.caching.outputs.BUILD_RESTORE_KEY }} - lookup-only: true - - name: Look up cached deps - if: inputs.use-cached && steps.cache_build.outputs.cache-matched-key == '' - id: cache_deps - uses: actions/cache/restore@v3 - with: - path: build/*-deps.sparsebundle - key: ignore - restore-keys: ${{ steps.caching.outputs.DEPS_RESTORE_KEY }} lookup-only: true - name: Make deps - if: steps.cache_build.outputs.cache-matched-key == '' && steps.cache_deps.outputs.cache-matched-key == '' + if: steps.cache.outputs.cache-matched-key == '' run: | make deps ${{ env.MAKE_VARS }} - name: Save deps to cache - if: steps.cache_build.outputs.cache-matched-key == '' && steps.cache_deps.outputs.cache-matched-key == '' + if: steps.cache.outputs.cache-matched-key == '' uses: actions/cache/save@v3 with: path: build/*-deps.sparsebundle