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

Migrate Bazelisk actions to new variant #760

Merged
merged 1 commit into from
Mar 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
20 changes: 12 additions & 8 deletions .github/workflows/native-bazel.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,10 @@ jobs:
actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11

- name: Setup Bazelisk
uses: >- # Custom commit at 2023-10-23
bazelbuild/setup-bazelisk@5bc144ec07bd24eaa9b5c3e8c9af4006b033b629
uses: >- # v0.8.1
bazel-contrib/setup-bazel@b388b84bb637e50cdae241d0f255670d4bd79f29
with:
bazelisk-cache: true

- name: Determine Bazel cache mountpoint
id: bazel-cache
Expand All @@ -41,8 +43,8 @@ jobs:
shell: bash

- name: Mount bazel cache
uses: >- # v3.3.2
actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84
uses: >- # v4.0.1
actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319
with:
path: |
${{ steps.bazel-cache.outputs.mountpoint }}
Expand Down Expand Up @@ -82,12 +84,14 @@ jobs:
actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11

- name: Setup Bazelisk
uses: >- # Custom commit at 2023-10-23
bazelbuild/setup-bazelisk@5bc144ec07bd24eaa9b5c3e8c9af4006b033b629
uses: >- # v0.8.1
bazel-contrib/setup-bazel@b388b84bb637e50cdae241d0f255670d4bd79f29
with:
bazelisk-cache: true

- name: Mount bazel cache
uses: >- # v3.3.2
actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84
uses: >- # v4.0.1
actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319
with:
path: |
~/.cache/bazel
Expand Down
13 changes: 6 additions & 7 deletions .github/workflows/nix.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,12 @@ jobs:
uses: >- # Custom commit, last pinned at 2024-03-03.
DeterminateSystems/magic-nix-cache-action@742d8701e54851d2136f71b61d31382a4f4d0788

# TODO(aaronmondal): Reenable after https://github.com/TraceMachina/nativelink/pull/690
# - name: Mount bazel cache
# uses: >- # v3.3.2
# actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84
# with:
# path: "~/.cache/bazel"
# key: ${{ runner.os }}-bazel-nix
- name: Mount bazel cache
uses: >- # v4.0.1
actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319
with:
path: "~/.cache/bazel"
key: ${{ runner.os }}-bazel-nix

- name: Invoke Bazel build in Nix shell
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pre-commit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ jobs:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: >- # v3.5.3
actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9
uses: >- # v4.1.1
actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11

- name: Install Nix
uses: >- # v9
Expand Down
18 changes: 6 additions & 12 deletions .github/workflows/sanitizers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,12 @@ jobs:
- uses: >- # v4.1.1
actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11

- uses: >- # Custom commit at 2023-10-23
bazelbuild/setup-bazelisk@5bc144ec07bd24eaa9b5c3e8c9af4006b033b629

# TODO(aaronmondal): This cache is ~4 gigabytes in size and potentially
# leads to `no space left on device` errors. Find a
# more robust solution.
# - name: Mount bazel cache
# uses: >- # v3.3.2
# actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84
# with:
# path: ~/.cache/bazel
# key: ${{ matrix.os }}-bazel-${{ matrix.sanitizer }}
- name: Setup Bazelisk
uses: >- # v0.8.1
bazel-contrib/setup-bazel@b388b84bb637e50cdae241d0f255670d4bd79f29
with:
bazelisk-cache: true
repository-cache: true

- name: Run Bazel tests
run: bazel test --config=${{ matrix.sanitizer }} --verbose_failures //...
Expand Down