2023-03-21 05:06:32 -04:00
|
|
|
name: Warm bazel cache
|
|
|
|
|
|
|
|
on:
|
|
|
|
workflow_dispatch:
|
|
|
|
schedule:
|
|
|
|
- cron: "5 6 * * *" # At 06:05 every day.
|
|
|
|
|
|
|
|
env:
|
|
|
|
CACHE_KEY: bazel
|
|
|
|
|
|
|
|
permissions:
|
|
|
|
actions: write
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
warm-bazel-cache:
|
|
|
|
runs-on: ubuntu-22.04
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
2023-04-03 10:36:43 -04:00
|
|
|
uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # v3.5.0
|
2023-03-21 05:06:32 -04:00
|
|
|
with:
|
|
|
|
ref: ${{ !github.event.pull_request.head.repo.fork && github.head_ref || '' }}
|
|
|
|
|
|
|
|
- name: Build common targets
|
|
|
|
run: |
|
|
|
|
bazel build \
|
2023-04-04 04:16:04 -04:00
|
|
|
//:devbuild \
|
2023-03-29 08:13:51 -04:00
|
|
|
//bazel/ci/... \
|
2023-03-21 05:06:32 -04:00
|
|
|
//bootstrapper/cmd/bootstrapper:bootstrapper_linux_amd64 \
|
|
|
|
//cli:cli_oss_linux_amd64 \
|
|
|
|
//cli:cli_oss_darwin_amd64 \
|
|
|
|
//debugd/cmd/cdbg:cdbg_linux_amd64 \
|
|
|
|
//debugd/cmd/cdbg:cdbg_darwin_amd64 \
|
|
|
|
//disk-mapper/cmd:disk-mapper_linux_amd64 \
|
|
|
|
//measurement-reader/cmd:measurement-reader_linux_amd64 \
|
|
|
|
//upgrade-agent/cmd:upgrade_agent_linux_amd64
|
|
|
|
|
|
|
|
- name: clear
|
|
|
|
continue-on-error: true
|
|
|
|
shell: bash
|
|
|
|
env:
|
|
|
|
GH_TOKEN: ${{ github.token }}
|
|
|
|
run: |
|
|
|
|
gh extension install actions/gh-actions-cache || true
|
|
|
|
gh actions-cache delete "${CACHE_KEY}" --confirm || true
|
|
|
|
|
|
|
|
- name: save
|
|
|
|
uses: actions/cache/save@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
|
|
|
|
with:
|
|
|
|
path: |
|
|
|
|
${{ github.workspace }}/tools/pseudo-version
|
|
|
|
/home/runner/.cache/bazel
|
|
|
|
/home/runner/.cache/shared_bazel_repository_cache
|
|
|
|
/home/runner/.cache/shared_bazel_action_cache
|
|
|
|
key: ${{ env.CACHE_KEY }}
|