Update Buildbarn and Bazel dependencies (2026-02-06) #30
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "jobs": { | |
| "build_and_test": { | |
| "name": "build_and_test ${{ matrix.host.platform_name }}", | |
| "runs-on": "${{ matrix.host.runs_on }}", | |
| "steps": [ | |
| { | |
| "name": "Check out source code", | |
| "uses": "actions/checkout@v4" | |
| }, | |
| { | |
| "name": "Installing Bazel", | |
| "run": "v=$(cat .bazelversion)\nmkdir -p ~/bin\ncurl -L https://github.com/bazelbuild/bazel/releases/download/${v}/bazel-${v}-${{matrix.host.bazel_os}}-${{matrix.host.bazel_arch}} > ~/bin/bazel\nchmod +x ~/bin/bazel\necho ~/bin >> ${GITHUB_PATH}\n", | |
| "shell": "bash" | |
| }, | |
| { | |
| "if": "matrix.host.platform_name == 'linux_amd64'", | |
| "name": "linux_amd64: build and test", | |
| "run": "bazel test --test_output=errors //..." | |
| }, | |
| { | |
| "if": "matrix.host.platform_name == 'linux_arm64'", | |
| "name": "linux_arm64: build and test", | |
| "run": "bazel test --test_output=errors //..." | |
| }, | |
| { | |
| "if": "matrix.host.cross_compile", | |
| "name": "Cross-platform builds", | |
| "run": "bazel build --platforms=@com_github_buildbarn_bb_storage//tools/platforms:darwin_amd64,@com_github_buildbarn_bb_storage//tools/platforms:darwin_arm64,@com_github_buildbarn_bb_storage//tools/platforms:freebsd_amd64,@com_github_buildbarn_bb_storage//tools/platforms:windows_amd64 --@bazel_tools//tools/test:incompatible_use_default_test_toolchain=False //..." | |
| } | |
| ], | |
| "strategy": { | |
| "matrix": { | |
| "host": [ | |
| { | |
| "bazel_arch": "x86_64", | |
| "bazel_os": "linux", | |
| "cross_compile": false, | |
| "platform_name": "linux_amd64", | |
| "runs_on": "ubuntu-24.04" | |
| }, | |
| { | |
| "bazel_arch": "arm64", | |
| "bazel_os": "linux", | |
| "cross_compile": false, | |
| "platform_name": "linux_arm64", | |
| "runs_on": "ubuntu-24.04-arm" | |
| }, | |
| { | |
| "bazel_arch": "arm64", | |
| "bazel_os": "linux", | |
| "cross_compile": true, | |
| "platform_name": "cross_compiler", | |
| "runs_on": "ubuntu-24.04-arm" | |
| } | |
| ] | |
| } | |
| } | |
| }, | |
| "lint": { | |
| "name": "lint", | |
| "runs-on": "ubuntu-24.04-arm", | |
| "steps": [ | |
| { | |
| "name": "Check out source code", | |
| "uses": "actions/checkout@v4" | |
| }, | |
| { | |
| "name": "Installing Bazel", | |
| "run": "v=$(cat .bazelversion)\nmkdir -p ~/bin\ncurl -L https://github.com/bazelbuild/bazel/releases/download/${v}/bazel-${v}-linux-arm64 > ~/bin/bazel\nchmod +x ~/bin/bazel\necho ~/bin >> ${GITHUB_PATH}\n", | |
| "shell": "bash" | |
| }, | |
| { | |
| "name": "Reformat", | |
| "run": "bazel run //tools:reformat" | |
| }, | |
| { | |
| "name": "Test style conformance", | |
| "run": "git add . && git diff --exit-code HEAD --" | |
| }, | |
| { | |
| "name": "Golint", | |
| "run": "bazel run @org_golang_x_lint//golint -- -set_exit_status $(pwd)/..." | |
| } | |
| ] | |
| } | |
| }, | |
| "name": "Build and test backend", | |
| "on": { | |
| "pull_request": { | |
| "branches": [ | |
| "main" | |
| ] | |
| }, | |
| "push": { | |
| "branches": [ | |
| "main" | |
| ] | |
| } | |
| } | |
| } |