From d74d550af42d2f4f826dcd1ed03f66c313d05826 Mon Sep 17 00:00:00 2001 From: "Bobby R. Bruce" Date: Mon, 23 Sep 2024 14:20:29 -0700 Subject: [PATCH] misc,tests: Improve daily cache handling. --- .github/workflows/daily-tests.yaml | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/.github/workflows/daily-tests.yaml b/.github/workflows/daily-tests.yaml index e73a42a512..27eaea6f81 100644 --- a/.github/workflows/daily-tests.yaml +++ b/.github/workflows/daily-tests.yaml @@ -43,21 +43,17 @@ jobs: run: rm -rf ./* || true rm -rf ./.??* || true rm -rf ~/.cache || true - uses: actions/checkout@v4 - - name: Cache build/NULL - uses: actions/cache@v4 + - name: Restore build/NULL cache + uses: actions/restore@v4 with: path: build/NULL key: testlib-build-null-${{ hashFiles('src/**') }} - restore-keys: | - testlib-build-null - - name: Cache build/ALL - uses: actions/cache@v4 + - name: Restore build/ALL cache + uses: actions/restore@v4 with: path: build/ALL key: testlib-build-all-${{ hashFiles('src/**') }} - restore-keys: | - testlib-build-all - name: long ${{ matrix.test-type }} tests working-directory: ${{ github.workspace }}/tests @@ -71,6 +67,21 @@ jobs: name: ${{ env.MY_STEP_VAR }} path: tests/testing-results retention-days: 7 + + - name: Save build/NULL cache + uses: actions/save-cache@v2 + if: ${{ hashFiles('build/NULL/') != '' }} + with: + path: build/NULL + key: testlib-build-null-${{ hashFiles('src/**') }} + + - name: Save build/ALL cache + uses: actions/save-cache@v2 + if: ${{ hashFiles('build/ALL/') != '' }} + with: + path: build/ALL + key: testlib-build-all-${{ hashFiles('src/**') }} + - run: echo "This job's status is ${{ job.status }}." # split library example tests into runs based on Suite UID