From 3a72279b6bff0d2b051aeb6c607aaafd1860c297 Mon Sep 17 00:00:00 2001 From: Anton Reinhard Date: Mon, 28 Aug 2023 16:19:16 +0200 Subject: [PATCH] Try fixing the CI caching --- .gitea/workflows/julia-package-ci.yml | 36 +++++++++++++-------------- 1 file changed, 17 insertions(+), 19 deletions(-) diff --git a/.gitea/workflows/julia-package-ci.yml b/.gitea/workflows/julia-package-ci.yml index 81f8f42..bcf8481 100644 --- a/.gitea/workflows/julia-package-ci.yml +++ b/.gitea/workflows/julia-package-ci.yml @@ -2,6 +2,10 @@ name: MetagraphOptimization_CI on: [push] +env: + # keep the depot directly in the repository for the cache + JULIA_DEPOT_PATH: './.julia' + jobs: prepare: runs-on: arch-latest @@ -30,18 +34,14 @@ jobs: patterns: |- **/Project.toml - - name: Print Runner Info - run: | - echo "Hash value: ${{ steps.get-hash.outputs.hash }}" - - name: Restore Cache uses: actions/cache/restore@v3 id: cache-restore with: path: | - /root/.julia/artifacts - /root/.julia/packages - /root/.julia/registries + .julia/artifacts + .julia/packages + .julia/registries key: julia-${{ steps.get-hash.outputs.hash }} - name: Check cache hit @@ -58,9 +58,9 @@ jobs: uses: actions/cache/save@v3 with: path: | - /root/.julia/artifacts - /root/.julia/packages - /root/.julia/registries + .julia/artifacts + .julia/packages + .julia/registries key: julia-${{ steps.get-hash.outputs.hash }} test: @@ -95,12 +95,11 @@ jobs: uses: actions/cache/restore@v3 with: path: | - /root/.julia/artifacts - /root/.julia/packages - /root/.julia/registries + .julia/artifacts + .julia/packages + .julia/registries key: julia-${{ steps.get-hash.outputs.hash }} - # TODO: Remove once the cache actually works - name: Install dependencies run: | julia --project=./ -e 'import Pkg; Pkg.instantiate(); Pkg.precompile()' @@ -140,7 +139,7 @@ jobs: uses: https://github.com/julia-actions/setup-julia@v1.9.2 with: version: '1.9.2' - + # needed for the file hashing, should be removed when ${{ hashFiles('**/Project.toml') }} is supported in gitea - name: Setup go environment uses: actions/setup-go@v3 @@ -158,12 +157,11 @@ jobs: uses: actions/cache/restore@v3 with: path: | - /root/.julia/artifacts - /root/.julia/packages - /root/.julia/registries + .julia/artifacts + .julia/packages + .julia/registries key: julia-${{ steps.get-hash.outputs.hash }} - # TODO: Remove once the cache actually works - name: Install dependencies run: | julia --project=./ -e 'import Pkg; Pkg.instantiate(); Pkg.precompile()'