From d9efb486ece9a4e2908104a7bc63b1c84304a464 Mon Sep 17 00:00:00 2001 From: Gabriel Gerlero Date: Fri, 7 Jul 2023 23:42:49 -0300 Subject: [PATCH] Fix caching in build workflow --- .github/workflows/build-test.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index 1d2a521..13831e8 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -61,12 +61,14 @@ jobs: steps: - name: Checkout uses: actions/checkout@v3 + - name: Get Make recipes for caching + run: | + make deps --dry-run ${{ env.MAKE_VARS }} > make_deps.txt + make build --dry-run ${{ env.MAKE_VARS }} > make_build.txt - name: Generate cache restore keys id: caching run: | - make deps --dry-run ${{ env.MAKE_VARS }} > make_deps.txt DEPS_RESTORE_KEY="deps-${{ env.OPENFOAM }}-${{ env.BUILD_OS }}-${{ hashFiles('make_deps.txt', 'Brewfile') }}-" - make build --dry-run ${{ env.MAKE_VARS }} > make_build.txt 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"