Skip to content

Commit

Permalink
CI: Install bazel directly, forgo bazelisk (#157)
Browse files Browse the repository at this point in the history
This brings it in line with the CI setup for the other Buildbarn
components, and reduces the setup complexity. We still use the same
source of truth as bazelisk so it still works well for developers.
  • Loading branch information
stagnation authored Dec 17, 2024
1 parent 493a57f commit 6695072
Show file tree
Hide file tree
Showing 5 changed files with 2,708 additions and 2,740 deletions.
16 changes: 4 additions & 12 deletions .github/workflows/master.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,6 @@
"build_and_test": {
"runs-on": "ubuntu-latest",
"steps": [
{
"name": "Restore Bazelisk cache",
"uses": "actions/cache@v1",
"with": {
"key": "bazelisk",
"path": "~/.cache/bazelisk"
}
},
{
"name": "Installing Bazelisk",
"run": "bazelisk_fingerprint=231ec5ca8115e94c75a1f4fbada1a062b48822ca04f21f26e4cb1cd8973cd458 &&\n(echo \"${bazelisk_fingerprint} ${HOME}/.cache/bazelisk/bazel\" | sha256sum --check --quiet) || (\n mkdir -p ~/.cache/bazelisk &&\n curl -L https://github.com/bazelbuild/bazelisk/releases/download/v1.11.0/bazelisk-linux-amd64 > ~/.cache/bazelisk/bazelisk.tmp &&\n chmod +x ~/.cache/bazelisk/bazelisk.tmp &&\n mv ~/.cache/bazelisk/bazelisk.tmp ~/.cache/bazelisk/bazel\n) &&\n(echo \"${bazelisk_fingerprint} ${HOME}/.cache/bazelisk/bazel\" | sha256sum --check --quiet) &&\necho \"~/.cache/bazelisk\" >> ${GITHUB_PATH}\n"
},
{
"name": "Installing grpcurl",
"run": "mkdir -p ~/.cache/grpcurl &&\ncurl -L https://github.com/fullstorydev/grpcurl/releases/download/v1.8.9/grpcurl_1.8.9_linux_x86_64.tar.gz | tar -xz -C ~/.cache/grpcurl &&\necho \"~/.cache/grpcurl\" >> ${GITHUB_PATH}\n"
Expand All @@ -27,6 +15,10 @@
"name": "Check out source code",
"uses": "actions/checkout@v1"
},
{
"name": "Installing Bazel",
"run": "v=$(cat .bazelversion) && curl -L https://github.com/bazelbuild/bazel/releases/download/${v}/bazel-${v}-linux-x86_64 > ~/bazel && chmod +x ~/bazel && echo ~ >> ${GITHUB_PATH}"
},
{
"name": "Gazelle",
"run": "bazel run //:gazelle"
Expand Down
16 changes: 4 additions & 12 deletions .github/workflows/pull-requests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,6 @@
"build_and_test": {
"runs-on": "ubuntu-latest",
"steps": [
{
"name": "Restore Bazelisk cache",
"uses": "actions/cache@v1",
"with": {
"key": "bazelisk",
"path": "~/.cache/bazelisk"
}
},
{
"name": "Installing Bazelisk",
"run": "bazelisk_fingerprint=231ec5ca8115e94c75a1f4fbada1a062b48822ca04f21f26e4cb1cd8973cd458 &&\n(echo \"${bazelisk_fingerprint} ${HOME}/.cache/bazelisk/bazel\" | sha256sum --check --quiet) || (\n mkdir -p ~/.cache/bazelisk &&\n curl -L https://github.com/bazelbuild/bazelisk/releases/download/v1.11.0/bazelisk-linux-amd64 > ~/.cache/bazelisk/bazelisk.tmp &&\n chmod +x ~/.cache/bazelisk/bazelisk.tmp &&\n mv ~/.cache/bazelisk/bazelisk.tmp ~/.cache/bazelisk/bazel\n) &&\n(echo \"${bazelisk_fingerprint} ${HOME}/.cache/bazelisk/bazel\" | sha256sum --check --quiet) &&\necho \"~/.cache/bazelisk\" >> ${GITHUB_PATH}\n"
},
{
"name": "Installing grpcurl",
"run": "mkdir -p ~/.cache/grpcurl &&\ncurl -L https://github.com/fullstorydev/grpcurl/releases/download/v1.8.9/grpcurl_1.8.9_linux_x86_64.tar.gz | tar -xz -C ~/.cache/grpcurl &&\necho \"~/.cache/grpcurl\" >> ${GITHUB_PATH}\n"
Expand All @@ -27,6 +15,10 @@
"name": "Check out source code",
"uses": "actions/checkout@v1"
},
{
"name": "Installing Bazel",
"run": "v=$(cat .bazelversion) && curl -L https://github.com/bazelbuild/bazel/releases/download/${v}/bazel-${v}-linux-x86_64 > ~/bazel && chmod +x ~/bazel && echo ~ >> ${GITHUB_PATH}"
},
{
"name": "Gazelle",
"run": "bazel run //:gazelle"
Expand Down
Loading

0 comments on commit 6695072

Please sign in to comment.