blob: 57d4e08292e796316eec1b027cae9ea41265b8d2 [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(
Brian Silverman4e278082022-05-19 22:47:41 -070015 name = "rustfmt",
16 srcs = ["rustfmt.sh"],
17 data = [
18 "@rust//:rustfmt",
19 ],
20 deps = [
21 "@bazel_tools//tools/bash/runfiles",
22 ],
23)
24
25sh_binary(
Philipp Schradercc016b32021-12-30 08:59:58 -080026 name = "buildifier",
27 srcs = ["buildifier.sh"],
28 data = [
29 "@com_github_bazelbuild_buildtools//buildifier",
30 ],
31 target_compatible_with = ["@platforms//cpu:x86_64"],
32 deps = [
33 "@bazel_tools//tools/bash/runfiles",
34 ],
35)
36
37sh_binary(
Philipp Schraderace08842022-03-26 14:52:55 -070038 name = "prettier",
39 srcs = ["prettier.sh"],
40 data = [
41 "@npm//prettier/bin:prettier",
42 ],
43 target_compatible_with = ["@platforms//cpu:x86_64"],
44 deps = [
45 "@bazel_tools//tools/bash/runfiles",
46 ],
47)
48
49sh_binary(
Philipp Schrader773577f2021-12-17 23:45:39 -080050 name = "run-ci",
51 srcs = [
52 "run-ci.sh",
53 ],
54 data = [
Philipp Schradercc016b32021-12-30 08:59:58 -080055 ":buildifier",
Philipp Schrader773577f2021-12-17 23:45:39 -080056 ":gofmt",
Philipp Schraderace08842022-03-26 14:52:55 -070057 ":prettier",
Brian Silverman4e278082022-05-19 22:47:41 -070058 ":rustfmt",
Philipp Schrader37fdbb62021-12-18 00:30:37 -080059 "//:gazelle-runner",
Philipp Schraderd96d4cb2022-02-06 15:37:29 -080060 "//tools/go:mirror_go_repos",
Philipp Schrader37fdbb62021-12-18 00:30:37 -080061 "//tools/go:tweak_gazelle_go_deps",
Brian Silverman4e278082022-05-19 22:47:41 -070062 "//tools/rust:tweak_cargo_raze_output",
63 "@cargo_raze//:raze",
Philipp Schrader37fdbb62021-12-18 00:30:37 -080064 "@go_sdk//:bin/go",
Philipp Schrader773577f2021-12-17 23:45:39 -080065 ],
Philipp Schrader37fdbb62021-12-18 00:30:37 -080066 env = {
67 # Prevent CI errors like:
68 # failed to initialize build cache at
69 # /var/lib/buildkite-agent/.cache/go-build: permission denied
70 "RUNNING_IN_CI": "1" if RUNNING_IN_CI else "0",
71 },
Philipp Schradercc016b32021-12-30 08:59:58 -080072 target_compatible_with = ["@platforms//cpu:x86_64"],
Philipp Schrader773577f2021-12-17 23:45:39 -080073 deps = [
74 "@bazel_tools//tools/bash/runfiles",
75 ],
76)