Skip to content

Bring WORKSPACE in sync with other repositories #35

Bring WORKSPACE in sync with other repositories

Bring WORKSPACE in sync with other repositories #35

Workflow file for this run

{
"jobs": {
"build_and_test": {
"runs-on": "ubuntu-latest",
"steps": [
{
"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 -- update-repos -from_file=go.mod -to_macro go_dependencies.bzl%go_dependencies -prune && bazel run //:gazelle"
},
{
"name": "Buildifier",
"run": "sed '/^$/d' go_dependencies.bzl > go_dependencies.bzl.new && mv go_dependencies.bzl.new go_dependencies.bzl && bazel run @com_github_bazelbuild_buildtools//:buildifier"
},
{
"name": "Gofmt",
"run": "bazel run @cc_mvdan_gofumpt//:gofumpt -- -lang 1.19 -w -extra $(pwd)"
},
{
"name": "Clang format",
"run": "find . -name '*.proto' -exec bazel run @llvm_toolchain_llvm//:bin/clang-format -- -i {} +"
},
{
"name": "GitHub workflows",
"run": "bazel build //tools/github_workflows && cp bazel-bin/tools/github_workflows/*.yaml .github/workflows"
},
{
"name": "Protobuf generation",
"run": "find . bazel-bin/pkg/proto -name '*.pb.go' -delete || true\nbazel build $(bazel query --output=label 'kind(\"go_proto_library\", //...)')\nfind bazel-bin/pkg/proto -name '*.pb.go' | while read f; do\n cat $f > $(echo $f | sed -e 's|.*/pkg/proto/|pkg/proto/|')\ndone\n"
},
{
"name": "Embedded asset generation",
"run": "bazel build $(git grep '^[[:space:]]*//go:embed ' | sed -e 's|\\(.*\\)/.*//go:embed |//\\1:|' | sort -u)\ngit grep '^[[:space:]]*//go:embed ' | sed -e 's|\\(.*\\)/.*//go:embed |\\1/|' | while read o; do\n if [ -e \"bazel-bin/$o\" ]; then\n rm -rf \"$o\"\n cp -r \"bazel-bin/$o\" \"$o\"\n find \"$o\" -type f -exec chmod -x {} +\n fi\ndone\n"
},
{
"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": "linux_amd64: build and test",
"run": "bazel test --test_output=errors --platforms=@io_bazel_rules_go//go/toolchain:linux_amd64 //..."
},
{
"name": "linux_amd64: copy bb_asg_lifecycle_hook",
"run": "rm -f bb_asg_lifecycle_hook && bazel run --run_under cp --platforms=@io_bazel_rules_go//go/toolchain:linux_amd64 //cmd/bb_asg_lifecycle_hook $(pwd)/bb_asg_lifecycle_hook"
},
{
"name": "linux_amd64: upload bb_asg_lifecycle_hook",
"uses": "actions/upload-artifact@v2-preview",
"with": {
"name": "bb_asg_lifecycle_hook.linux_amd64",
"path": "bb_asg_lifecycle_hook"
}
},
{
"name": "linux_amd64: copy bb_autoscaler",
"run": "rm -f bb_autoscaler && bazel run --run_under cp --platforms=@io_bazel_rules_go//go/toolchain:linux_amd64 //cmd/bb_autoscaler $(pwd)/bb_autoscaler"
},
{
"name": "linux_amd64: upload bb_autoscaler",
"uses": "actions/upload-artifact@v2-preview",
"with": {
"name": "bb_autoscaler.linux_amd64",
"path": "bb_autoscaler"
}
},
{
"name": "linux_386: build and test",
"run": "bazel test --test_output=errors --platforms=@io_bazel_rules_go//go/toolchain:linux_386 //..."
},
{
"name": "linux_386: copy bb_asg_lifecycle_hook",
"run": "rm -f bb_asg_lifecycle_hook && bazel run --run_under cp --platforms=@io_bazel_rules_go//go/toolchain:linux_386 //cmd/bb_asg_lifecycle_hook $(pwd)/bb_asg_lifecycle_hook"
},
{
"name": "linux_386: upload bb_asg_lifecycle_hook",
"uses": "actions/upload-artifact@v2-preview",
"with": {
"name": "bb_asg_lifecycle_hook.linux_386",
"path": "bb_asg_lifecycle_hook"
}
},
{
"name": "linux_386: copy bb_autoscaler",
"run": "rm -f bb_autoscaler && bazel run --run_under cp --platforms=@io_bazel_rules_go//go/toolchain:linux_386 //cmd/bb_autoscaler $(pwd)/bb_autoscaler"
},
{
"name": "linux_386: upload bb_autoscaler",
"uses": "actions/upload-artifact@v2-preview",
"with": {
"name": "bb_autoscaler.linux_386",
"path": "bb_autoscaler"
}
},
{
"name": "linux_arm: build and test",
"run": "bazel build --platforms=@io_bazel_rules_go//go/toolchain:linux_arm //..."
},
{
"name": "linux_arm: copy bb_asg_lifecycle_hook",
"run": "rm -f bb_asg_lifecycle_hook && bazel run --run_under cp --platforms=@io_bazel_rules_go//go/toolchain:linux_arm //cmd/bb_asg_lifecycle_hook $(pwd)/bb_asg_lifecycle_hook"
},
{
"name": "linux_arm: upload bb_asg_lifecycle_hook",
"uses": "actions/upload-artifact@v2-preview",
"with": {
"name": "bb_asg_lifecycle_hook.linux_arm",
"path": "bb_asg_lifecycle_hook"
}
},
{
"name": "linux_arm: copy bb_autoscaler",
"run": "rm -f bb_autoscaler && bazel run --run_under cp --platforms=@io_bazel_rules_go//go/toolchain:linux_arm //cmd/bb_autoscaler $(pwd)/bb_autoscaler"
},
{
"name": "linux_arm: upload bb_autoscaler",
"uses": "actions/upload-artifact@v2-preview",
"with": {
"name": "bb_autoscaler.linux_arm",
"path": "bb_autoscaler"
}
},
{
"name": "linux_arm64: build and test",
"run": "bazel build --platforms=@io_bazel_rules_go//go/toolchain:linux_arm64 //..."
},
{
"name": "linux_arm64: copy bb_asg_lifecycle_hook",
"run": "rm -f bb_asg_lifecycle_hook && bazel run --run_under cp --platforms=@io_bazel_rules_go//go/toolchain:linux_arm64 //cmd/bb_asg_lifecycle_hook $(pwd)/bb_asg_lifecycle_hook"
},
{
"name": "linux_arm64: upload bb_asg_lifecycle_hook",
"uses": "actions/upload-artifact@v2-preview",
"with": {
"name": "bb_asg_lifecycle_hook.linux_arm64",
"path": "bb_asg_lifecycle_hook"
}
},
{
"name": "linux_arm64: copy bb_autoscaler",
"run": "rm -f bb_autoscaler && bazel run --run_under cp --platforms=@io_bazel_rules_go//go/toolchain:linux_arm64 //cmd/bb_autoscaler $(pwd)/bb_autoscaler"
},
{
"name": "linux_arm64: upload bb_autoscaler",
"uses": "actions/upload-artifact@v2-preview",
"with": {
"name": "bb_autoscaler.linux_arm64",
"path": "bb_autoscaler"
}
},
{
"name": "darwin_amd64: build and test",
"run": "bazel build --platforms=@io_bazel_rules_go//go/toolchain:darwin_amd64 //..."
},
{
"name": "darwin_amd64: copy bb_asg_lifecycle_hook",
"run": "rm -f bb_asg_lifecycle_hook && bazel run --run_under cp --platforms=@io_bazel_rules_go//go/toolchain:darwin_amd64 //cmd/bb_asg_lifecycle_hook $(pwd)/bb_asg_lifecycle_hook"
},
{
"name": "darwin_amd64: upload bb_asg_lifecycle_hook",
"uses": "actions/upload-artifact@v2-preview",
"with": {
"name": "bb_asg_lifecycle_hook.darwin_amd64",
"path": "bb_asg_lifecycle_hook"
}
},
{
"name": "darwin_amd64: copy bb_autoscaler",
"run": "rm -f bb_autoscaler && bazel run --run_under cp --platforms=@io_bazel_rules_go//go/toolchain:darwin_amd64 //cmd/bb_autoscaler $(pwd)/bb_autoscaler"
},
{
"name": "darwin_amd64: upload bb_autoscaler",
"uses": "actions/upload-artifact@v2-preview",
"with": {
"name": "bb_autoscaler.darwin_amd64",
"path": "bb_autoscaler"
}
},
{
"name": "darwin_arm64: build and test",
"run": "bazel build --platforms=@io_bazel_rules_go//go/toolchain:darwin_arm64 //..."
},
{
"name": "darwin_arm64: copy bb_asg_lifecycle_hook",
"run": "rm -f bb_asg_lifecycle_hook && bazel run --run_under cp --platforms=@io_bazel_rules_go//go/toolchain:darwin_arm64 //cmd/bb_asg_lifecycle_hook $(pwd)/bb_asg_lifecycle_hook"
},
{
"name": "darwin_arm64: upload bb_asg_lifecycle_hook",
"uses": "actions/upload-artifact@v2-preview",
"with": {
"name": "bb_asg_lifecycle_hook.darwin_arm64",
"path": "bb_asg_lifecycle_hook"
}
},
{
"name": "darwin_arm64: copy bb_autoscaler",
"run": "rm -f bb_autoscaler && bazel run --run_under cp --platforms=@io_bazel_rules_go//go/toolchain:darwin_arm64 //cmd/bb_autoscaler $(pwd)/bb_autoscaler"
},
{
"name": "darwin_arm64: upload bb_autoscaler",
"uses": "actions/upload-artifact@v2-preview",
"with": {
"name": "bb_autoscaler.darwin_arm64",
"path": "bb_autoscaler"
}
},
{
"name": "freebsd_amd64: build and test",
"run": "bazel build --platforms=@io_bazel_rules_go//go/toolchain:freebsd_amd64 //cmd/bb_asg_lifecycle_hook //cmd/bb_autoscaler"
},
{
"name": "freebsd_amd64: copy bb_asg_lifecycle_hook",
"run": "rm -f bb_asg_lifecycle_hook && bazel run --run_under cp --platforms=@io_bazel_rules_go//go/toolchain:freebsd_amd64 //cmd/bb_asg_lifecycle_hook $(pwd)/bb_asg_lifecycle_hook"
},
{
"name": "freebsd_amd64: upload bb_asg_lifecycle_hook",
"uses": "actions/upload-artifact@v2-preview",
"with": {
"name": "bb_asg_lifecycle_hook.freebsd_amd64",
"path": "bb_asg_lifecycle_hook"
}
},
{
"name": "freebsd_amd64: copy bb_autoscaler",
"run": "rm -f bb_autoscaler && bazel run --run_under cp --platforms=@io_bazel_rules_go//go/toolchain:freebsd_amd64 //cmd/bb_autoscaler $(pwd)/bb_autoscaler"
},
{
"name": "freebsd_amd64: upload bb_autoscaler",
"uses": "actions/upload-artifact@v2-preview",
"with": {
"name": "bb_autoscaler.freebsd_amd64",
"path": "bb_autoscaler"
}
},
{
"name": "windows_amd64: build and test",
"run": "bazel build --platforms=@io_bazel_rules_go//go/toolchain:windows_amd64 //..."
},
{
"name": "windows_amd64: copy bb_asg_lifecycle_hook",
"run": "rm -f bb_asg_lifecycle_hook.exe && bazel run --run_under cp --platforms=@io_bazel_rules_go//go/toolchain:windows_amd64 //cmd/bb_asg_lifecycle_hook $(pwd)/bb_asg_lifecycle_hook.exe"
},
{
"name": "windows_amd64: upload bb_asg_lifecycle_hook",
"uses": "actions/upload-artifact@v2-preview",
"with": {
"name": "bb_asg_lifecycle_hook.windows_amd64",
"path": "bb_asg_lifecycle_hook.exe"
}
},
{
"name": "windows_amd64: copy bb_autoscaler",
"run": "rm -f bb_autoscaler.exe && bazel run --run_under cp --platforms=@io_bazel_rules_go//go/toolchain:windows_amd64 //cmd/bb_autoscaler $(pwd)/bb_autoscaler.exe"
},
{
"name": "windows_amd64: upload bb_autoscaler",
"uses": "actions/upload-artifact@v2-preview",
"with": {
"name": "bb_autoscaler.windows_amd64",
"path": "bb_autoscaler.exe"
}
},
{
"env": {
"GITHUB_TOKEN": "${{ secrets.GITHUB_TOKEN }}"
},
"name": "Install Docker credentials",
"run": "echo \"${GITHUB_TOKEN}\" | docker login ghcr.io -u $ --password-stdin"
},
{
"name": "Push container bb_asg_lifecycle_hook:bb_asg_lifecycle_hook",
"run": "bazel run --stamp //cmd/bb_asg_lifecycle_hook:bb_asg_lifecycle_hook_container_push"
},
{
"name": "Push container bb_autoscaler:bb_autoscaler",
"run": "bazel run --stamp //cmd/bb_autoscaler:bb_autoscaler_container_push"
}
]
}
},
"name": "master",
"on": {
"push": {
"branches": [
"master"
]
}
}
}