Skip to content

Commit

Permalink
test: add Bazel cache
Browse files Browse the repository at this point in the history
  • Loading branch information
kiron1 committed Dec 22, 2024
1 parent eb300c1 commit 72bbac0
Showing 1 changed file with 13 additions and 5 deletions.
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

0 comments on commit 72bbac0

Please sign in to comment.