blob: 55cccff54088e52e39b162a1166321131bf5db6c [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(
Ravago Jones23dac942022-07-31 16:18:54 -070038 name = "yapf",
39 srcs = ["yapf.sh"],
40 data = [
41 "@python_yapf",
42 ],
43 deps = [
44 "@bazel_tools//tools/bash/runfiles",
45 ],
46)
47
48sh_binary(
Philipp Schraderace08842022-03-26 14:52:55 -070049 name = "prettier",
50 srcs = ["prettier.sh"],
51 data = [
52 "@npm//prettier/bin:prettier",
53 ],
54 target_compatible_with = ["@platforms//cpu:x86_64"],
55 deps = [
56 "@bazel_tools//tools/bash/runfiles",
57 ],
58)
59
60sh_binary(
Philipp Schrader773577f2021-12-17 23:45:39 -080061 name = "run-ci",
62 srcs = [
63 "run-ci.sh",
64 ],
65 data = [
Philipp Schradercc016b32021-12-30 08:59:58 -080066 ":buildifier",
Philipp Schrader773577f2021-12-17 23:45:39 -080067 ":gofmt",
Philipp Schraderace08842022-03-26 14:52:55 -070068 ":prettier",
Brian Silverman4e278082022-05-19 22:47:41 -070069 ":rustfmt",
Ravago Jones23dac942022-07-31 16:18:54 -070070 ":yapf",
Philipp Schrader37fdbb62021-12-18 00:30:37 -080071 "//:gazelle-runner",
Philipp Schraderd96d4cb2022-02-06 15:37:29 -080072 "//tools/go:mirror_go_repos",
Philipp Schrader37fdbb62021-12-18 00:30:37 -080073 "//tools/go:tweak_gazelle_go_deps",
Brian Silverman4e278082022-05-19 22:47:41 -070074 "//tools/rust:tweak_cargo_raze_output",
75 "@cargo_raze//:raze",
Philipp Schrader37fdbb62021-12-18 00:30:37 -080076 "@go_sdk//:bin/go",
Philipp Schrader773577f2021-12-17 23:45:39 -080077 ],
Philipp Schrader37fdbb62021-12-18 00:30:37 -080078 env = {
79 # Prevent CI errors like:
80 # failed to initialize build cache at
81 # /var/lib/buildkite-agent/.cache/go-build: permission denied
82 "RUNNING_IN_CI": "1" if RUNNING_IN_CI else "0",
83 },
Philipp Schradercc016b32021-12-30 08:59:58 -080084 target_compatible_with = ["@platforms//cpu:x86_64"],
Philipp Schrader773577f2021-12-17 23:45:39 -080085 deps = [
86 "@bazel_tools//tools/bash/runfiles",
87 ],
88)