blob: d33d786166ca6ee924d7419208e6b56dc19335be [file] [log] [blame]
Philipp Schrader37fdbb62021-12-18 00:30:37 -08001load("@ci_configure//:ci.bzl", "RUNNING_IN_CI")
2
Philipp Schrader773577f2021-12-17 23:45:39 -08003sh_binary(
4 name = "gofmt",
5 srcs = ["gofmt.sh"],
6 data = [
7 "@go_sdk//:bin/gofmt",
8 ],
9 deps = [
10 "@bazel_tools//tools/bash/runfiles",
11 ],
12)
13
14sh_binary(
Philipp Schradercc016b32021-12-30 08:59:58 -080015 name = "buildifier",
16 srcs = ["buildifier.sh"],
17 data = [
18 "@com_github_bazelbuild_buildtools//buildifier",
19 ],
20 target_compatible_with = ["@platforms//cpu:x86_64"],
21 deps = [
22 "@bazel_tools//tools/bash/runfiles",
23 ],
24)
25
26sh_binary(
Philipp Schrader773577f2021-12-17 23:45:39 -080027 name = "run-ci",
28 srcs = [
29 "run-ci.sh",
30 ],
31 data = [
Philipp Schradercc016b32021-12-30 08:59:58 -080032 ":buildifier",
Philipp Schrader773577f2021-12-17 23:45:39 -080033 ":gofmt",
Philipp Schrader37fdbb62021-12-18 00:30:37 -080034 "//:gazelle-runner",
35 "//tools/go:tweak_gazelle_go_deps",
36 "@go_sdk//:bin/go",
Philipp Schrader773577f2021-12-17 23:45:39 -080037 ],
Philipp Schrader37fdbb62021-12-18 00:30:37 -080038 env = {
39 # Prevent CI errors like:
40 # failed to initialize build cache at
41 # /var/lib/buildkite-agent/.cache/go-build: permission denied
42 "RUNNING_IN_CI": "1" if RUNNING_IN_CI else "0",
43 },
Philipp Schradercc016b32021-12-30 08:59:58 -080044 target_compatible_with = ["@platforms//cpu:x86_64"],
Philipp Schrader773577f2021-12-17 23:45:39 -080045 deps = [
46 "@bazel_tools//tools/bash/runfiles",
47 ],
48)