-
Notifications
You must be signed in to change notification settings - Fork 146
/
BUILD
70 lines (63 loc) · 1.54 KB
/
BUILD
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
load("@rules_apple//apple:macos.bzl", "macos_build_test")
load("@rules_apple//apple:watchos.bzl", "watchos_build_test")
load("@rules_apple//apple:tvos.bzl", "tvos_build_test")
load("@rules_apple//apple:ios.bzl", "ios_build_test")
load("@build_bazel_rules_swift//swift:swift.bzl", "swift_test")
config_setting(
name = "linux",
constraint_values = ["@platforms//os:linux"],
)
genrule(
name = "LinuxMain",
srcs = ["LinuxMain.swift"],
outs = ["main.swift"],
cmd = "cp $< $@",
)
swift_test(
name = "UnitTests",
srcs = glob(["YamsTests/*.swift"]) + select({
":linux": ["main.swift"],
"//conditions:default": [],
}),
data = glob(["YamsTests/Fixtures/**/*.*"]),
module_name = "YamsTests",
deps = [
"//:Yams",
],
)
macos_build_test(
name = "macOSBuildTest",
minimum_os_version = "10.13",
target_compatible_with = ["@platforms//os:macos"],
targets = [
"//:Yams",
"//:CYaml",
],
)
watchos_build_test(
name = "watchOSBuildTest",
minimum_os_version = "2.0",
target_compatible_with = ["@platforms//os:macos"],
targets = [
"//:Yams",
"//:CYaml",
],
)
tvos_build_test(
name = "tvOSBuildTest",
minimum_os_version = "9.0",
target_compatible_with = ["@platforms//os:macos"],
targets = [
"//:Yams",
"//:CYaml",
],
)
ios_build_test(
name = "iOSBuildTest",
minimum_os_version = "8.0",
target_compatible_with = ["@platforms//os:macos"],
targets = [
"//:Yams",
"//:CYaml",
],
)