Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: add Bazel cache #62

Merged
merged 1 commit into from
Dec 22, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 13 additions & 5 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ name: main

on:
push:
branches: [ main ]
branches: [main]
pull_request:
branches: [ main ]
branches: [main]
workflow_dispatch:
inputs:
version:
description: 'Version `x.y.z` (without leading `v`)'
description: "Version `x.y.z` (without leading `v`)"
type: string
required: true

Expand Down Expand Up @@ -40,7 +40,7 @@ jobs:
with:
path: |
~/.cache/bazel_build_cache
key: ${{ runner.os }}-bazel-test-${{ hashFiles('WORKSPACE') }}
key: ${{ runner.os }}-bazel-test-${{ hashFiles('MODULE.bazel') }}
restore-keys: |
${{ runner.os }}-bazel-test-
- name: Run bazel test
Expand Down Expand Up @@ -91,7 +91,7 @@ jobs:
with:
path: |
~/.cache/bazel_build_cache
key: ${{ matrix.os }}-bazel-buildpkg-${{ hashFiles('WORKSPACE') }}
key: ${{ matrix.os }}-bazel-buildpkg-${{ hashFiles('MODULE.bazel') }}
restore-keys: |
${{ matrix.os }}-bazel-buildpkg-
- name: Build Release Package
Expand All @@ -117,6 +117,14 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Bazel cache
uses: actions/cache@v4
with:
path: |
~/.cache/bazel_build_cache
key: bazel-selftest-${{ hashFiles('MODUE.bazel') }}
restore-keys: |
bazel-selftest-
- name: Run bazel to generate worktree
run: bazel build --config=gnu --config=ci //...
- name: Download pkg artifact
Expand Down
Loading