sdg*_*sdh 5 bazel github-actions
我使用预安装的 Bazel 在 GitHub Actions 上构建代码。Bazel 能够在文件系统上缓存步骤,以跳过后续构建的工作。
但是如何将此缓存保存在 GitHub Actions 中以便在后续工作流程运行中使用?
使用缓存操作,例如:
jobs:
build_and_test_ubuntu:
name: Linux Ubuntu 20.04 Bazel build <GCC 9.3.0>
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Mount bazel cache
uses: actions/cache@v3
with:
path: "/home/runner/.cache/bazel"
key: bazel
- name: Build and Test
run: |
bazel build //...
bazel test //...
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
2002 次 |
| 最近记录: |