-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathBUILD.bazel
81 lines (69 loc) · 1.5 KB
/
BUILD.bazel
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# Set all target’s visibility in this package to "public".
package(default_visibility = ["//visibility:public"])
# Load rules_haskell rules.
load(
"@rules_haskell//haskell:defs.bzl",
"haskell_binary",
"haskell_toolchain_library",
)
load(
"@euler//:euler.bzl",
"euler_test",
)
# haskell_toolchain_library can access builtin GHC packages
# and assign them a bazel target name, so that they
# can be referenced as dependencies.
haskell_toolchain_library(name = "base")
py_binary(
name = "python_solution",
srcs = [":python_solution.py"],
)
euler_test(
name = "python_test",
problem = 1,
solution = ":python_solution",
)
haskell_binary(
name = "haskell_solution",
srcs = ["haskell_solution.hs"],
deps = [":base"],
)
euler_test(
name = "haskell_test",
problem = 1,
solution = ":haskell_solution",
)
py_binary(
name = "python_solution2",
srcs = ["python_solution2.py"],
)
euler_test(
name = "python_solution2_test",
problem = 2,
solution = ":python_solution2",
)
haskell_binary(
name = "haskell_solution2",
srcs = ["haskell_solution2.hs"],
deps = [":base"],
)
euler_test(
name = "haskell_solution2_test",
problem = 2,
solution = ":haskell_solution2",
)
haskell_binary(
name = "file_example",
srcs = ["file_example.hs"],
deps = [
"//:base",
],
data = [
"@euler//:external_euler",
],
)
euler_test(
name = "file_example_test",
problem = 22,
solution = ":file_example",
)