Skip to content

Commit 6695072

Browse files
authored
CI: Install bazel directly, forgo bazelisk (#157)
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.
1 parent 493a57f commit 6695072

File tree

5 files changed

+2708
-2740
lines changed

5 files changed

+2708
-2740
lines changed

.github/workflows/master.yaml

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,6 @@
33
"build_and_test": {
44
"runs-on": "ubuntu-latest",
55
"steps": [
6-
{
7-
"name": "Restore Bazelisk cache",
8-
"uses": "actions/cache@v1",
9-
"with": {
10-
"key": "bazelisk",
11-
"path": "~/.cache/bazelisk"
12-
}
13-
},
14-
{
15-
"name": "Installing Bazelisk",
16-
"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"
17-
},
186
{
197
"name": "Installing grpcurl",
208
"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"
@@ -27,6 +15,10 @@
2715
"name": "Check out source code",
2816
"uses": "actions/checkout@v1"
2917
},
18+
{
19+
"name": "Installing Bazel",
20+
"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}"
21+
},
3022
{
3123
"name": "Gazelle",
3224
"run": "bazel run //:gazelle"

.github/workflows/pull-requests.yaml

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,6 @@
33
"build_and_test": {
44
"runs-on": "ubuntu-latest",
55
"steps": [
6-
{
7-
"name": "Restore Bazelisk cache",
8-
"uses": "actions/cache@v1",
9-
"with": {
10-
"key": "bazelisk",
11-
"path": "~/.cache/bazelisk"
12-
}
13-
},
14-
{
15-
"name": "Installing Bazelisk",
16-
"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"
17-
},
186
{
197
"name": "Installing grpcurl",
208
"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"
@@ -27,6 +15,10 @@
2715
"name": "Check out source code",
2816
"uses": "actions/checkout@v1"
2917
},
18+
{
19+
"name": "Installing Bazel",
20+
"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}"
21+
},
3022
{
3123
"name": "Gazelle",
3224
"run": "bazel run //:gazelle"

0 commit comments

Comments
 (0)