Get configuration information to use the bazel-cache
service deployed for use
with NVIDIA's self-hosted runners.
This action supports the following inputs:
Name | Type | Default | Description |
---|---|---|---|
bazelrc-path |
string |
/tmp/bazelrc.nvidia |
Path to a file in .bazelrc format to append cache configuration to |
This action produces the following outputs:
Name | Type | Description |
---|---|---|
bazelrc-path |
string |
Path to a file in .bazelrc format with cache configuration |
https-url |
string |
HTTPS URL to be passed to bazel <command> --remote_cache |
In your project's .bazelrc
:
try-import /tmp/bazelrc.nvidia
In a GitHub Actions workflow file:
name: pr
on:
push:
branches:
- main
jobs:
build:
runs-on: linux-amd64-cpu4
container:
image: ubuntu:latest
steps:
- name: Install bazel
run: # ... see https://bazel.build/install/ubuntu #
- name: Set up bazel cache
uses: nv-gha-runners/setup-bazel-cache@main
- name: Build project
run: bazel build
Alternatively, if you don't want to touch any .bazelrc
files:
jobs:
build:
runs-on: linux-amd64-cpu4
container:
image: ubuntu:latest
steps:
- name: Install bazel
run: # ... see https://bazel.build/install/ubuntu #
- name: Set up bazel cache
id: setup-bazel-cache
uses: nv-gha-runners/setup-bazel-cache@main
- name: Build project
run: |
bazel build --remote_cache="${{ steps.setup-bazel-cache.outputs.https-url }}"