From 647214e885e4ef3302748dc9f75a1e1d3b9faa94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Stolarczuk?= Date: Fri, 31 Jan 2025 15:54:03 +0100 Subject: [PATCH] Fix cache for bench results dir should most likely match, when cached and restored. Side note, caches are accessible only on the same branch - PR cannot access caches from, e.g., main branch. --- .github/workflows/reusable_benchmarks.yml | 2 +- .github/workflows/reusable_docs_build.yml | 9 ++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/reusable_benchmarks.yml b/.github/workflows/reusable_benchmarks.yml index 028b974ef9..8edca90e14 100644 --- a/.github/workflows/reusable_benchmarks.yml +++ b/.github/workflows/reusable_benchmarks.yml @@ -159,5 +159,5 @@ jobs: if: ${{ always() && inputs.upload_report }} uses: actions/cache/save@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0 with: - path: ${{env.BUILD_DIR}}/benchmark_results.html + path: umf-repo/build/benchmark_results.html key: benchmark-results-${{ github.run_id }} diff --git a/.github/workflows/reusable_docs_build.yml b/.github/workflows/reusable_docs_build.yml index c27045c5b7..9317478bb4 100644 --- a/.github/workflows/reusable_docs_build.yml +++ b/.github/workflows/reusable_docs_build.yml @@ -45,20 +45,19 @@ jobs: -DUMF_DISABLE_HWLOC=ON cmake --build build --target docs - - name: Download benchmark HTML before uploading with documentation on GitHub pages - # If the benchmark results are meant to be uploaded on GH pages + # If we upload HTML docs, we want to include benchmark results as well + - name: Download benchmark HTML before uploading docs if: ${{ inputs.upload == true }} id: download-bench-html uses: actions/cache/restore@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0 with: - path: ${{github.workspace}}/build/benchmark_results.html + path: umf-repo/build/benchmark_results.html key: benchmark-results- - name: Move benchmark HTML if: ${{ inputs.upload == true && steps.download-bench-html.outputs.cache-hit != '' }} - # exact or partial cache hit run: | - mv ${{ github.workspace }}/build/benchmark_results.html ${{ github.workspace }}/build/docs_build/generated/html + mv umf-repo/build/benchmark_results.html ${{github.workspace}}/build/docs_build/generated/html - name: Upload artifact if: ${{ inputs.upload == true }}