forked from RobotLocomotion/drake
-
Notifications
You must be signed in to change notification settings - Fork 0
/
BUILD.bazel
168 lines (156 loc) · 4.27 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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
load("//tools/lint:lint.bzl", "add_lint_tests")
load(
"//tools/skylark:drake_py.bzl",
"drake_py_binary",
"drake_py_library",
)
load(
":defs.bzl",
"DEFAULT_TEST_TAGS",
"enumerate_filegroup",
)
package(default_visibility = ["//visibility:private"])
exports_files([
# For use by @drake//geometry:meshcat.
"favicon.ico",
])
drake_py_library(
name = "defs",
srcs = ["defs.py"],
data = [
":header_and_footer_images",
":header_and_footer_images.txt",
],
visibility = ["//doc:__subpackages__"],
deps = [
"@bazel_tools//tools/python/runfiles",
],
)
# For maximum browser compatibility these should be at the root of the
# generated website and should not be renamed.
filegroup(
name = "favicon",
srcs = [
# Manual resizing and padding of "assets/drake-dragon.png" to
# 192x192px.
"android-chrome.png",
# Manual resizing and padding of "assets/drake-dragon.png" to
# 180x180px.
"apple-touch-icon.png",
# Minimal configuration for Microsoft browsers. Versions of Edge prior
# to the change to WebKit always request a file named
# "browserconfig.xml" whether or not an alternative is specified in the
# HTML.
"browserconfig.xml",
# Apple Safari always requests a file named "favicon.ico" whether or
# not an alternative favicon is specified in the HTML.
# Manual resizing and padding of "assets/drake-dragon.png" to 32x32px
# and conversion to ICO format.
"favicon.ico",
# Manual resizing and padding of "assets/drake-dragon.png" to 32x32px.
"favicon.png",
# Mask icon for Safari pinned tabs.
# Manual removal of colors and layers from "assets/drake-dragon.svg"
# and transformation to a 0 0 16 16 view box.
"mask-icon.svg",
# Site manifest primarily for Android and Chrome.
# https://developer.mozilla.org/en-US/docs/Web/Manifest
"site.webmanifest",
],
)
filegroup(
name = "header_and_footer_images",
srcs = [
"images/drake-logo.svg",
"images/drake-logo-white.svg",
"third_party/images/GitHub-Mark-64px.png",
"third_party/images/GitHub-Mark-Light-64px.png",
],
)
enumerate_filegroup(
name = "header_and_footer_images.txt",
data = [":header_and_footer_images"],
)
filegroup(
name = "pages_input",
srcs = [
"_config.yml",
"_release-notes/index.html",
"images/drake-dragon.png",
"images/drake-logo.svg",
"images/drake-logo-white.svg",
"images/jenkins_bot_reviewable_comment.png",
"index.md",
"sample_vimrc",
] + glob([
"_includes/*.html",
"_includes/*.md",
"_layouts/*.html",
"_pages/*.md",
"_release-notes/*.md",
"assets/**/*.css",
"assets/**/*.js",
"third_party/**/*",
]),
data = [
":favicon",
],
)
enumerate_filegroup(
name = "pages_input.txt",
data = [":pages_input"],
)
drake_py_binary(
name = "pages",
srcs = ["pages.py"],
add_test_rule = 1,
data = [
":pages_input",
":pages_input.txt",
],
test_rule_args = ["--out_dir=<test>"],
test_rule_tags = DEFAULT_TEST_TAGS,
deps = [
":defs",
],
)
drake_py_binary(
name = "build",
srcs = ["build.py"],
add_test_rule = 1,
data = [
":pages",
"//doc/doxygen_cxx:build",
"//doc/pydrake:build",
"//doc/styleguide:build",
],
test_rule_args = [
"--out_dir=<test>",
# Only generate some modules, so that the test provides quick feedback.
"--quick",
"drake/math",
"pages",
"pydrake.math",
"sitemap",
"styleguide",
],
test_rule_tags = DEFAULT_TEST_TAGS,
deps = [
":defs",
"@bazel_tools//tools/python/runfiles",
],
)
# This rule is used by our CI scripts as a single point of entry to ensure that
# all of our manually-tagged documentation tests pass.
test_suite(
name = "manual_tests",
tags = ["manual"],
tests = [
":build_test",
":pages_test",
"//doc/doxygen_cxx:build_test",
"//doc/pydrake:build_test",
"//doc/styleguide:build_test",
],
)
add_lint_tests()