11variable "CONTEXT_PREFIX" { default = " ." }
22
3- variable "XRONOS_VERSION" { default = " 0.11.0" }
3+ variable "XRONOS_VERSION" { default = " 0.11.1" }
4+
5+ variable "ALL_PLATFORMS" { default = 0 }
6+
7+ variable "_platform_list" {
8+ default = ALL_PLATFORMS > 0 ? [" linux/arm64" , " linux/amd64" ] : []
9+ }
410
511target "base" {
6- target = " base"
7- context = CONTEXT_PREFIX
8- output = [{ type = " cacheonly" }]
12+ target = " base"
13+ context = CONTEXT_PREFIX
14+ output = [{ type = " cacheonly" }]
15+ platforms = _platform_list
916}
1017
1118target "py-venv" {
@@ -16,28 +23,32 @@ target "py-venv" {
1623 args = {
1724 python_version = version
1825 }
19- target = " py-venv"
20- context = CONTEXT_PREFIX
21- output = [{ type = " cacheonly" }]
26+ target = " py-venv"
27+ context = CONTEXT_PREFIX
28+ output = [{ type = " cacheonly" }]
29+ platforms = _platform_list
2230}
2331
2432target "configs" {
25- target = " configs"
26- context = CONTEXT_PREFIX
27- output = [{ type = " cacheonly" }]
33+ target = " configs"
34+ context = CONTEXT_PREFIX
35+ output = [{ type = " cacheonly" }]
36+ platforms = _platform_list
2837}
2938
3039target "third-party-cmake-files" {
31- context = " ${ CONTEXT_PREFIX } /third-party"
32- output = [{ type = " cacheonly" }]
40+ context = " ${ CONTEXT_PREFIX } /third-party"
41+ output = [{ type = " cacheonly" }]
42+ platforms = _platform_list
3343}
3444
3545target "_third-party-common" {
3646 target = " install"
3747 contexts = {
3848 base = " target:base"
3949 }
40- output = [{ type = " cacheonly" }]
50+ output = [{ type = " cacheonly" }]
51+ platforms = _platform_list
4152}
4253
4354target "third-party-absl" {
@@ -83,9 +94,10 @@ target "third-party-doxygen" {
8394}
8495
8596target "xronos-lib-src" {
86- target = " src"
87- context = " ${ CONTEXT_PREFIX } /lib"
88- output = [{ type = " cacheonly" }]
97+ target = " src"
98+ context = " ${ CONTEXT_PREFIX } /lib"
99+ output = [{ type = " cacheonly" }]
100+ platforms = _platform_list
89101}
90102
91103target "xronos-lib-lint" {
@@ -118,15 +130,17 @@ target "xronos-lib-test" {
118130}
119131
120132target "xronos-lib-graph-messages-rust-src" {
121- target = " rust-src"
122- context = " ${ CONTEXT_PREFIX } /lib/graph-messages"
123- output = [{ type = " cacheonly" }]
133+ target = " rust-src"
134+ context = " ${ CONTEXT_PREFIX } /lib/graph-messages"
135+ output = [{ type = " cacheonly" }]
136+ platforms = _platform_list
124137}
125138
126139target "xronos-cpp-sdk-src" {
127- target = " src"
128- context = " ${ CONTEXT_PREFIX } /cpp-sdk"
129- output = [{ type = " cacheonly" }]
140+ target = " src"
141+ context = " ${ CONTEXT_PREFIX } /cpp-sdk"
142+ output = [{ type = " cacheonly" }]
143+ platforms = _platform_list
130144}
131145
132146target "xronos-cpp-sdk-install" {
@@ -156,7 +170,7 @@ target "xronos-cpp-sdk-lint" {
156170target "xronos-cpp-sdk-pkgs" {
157171 inherits = [" xronos-cpp-sdk-install" ]
158172 target = " pkgs"
159- output = [" ${ CONTEXT_PREFIX } /cpp-sdk" ]
173+ output = [" ${ CONTEXT_PREFIX } /cpp-sdk/pkgs " ]
160174}
161175
162176target "xronos-cpp-sdk-docs" {
@@ -165,7 +179,8 @@ target "xronos-cpp-sdk-docs" {
165179 contexts = {
166180 doxygen = " target:third-party-doxygen"
167181 }
168- output = [" ${ CONTEXT_PREFIX } /cpp-sdk" ]
182+ output = [" ${ CONTEXT_PREFIX } /cpp-sdk" ]
183+ platforms = []
169184}
170185
171186target "xronos-py-wheel" {
@@ -179,7 +194,8 @@ target "xronos-py-wheel" {
179194 py-venv = " target:py-venv-${ replace (version, " ." , " " )} "
180195 cpp-sdk = " target:xronos-cpp-sdk-install"
181196 }
182- output = [" ${ CONTEXT_PREFIX } /python-sdk" ]
197+ output = [" ${ CONTEXT_PREFIX } /python-sdk/dist" ]
198+ platforms = _platform_list
183199}
184200
185201target "xronos-py-sdist" {
@@ -191,13 +207,15 @@ target "xronos-py-sdist" {
191207 lib-src = " target:xronos-lib-src"
192208 third-party-src = " target:third-party-cmake-files"
193209 }
194- output = [" ${ CONTEXT_PREFIX } /python-sdk" ]
210+ output = [" ${ CONTEXT_PREFIX } /python-sdk/dist" ]
211+ platforms = []
195212}
196213
197214target "xronos-py-test-src" {
198- target = " test-src"
199- context = " ${ CONTEXT_PREFIX } /python-sdk"
200- output = [{ type = " cacheonly" }]
215+ target = " test-src"
216+ context = " ${ CONTEXT_PREFIX } /python-sdk"
217+ output = [{ type = " cacheonly" }]
218+ platforms = _platform_list
201219}
202220
203221target "xronos-py-test" {
@@ -210,6 +228,7 @@ target "xronos-py-test" {
210228 output = [{ type = " cacheonly" }]
211229}
212230
231+
213232target "xronos-py-lint-py" {
214233 inherits = [" xronos-py-test-312" ]
215234 target = " lint-py"
@@ -224,9 +243,10 @@ target "xronos-py-lint-cpp" {
224243}
225244
226245target "xronos-examples-common-files" {
227- target = " common-files"
228- context = " ${ CONTEXT_PREFIX } /examples"
229- output = [{ type = " cacheonly" }]
246+ target = " common-files"
247+ context = " ${ CONTEXT_PREFIX } /examples"
248+ output = [{ type = " cacheonly" }]
249+ platforms = _platform_list
230250}
231251
232252target "_xronos-examples-common" {
@@ -239,7 +259,8 @@ target "_xronos-examples-common" {
239259 py-venv = " target:py-venv-${ replace (version, " ." , " " )} "
240260 xronos-wheel = " target:xronos-py-wheel-${ replace (version, " ." , " " )} "
241261 }
242- output = [{ type = " cacheonly" }]
262+ output = [{ type = " cacheonly" }]
263+ platforms = _platform_list
243264}
244265
245266target "xronos-examples-hello-ros2-comparison-lint" {
@@ -358,26 +379,18 @@ target "xronos-examples-yolo-lint" {
358379 context = " ${ CONTEXT_PREFIX } /examples/YOLO/"
359380}
360381
361- target "xronos-examples-yolo-lint" {
362- name = " xronos-examples-yolo-lint-${ replace (version, " ." , " " )} "
363- inherits = [" _xronos-examples-common-${ replace (version, " ." , " " )} " ]
364- matrix = {
365- version = [" 3.12" ]
366- }
367- target = " lint"
368- context = " ${ CONTEXT_PREFIX } /examples/YOLO/"
369- }
370-
371382target "xronos-examples-src" {
372- target = " src"
373- context = " ${ CONTEXT_PREFIX } /examples"
374- output = [{ type = " cacheonly" }]
383+ target = " src"
384+ context = " ${ CONTEXT_PREFIX } /examples"
385+ output = [{ type = " cacheonly" }]
386+ platforms = _platform_list
375387}
376388
377389target "bake-check-format" {
378- context = CONTEXT_PREFIX
379- target = " check-format"
380- output = [{ type = " cacheonly" }]
390+ context = CONTEXT_PREFIX
391+ target = " check-format"
392+ output = [{ type = " cacheonly" }]
393+ platforms = []
381394}
382395
383396variable "LINT_TARGETS" {
0 commit comments