mirror of
https://github.com/openai/codex.git
synced 2026-10-19 16:17:49 +00:00
## What changed - Add `runtime_package` targets for combined, primary, app-server, and Windows helper bundles, plus per-binary release archives. - Apply release settings automatically and retain unstripped binaries with macOS dSYM or Windows PDB symbols. Require platform-specific symbols and validate that dSYM bundles contain nonempty DWARF data. - Support a `debug` build mode for faster package smoke builds and configure platform-specific release settings, including native Windows MSVC toolchains. - Add a composite action that refreshes Cargo workspace metadata, builds the selected archive, and extracts writable files for existing signing and packaging steps. GitOrigin-RevId: 21109875cde228aaef67b2ba9812b3e4854aee84
106 lines
2.8 KiB
Python
106 lines
2.8 KiB
Python
load("@bazel_skylib//rules:common_settings.bzl", "string_flag")
|
|
load("//bazel/rules:runtime_package.bzl", "runtime_archive")
|
|
|
|
exports_files([
|
|
"clippy.toml",
|
|
])
|
|
|
|
filegroup(
|
|
name = "workspace-files",
|
|
srcs = glob(
|
|
[
|
|
"*",
|
|
".cargo/**",
|
|
],
|
|
exclude = [
|
|
"BUILD.bazel",
|
|
],
|
|
),
|
|
visibility = ["//visibility:public"],
|
|
)
|
|
|
|
test_suite(
|
|
name = "e2e-benchmarks",
|
|
tags = ["manual"],
|
|
tests = [
|
|
"//codex-rs/cli:codex-help-bench",
|
|
],
|
|
visibility = ["//visibility:public"],
|
|
)
|
|
|
|
string_flag(
|
|
name = "runtime_package_build_mode",
|
|
build_setting_default = "release",
|
|
values = [
|
|
"release",
|
|
"debug",
|
|
],
|
|
visibility = ["//visibility:public"],
|
|
)
|
|
|
|
alias(
|
|
name = "runtime_package",
|
|
actual = ":runtime_package_combined",
|
|
tags = ["manual"],
|
|
visibility = ["//visibility:public"],
|
|
)
|
|
|
|
# These targets produce flat staging archives for the existing signing and
|
|
# packaging steps. Release builds retain their binaries and debug symbols.
|
|
runtime_archive(
|
|
name = "runtime_package_combined",
|
|
srcs = [
|
|
"//codex-rs/app-server:release_files",
|
|
"//codex-rs/cli:release_files",
|
|
"//codex-rs/code-mode-host:release_files",
|
|
] + select({
|
|
"@platforms//os:linux": ["//codex-rs/bwrap:release_files"],
|
|
"@platforms//os:windows": [
|
|
"//codex-rs/windows-sandbox-rs:command-runner-release_files",
|
|
"//codex-rs/windows-sandbox-rs:sandbox-setup-release_files",
|
|
],
|
|
"//conditions:default": [],
|
|
}),
|
|
tags = ["manual"],
|
|
visibility = ["//visibility:public"],
|
|
)
|
|
|
|
runtime_archive(
|
|
name = "runtime_package_primary",
|
|
srcs = [
|
|
"//codex-rs/cli:release_files",
|
|
"//codex-rs/code-mode-host:release_files",
|
|
"//codex-rs/responses-api-proxy:release_files",
|
|
] + select({
|
|
"@platforms//os:linux": ["//codex-rs/bwrap:release_files"],
|
|
"//conditions:default": [],
|
|
}),
|
|
tags = ["manual"],
|
|
visibility = ["//visibility:public"],
|
|
)
|
|
|
|
runtime_archive(
|
|
name = "runtime_package_app-server",
|
|
srcs = [
|
|
"//codex-rs/app-server:release_files",
|
|
"//codex-rs/code-mode-host:release_files",
|
|
] + select({
|
|
"@platforms//os:linux": ["//codex-rs/bwrap:release_files"],
|
|
"//conditions:default": [],
|
|
}),
|
|
tags = ["manual"],
|
|
visibility = ["//visibility:public"],
|
|
)
|
|
|
|
runtime_archive(
|
|
name = "runtime_package_helpers",
|
|
srcs = [
|
|
"//codex-rs/windows-sandbox-rs:command-runner-release_files",
|
|
"//codex-rs/windows-sandbox-rs:sandbox-setup-release_files",
|
|
"//codex-rs/windows-sandbox-service:release_files",
|
|
],
|
|
tags = ["manual"],
|
|
target_compatible_with = ["@platforms//os:windows"],
|
|
visibility = ["//visibility:public"],
|
|
)
|