From 1ebc0891e5a1023e99c620ce079d4049be176750 Mon Sep 17 00:00:00 2001 From: nils m Date: Tue, 20 Aug 2024 23:44:42 +0000 Subject: [PATCH] Store bazel cache so recompile is faster --- .github/workflows/main.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ccd84b40..53c1ed0d 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -52,8 +52,22 @@ jobs: - os: Linux config: --config=ci steps: + # Flush bazel cache once per week + - name: Get current week + id: get-week + run: echo "week=$(/bin/date -u "+$Y-%w")" >> $GITHUB_OUTPUT + shell: bash + - name: Bazel cache + uses: actions/cache@v3 + with: + path: ~/.cache/bazel + key: bazel-${{ runner.os }}-${{ steps.get-week.output.week }} - uses: actions/checkout@v3 - uses: ./.github/actions/bazelisk + - name: bazel info + env: + CONFIG: ${{ matrix.config }} + run: bazelisk info && echo WITH CONFIG {$CONFIG} && bazelisk info ${CONFIG} - name: Build & test env: CONFIG: ${{ matrix.config }}