Replace CAS with CS and CLS #888
Workflow file for this run
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.os }}", | |
| "runs-on": "${{ matrix.host.runs_on }}", | |
| "steps": [ | |
| { | |
| "uses": "runs-on/action@v2", | |
| "with": { | |
| "metrics": "cpu" | |
| } | |
| }, | |
| { | |
| "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}-${{matrix.host.bazel_os}}-x86_64 > ~/bazel && chmod +x ~/bazel && echo ~ >> ${GITHUB_PATH}", | |
| "shell": "bash" | |
| }, | |
| { | |
| "if": "matrix.host.platform_name == 'windows_amd64'", | |
| "name": "Override .bazelrc", | |
| "run": "echo \"startup --output_base=D:/bazel_output\" >> .bazelrc" | |
| }, | |
| { | |
| "if": "matrix.host.cross_compile || matrix.host.platform_name == 'linux_amd64'", | |
| "name": "linux_amd64: build${{ matrix.host.platform_name == 'linux_amd64' && ' and test' || '' }}", | |
| "run": "bazel ${{ matrix.host.platform_name == 'linux_amd64' && 'test --test_output=errors' || 'build --@bazel_tools//tools/test:incompatible_use_default_test_toolchain=False' }} --platforms=@com_github_buildbarn_bb_storage//tools/platforms:linux_amd64 //..." | |
| }, | |
| { | |
| "if": "matrix.host.upload", | |
| "name": "linux_amd64: copy bb_replicator", | |
| "run": "rm -f bb_replicator.linux_amd64 && bazel run --run_under cp --platforms=@com_github_buildbarn_bb_storage//tools/platforms:linux_amd64 //cmd/bb_replicator $(pwd)/bb_replicator.linux_amd64" | |
| }, | |
| { | |
| "if": "matrix.host.upload", | |
| "name": "linux_amd64: upload bb_replicator", | |
| "uses": "actions/upload-artifact@v4", | |
| "with": { | |
| "name": "bb_replicator.linux_amd64", | |
| "path": "bb_replicator.linux_amd64" | |
| } | |
| }, | |
| { | |
| "if": "matrix.host.upload", | |
| "name": "linux_amd64: copy bb_storage", | |
| "run": "rm -f bb_storage.linux_amd64 && bazel run --run_under cp --platforms=@com_github_buildbarn_bb_storage//tools/platforms:linux_amd64 //cmd/bb_storage $(pwd)/bb_storage.linux_amd64" | |
| }, | |
| { | |
| "if": "matrix.host.upload", | |
| "name": "linux_amd64: upload bb_storage", | |
| "uses": "actions/upload-artifact@v4", | |
| "with": { | |
| "name": "bb_storage.linux_amd64", | |
| "path": "bb_storage.linux_amd64" | |
| } | |
| }, | |
| { | |
| "if": "matrix.host.cross_compile || matrix.host.platform_name == 'linux_amd64_v3'", | |
| "name": "linux_amd64_v3: build${{ matrix.host.platform_name == 'linux_amd64_v3' && ' and test' || '' }}", | |
| "run": "bazel ${{ matrix.host.platform_name == 'linux_amd64_v3' && 'test --test_output=errors' || 'build --@bazel_tools//tools/test:incompatible_use_default_test_toolchain=False' }} --platforms=@com_github_buildbarn_bb_storage//tools/platforms:linux_amd64_v3 //..." | |
| }, | |
| { | |
| "if": "matrix.host.upload", | |
| "name": "linux_amd64_v3: copy bb_replicator", | |
| "run": "rm -f bb_replicator.linux_amd64_v3 && bazel run --run_under cp --platforms=@com_github_buildbarn_bb_storage//tools/platforms:linux_amd64_v3 //cmd/bb_replicator $(pwd)/bb_replicator.linux_amd64_v3" | |
| }, | |
| { | |
| "if": "matrix.host.upload", | |
| "name": "linux_amd64_v3: upload bb_replicator", | |
| "uses": "actions/upload-artifact@v4", | |
| "with": { | |
| "name": "bb_replicator.linux_amd64_v3", | |
| "path": "bb_replicator.linux_amd64_v3" | |
| } | |
| }, | |
| { | |
| "if": "matrix.host.upload", | |
| "name": "linux_amd64_v3: copy bb_storage", | |
| "run": "rm -f bb_storage.linux_amd64_v3 && bazel run --run_under cp --platforms=@com_github_buildbarn_bb_storage//tools/platforms:linux_amd64_v3 //cmd/bb_storage $(pwd)/bb_storage.linux_amd64_v3" | |
| }, | |
| { | |
| "if": "matrix.host.upload", | |
| "name": "linux_amd64_v3: upload bb_storage", | |
| "uses": "actions/upload-artifact@v4", | |
| "with": { | |
| "name": "bb_storage.linux_amd64_v3", | |
| "path": "bb_storage.linux_amd64_v3" | |
| } | |
| }, | |
| { | |
| "if": "matrix.host.cross_compile || matrix.host.platform_name == 'linux_386'", | |
| "name": "linux_386: build${{ matrix.host.platform_name == 'linux_amd64' && ' and test' || '' }}", | |
| "run": "bazel ${{ matrix.host.platform_name == 'linux_amd64' && 'test --test_output=errors' || 'build --@bazel_tools//tools/test:incompatible_use_default_test_toolchain=False' }} --platforms=@com_github_buildbarn_bb_storage//tools/platforms:linux_386 //..." | |
| }, | |
| { | |
| "if": "matrix.host.upload", | |
| "name": "linux_386: copy bb_replicator", | |
| "run": "rm -f bb_replicator.linux_386 && bazel run --run_under cp --platforms=@com_github_buildbarn_bb_storage//tools/platforms:linux_386 //cmd/bb_replicator $(pwd)/bb_replicator.linux_386" | |
| }, | |
| { | |
| "if": "matrix.host.upload", | |
| "name": "linux_386: upload bb_replicator", | |
| "uses": "actions/upload-artifact@v4", | |
| "with": { | |
| "name": "bb_replicator.linux_386", | |
| "path": "bb_replicator.linux_386" | |
| } | |
| }, | |
| { | |
| "if": "matrix.host.upload", | |
| "name": "linux_386: copy bb_storage", | |
| "run": "rm -f bb_storage.linux_386 && bazel run --run_under cp --platforms=@com_github_buildbarn_bb_storage//tools/platforms:linux_386 //cmd/bb_storage $(pwd)/bb_storage.linux_386" | |
| }, | |
| { | |
| "if": "matrix.host.upload", | |
| "name": "linux_386: upload bb_storage", | |
| "uses": "actions/upload-artifact@v4", | |
| "with": { | |
| "name": "bb_storage.linux_386", | |
| "path": "bb_storage.linux_386" | |
| } | |
| }, | |
| { | |
| "if": "matrix.host.cross_compile || matrix.host.platform_name == 'linux_arm'", | |
| "name": "linux_arm: build${{ matrix.host.platform_name == 'linux_arm' && ' and test' || '' }}", | |
| "run": "bazel ${{ matrix.host.platform_name == 'linux_arm' && 'test --test_output=errors' || 'build --@bazel_tools//tools/test:incompatible_use_default_test_toolchain=False' }} --platforms=@com_github_buildbarn_bb_storage//tools/platforms:linux_arm //..." | |
| }, | |
| { | |
| "if": "matrix.host.upload", | |
| "name": "linux_arm: copy bb_replicator", | |
| "run": "rm -f bb_replicator.linux_arm && bazel run --run_under cp --platforms=@com_github_buildbarn_bb_storage//tools/platforms:linux_arm //cmd/bb_replicator $(pwd)/bb_replicator.linux_arm" | |
| }, | |
| { | |
| "if": "matrix.host.upload", | |
| "name": "linux_arm: upload bb_replicator", | |
| "uses": "actions/upload-artifact@v4", | |
| "with": { | |
| "name": "bb_replicator.linux_arm", | |
| "path": "bb_replicator.linux_arm" | |
| } | |
| }, | |
| { | |
| "if": "matrix.host.upload", | |
| "name": "linux_arm: copy bb_storage", | |
| "run": "rm -f bb_storage.linux_arm && bazel run --run_under cp --platforms=@com_github_buildbarn_bb_storage//tools/platforms:linux_arm //cmd/bb_storage $(pwd)/bb_storage.linux_arm" | |
| }, | |
| { | |
| "if": "matrix.host.upload", | |
| "name": "linux_arm: upload bb_storage", | |
| "uses": "actions/upload-artifact@v4", | |
| "with": { | |
| "name": "bb_storage.linux_arm", | |
| "path": "bb_storage.linux_arm" | |
| } | |
| }, | |
| { | |
| "if": "matrix.host.cross_compile || matrix.host.platform_name == 'linux_arm64'", | |
| "name": "linux_arm64: build${{ matrix.host.platform_name == 'linux_arm64' && ' and test' || '' }}", | |
| "run": "bazel ${{ matrix.host.platform_name == 'linux_arm64' && 'test --test_output=errors' || 'build --@bazel_tools//tools/test:incompatible_use_default_test_toolchain=False' }} --platforms=@com_github_buildbarn_bb_storage//tools/platforms:linux_arm64 //..." | |
| }, | |
| { | |
| "if": "matrix.host.upload", | |
| "name": "linux_arm64: copy bb_replicator", | |
| "run": "rm -f bb_replicator.linux_arm64 && bazel run --run_under cp --platforms=@com_github_buildbarn_bb_storage//tools/platforms:linux_arm64 //cmd/bb_replicator $(pwd)/bb_replicator.linux_arm64" | |
| }, | |
| { | |
| "if": "matrix.host.upload", | |
| "name": "linux_arm64: upload bb_replicator", | |
| "uses": "actions/upload-artifact@v4", | |
| "with": { | |
| "name": "bb_replicator.linux_arm64", | |
| "path": "bb_replicator.linux_arm64" | |
| } | |
| }, | |
| { | |
| "if": "matrix.host.upload", | |
| "name": "linux_arm64: copy bb_storage", | |
| "run": "rm -f bb_storage.linux_arm64 && bazel run --run_under cp --platforms=@com_github_buildbarn_bb_storage//tools/platforms:linux_arm64 //cmd/bb_storage $(pwd)/bb_storage.linux_arm64" | |
| }, | |
| { | |
| "if": "matrix.host.upload", | |
| "name": "linux_arm64: upload bb_storage", | |
| "uses": "actions/upload-artifact@v4", | |
| "with": { | |
| "name": "bb_storage.linux_arm64", | |
| "path": "bb_storage.linux_arm64" | |
| } | |
| }, | |
| { | |
| "if": "matrix.host.cross_compile || matrix.host.platform_name == 'darwin_amd64'", | |
| "name": "darwin_amd64: build${{ matrix.host.platform_name == 'darwin_amd64' && ' and test' || '' }}", | |
| "run": "bazel ${{ matrix.host.platform_name == 'darwin_amd64' && 'test --test_output=errors' || 'build --@bazel_tools//tools/test:incompatible_use_default_test_toolchain=False' }} --platforms=@com_github_buildbarn_bb_storage//tools/platforms:darwin_amd64 //..." | |
| }, | |
| { | |
| "if": "matrix.host.upload", | |
| "name": "darwin_amd64: copy bb_replicator", | |
| "run": "rm -f bb_replicator.darwin_amd64 && bazel run --run_under cp --platforms=@com_github_buildbarn_bb_storage//tools/platforms:darwin_amd64 //cmd/bb_replicator $(pwd)/bb_replicator.darwin_amd64" | |
| }, | |
| { | |
| "if": "matrix.host.upload", | |
| "name": "darwin_amd64: upload bb_replicator", | |
| "uses": "actions/upload-artifact@v4", | |
| "with": { | |
| "name": "bb_replicator.darwin_amd64", | |
| "path": "bb_replicator.darwin_amd64" | |
| } | |
| }, | |
| { | |
| "if": "matrix.host.upload", | |
| "name": "darwin_amd64: copy bb_storage", | |
| "run": "rm -f bb_storage.darwin_amd64 && bazel run --run_under cp --platforms=@com_github_buildbarn_bb_storage//tools/platforms:darwin_amd64 //cmd/bb_storage $(pwd)/bb_storage.darwin_amd64" | |
| }, | |
| { | |
| "if": "matrix.host.upload", | |
| "name": "darwin_amd64: upload bb_storage", | |
| "uses": "actions/upload-artifact@v4", | |
| "with": { | |
| "name": "bb_storage.darwin_amd64", | |
| "path": "bb_storage.darwin_amd64" | |
| } | |
| }, | |
| { | |
| "if": "matrix.host.cross_compile || matrix.host.platform_name == 'darwin_arm64'", | |
| "name": "darwin_arm64: build${{ matrix.host.platform_name == 'darwin_arm64' && ' and test' || '' }}", | |
| "run": "bazel ${{ matrix.host.platform_name == 'darwin_arm64' && 'test --test_output=errors' || 'build --@bazel_tools//tools/test:incompatible_use_default_test_toolchain=False' }} --platforms=@com_github_buildbarn_bb_storage//tools/platforms:darwin_arm64 //..." | |
| }, | |
| { | |
| "if": "matrix.host.upload", | |
| "name": "darwin_arm64: copy bb_replicator", | |
| "run": "rm -f bb_replicator.darwin_arm64 && bazel run --run_under cp --platforms=@com_github_buildbarn_bb_storage//tools/platforms:darwin_arm64 //cmd/bb_replicator $(pwd)/bb_replicator.darwin_arm64" | |
| }, | |
| { | |
| "if": "matrix.host.upload", | |
| "name": "darwin_arm64: upload bb_replicator", | |
| "uses": "actions/upload-artifact@v4", | |
| "with": { | |
| "name": "bb_replicator.darwin_arm64", | |
| "path": "bb_replicator.darwin_arm64" | |
| } | |
| }, | |
| { | |
| "if": "matrix.host.upload", | |
| "name": "darwin_arm64: copy bb_storage", | |
| "run": "rm -f bb_storage.darwin_arm64 && bazel run --run_under cp --platforms=@com_github_buildbarn_bb_storage//tools/platforms:darwin_arm64 //cmd/bb_storage $(pwd)/bb_storage.darwin_arm64" | |
| }, | |
| { | |
| "if": "matrix.host.upload", | |
| "name": "darwin_arm64: upload bb_storage", | |
| "uses": "actions/upload-artifact@v4", | |
| "with": { | |
| "name": "bb_storage.darwin_arm64", | |
| "path": "bb_storage.darwin_arm64" | |
| } | |
| }, | |
| { | |
| "if": "matrix.host.cross_compile || matrix.host.platform_name == 'freebsd_amd64'", | |
| "name": "freebsd_amd64: build${{ matrix.host.platform_name == 'freebsd_amd64' && ' and test' || '' }}", | |
| "run": "bazel ${{ matrix.host.platform_name == 'freebsd_amd64' && 'test --test_output=errors' || 'build --@bazel_tools//tools/test:incompatible_use_default_test_toolchain=False' }} --platforms=@com_github_buildbarn_bb_storage//tools/platforms:freebsd_amd64 //..." | |
| }, | |
| { | |
| "if": "matrix.host.upload", | |
| "name": "freebsd_amd64: copy bb_replicator", | |
| "run": "rm -f bb_replicator.freebsd_amd64 && bazel run --run_under cp --platforms=@com_github_buildbarn_bb_storage//tools/platforms:freebsd_amd64 //cmd/bb_replicator $(pwd)/bb_replicator.freebsd_amd64" | |
| }, | |
| { | |
| "if": "matrix.host.upload", | |
| "name": "freebsd_amd64: upload bb_replicator", | |
| "uses": "actions/upload-artifact@v4", | |
| "with": { | |
| "name": "bb_replicator.freebsd_amd64", | |
| "path": "bb_replicator.freebsd_amd64" | |
| } | |
| }, | |
| { | |
| "if": "matrix.host.upload", | |
| "name": "freebsd_amd64: copy bb_storage", | |
| "run": "rm -f bb_storage.freebsd_amd64 && bazel run --run_under cp --platforms=@com_github_buildbarn_bb_storage//tools/platforms:freebsd_amd64 //cmd/bb_storage $(pwd)/bb_storage.freebsd_amd64" | |
| }, | |
| { | |
| "if": "matrix.host.upload", | |
| "name": "freebsd_amd64: upload bb_storage", | |
| "uses": "actions/upload-artifact@v4", | |
| "with": { | |
| "name": "bb_storage.freebsd_amd64", | |
| "path": "bb_storage.freebsd_amd64" | |
| } | |
| }, | |
| { | |
| "if": "matrix.host.cross_compile || matrix.host.platform_name == 'windows_amd64'", | |
| "name": "windows_amd64: build${{ matrix.host.platform_name == 'windows_amd64' && ' and test' || '' }}", | |
| "run": "bazel ${{ matrix.host.platform_name == 'windows_amd64' && 'test --test_output=errors' || 'build --@bazel_tools//tools/test:incompatible_use_default_test_toolchain=False' }} --platforms=@com_github_buildbarn_bb_storage//tools/platforms:windows_amd64 //..." | |
| }, | |
| { | |
| "if": "matrix.host.upload", | |
| "name": "windows_amd64: copy bb_replicator", | |
| "run": "rm -f bb_replicator.windows_amd64.exe && bazel run --run_under cp --platforms=@com_github_buildbarn_bb_storage//tools/platforms:windows_amd64 //cmd/bb_replicator $(pwd)/bb_replicator.windows_amd64.exe" | |
| }, | |
| { | |
| "if": "matrix.host.upload", | |
| "name": "windows_amd64: upload bb_replicator", | |
| "uses": "actions/upload-artifact@v4", | |
| "with": { | |
| "name": "bb_replicator.windows_amd64", | |
| "path": "bb_replicator.windows_amd64.exe" | |
| } | |
| }, | |
| { | |
| "if": "matrix.host.upload", | |
| "name": "windows_amd64: copy bb_storage", | |
| "run": "rm -f bb_storage.windows_amd64.exe && bazel run --run_under cp --platforms=@com_github_buildbarn_bb_storage//tools/platforms:windows_amd64 //cmd/bb_storage $(pwd)/bb_storage.windows_amd64.exe" | |
| }, | |
| { | |
| "if": "matrix.host.upload", | |
| "name": "windows_amd64: upload bb_storage", | |
| "uses": "actions/upload-artifact@v4", | |
| "with": { | |
| "name": "bb_storage.windows_amd64", | |
| "path": "bb_storage.windows_amd64.exe" | |
| } | |
| }, | |
| { | |
| "if": "matrix.host.upload", | |
| "name": "Configure AWS credentials", | |
| "uses": "aws-actions/configure-aws-credentials@v4", | |
| "with": { | |
| "aws-region": "eu-central-1", | |
| "role-to-assume": "${{ secrets.AWS_ROLE_TO_ASSUME }}" | |
| } | |
| }, | |
| { | |
| "if": "matrix.host.upload", | |
| "name": "Login to Amazon ECR", | |
| "uses": "aws-actions/amazon-ecr-login@v2" | |
| }, | |
| { | |
| "if": "matrix.host.upload", | |
| "name": "Clean Bazel cache from previous steps", | |
| "run": "bazel clean" | |
| }, | |
| { | |
| "if": "matrix.host.upload", | |
| "name": "Push container bb_replicator:bb_replicator", | |
| "run": "bazel run --stamp //cmd/bb_replicator:bb_replicator_container_push" | |
| }, | |
| { | |
| "if": "matrix.host.upload", | |
| "name": "Push container bb_storage:bb_storage", | |
| "run": "bazel run --stamp //cmd/bb_storage:bb_storage_container_push" | |
| } | |
| ], | |
| "strategy": { | |
| "matrix": { | |
| "host": [ | |
| { | |
| "bazel_os": "linux", | |
| "cross_compile": true, | |
| "os": "ubuntu-latest", | |
| "platform_name": "linux_amd64", | |
| "runs_on": "runs-on=${{ github.run_id }}/runner=8cpu-linux-x64/extras=s3-cache", | |
| "upload": true | |
| }, | |
| { | |
| "bazel_os": "windows", | |
| "cross_compile": false, | |
| "os": "windows-latest", | |
| "platform_name": "windows_amd64", | |
| "runs_on": "windows-latest", | |
| "upload": false | |
| } | |
| ] | |
| } | |
| } | |
| }, | |
| "lint": { | |
| "name": "lint", | |
| "runs-on": "runs-on=${{ github.run_id }}/runner=2cpu-linux-x64/extras=s3-cache", | |
| "steps": [ | |
| { | |
| "uses": "runs-on/action@v2", | |
| "with": { | |
| "metrics": "cpu" | |
| } | |
| }, | |
| { | |
| "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}", | |
| "shell": "bash" | |
| }, | |
| { | |
| "name": "Reformat", | |
| "run": "bazel run @com_github_buildbarn_bb_storage//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": "pull-requests", | |
| "on": { | |
| "pull_request": { | |
| "branches": [ | |
| "main" | |
| ] | |
| } | |
| }, | |
| "permissions": { | |
| "contents": "write", | |
| "id-token": "write" | |
| } | |
| } |