mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
This uses all the infrastructure we put together earlier to actually build and publish all the artifacts. We might still want to adjust what is built by default to control CI times. Signed-off-by: Austin Schuh <austin.linux@gmail.com> Co-authored-by: PJ Reiniger <pj.reiniger@gmail.com> Co-authored-by: David Vo <auscompgeek@users.noreply.github.com>
95 lines
2.7 KiB
Python
95 lines
2.7 KiB
Python
load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_library", "cc_test")
|
|
load("//shared/bazel/rules:cc_rules.bzl", "wpilib_cc_library", "wpilib_cc_shared_library", "wpilib_cc_static_library")
|
|
load("//shared/bazel/rules:packaging.bzl", "package_default_cc_project")
|
|
load("//shared/bazel/rules:publishing.bzl", "host_architectures")
|
|
|
|
cc_library(
|
|
name = "headers",
|
|
hdrs = glob(["src/main/native/include/**"]),
|
|
includes = ["src/main/native/include"],
|
|
)
|
|
|
|
wpilib_cc_library(
|
|
name = "halsim_ds_socket",
|
|
srcs = glob(["src/main/native/cpp/**"]),
|
|
include_license_files = True,
|
|
target_compatible_with = select({
|
|
"@rules_bzlmodrio_toolchains//constraints/is_roborio:roborio": ["@platforms//:incompatible"],
|
|
"@rules_bzlmodrio_toolchains//constraints/is_systemcore:systemcore": ["@platforms//:incompatible"],
|
|
"//conditions:default": [],
|
|
}),
|
|
visibility = ["//visibility:public"],
|
|
deps = [
|
|
":headers",
|
|
"//hal:wpiHal",
|
|
"//wpinet",
|
|
],
|
|
)
|
|
|
|
wpilib_cc_library(
|
|
name = "halsim_ds_socket_static",
|
|
srcs = glob(["src/main/native/cpp/**"]),
|
|
copts = [
|
|
"-DHALSIM_InitExtension=HALSIM_InitExtension_DS_SOCKET",
|
|
],
|
|
include_license_files = True,
|
|
target_compatible_with = select({
|
|
"@rules_bzlmodrio_toolchains//constraints/is_roborio:roborio": ["@platforms//:incompatible"],
|
|
"@rules_bzlmodrio_toolchains//constraints/is_systemcore:systemcore": ["@platforms//:incompatible"],
|
|
"//conditions:default": [],
|
|
}),
|
|
visibility = ["//visibility:public"],
|
|
deps = [
|
|
":headers",
|
|
"//hal:wpiHal",
|
|
"//wpinet",
|
|
],
|
|
)
|
|
|
|
wpilib_cc_shared_library(
|
|
name = "shared/halsim_ds_socket",
|
|
auto_export_windows_symbols = False,
|
|
dynamic_deps = [
|
|
"//hal:shared/wpiHal",
|
|
"//wpinet:shared/wpinet",
|
|
"//wpiutil:shared/wpiutil",
|
|
],
|
|
visibility = ["//visibility:public"],
|
|
deps = [":halsim_ds_socket"],
|
|
)
|
|
|
|
wpilib_cc_static_library(
|
|
name = "static/halsim_ds_socket",
|
|
static_deps = [
|
|
"//hal:static/wpiHal",
|
|
"//wpinet:static/wpinet",
|
|
],
|
|
visibility = ["//visibility:public"],
|
|
deps = [":halsim_ds_socket_static"],
|
|
)
|
|
|
|
cc_test(
|
|
name = "halsim_ds_socket-test",
|
|
size = "small",
|
|
srcs = glob(["src/test/native/**/*.cpp"]),
|
|
deps = [
|
|
"//simulation/halsim_ds_socket",
|
|
"//thirdparty/googletest",
|
|
],
|
|
)
|
|
|
|
cc_binary(
|
|
name = "DevMain-Cpp",
|
|
srcs = ["src/dev/native/cpp/main.cpp"],
|
|
deps = [
|
|
":halsim_ds_socket",
|
|
],
|
|
)
|
|
|
|
package_default_cc_project(
|
|
name = "halsim_ds_socket",
|
|
architectures = host_architectures,
|
|
maven_artifact_name = "halsim_ds_socket",
|
|
maven_group_id = "org.wpilib.halsim",
|
|
)
|