Wire Forge-native release infrastructure
Some checks failed
Cache: Publish Nix / Publish Nix Cache (push) Waiting to run
Build Rust / Cargo Test (push) Successful in 4m14s
Build Site / Next.js Build (push) Failing after 6s
Infra: OpenTofu / OpenTofu (grafana) (push) Successful in 5s
Lint Governance / BEP Metadata (push) Successful in 0s
Build: Android / Android Rust Core Stub (push) Failing after 23s

This commit is contained in:
Conrad Kramer 2026-06-07 05:51:12 -07:00
parent 97c569fb35
commit 002bd382e9
199 changed files with 14268 additions and 185 deletions

25
bazel/apple/BUILD.bazel Normal file
View file

@ -0,0 +1,25 @@
load("@rules_shell//shell:sh_binary.bzl", "sh_binary")
load(":apple_targets.bzl", "apple_bazel_stamp")
package(default_visibility = ["//visibility:public"])
sh_binary(
name = "runner",
srcs = ["runner.sh"],
target_compatible_with = ["@platforms//os:macos"],
)
apple_bazel_stamp(
name = "release_ios_stamp",
command = "release-ios",
)
apple_bazel_stamp(
name = "release_macos_stamp",
command = "release-macos",
)
apple_bazel_stamp(
name = "release_all_stamp",
command = "release-all",
)

View file

@ -0,0 +1,13 @@
def apple_bazel_stamp(name, command):
native.genrule(
name = name,
outs = [name + ".stamp"],
cmd = "$(location :runner) %s && : > \"$@\"" % command,
srcs = ["//:apple_project_files"],
tools = [":runner"],
# The Xcode script stages release artifacts under dist/builds as a
# deliberate CI side effect; keep the wrapper uncached so the staging
# step always runs in fresh and reused workspaces.
tags = ["no-cache", "no-remote-cache", "no-sandbox"],
target_compatible_with = ["@platforms//os:macos"],
)

42
bazel/apple/runner.sh Executable file
View file

@ -0,0 +1,42 @@
#!/usr/bin/env bash
set -euo pipefail
command="${1:-}"
resolve_repo_root() {
if [[ -n "${BUILD_WORKSPACE_DIRECTORY:-}" && -f "${BUILD_WORKSPACE_DIRECTORY}/MODULE.bazel" ]]; then
printf '%s\n' "$BUILD_WORKSPACE_DIRECTORY"
return 0
fi
local dir="$PWD"
while [[ "$dir" != "/" ]]; do
if [[ -f "$dir/MODULE.bazel" && -d "$dir/Apple" ]]; then
printf '%s\n' "$dir"
return 0
fi
dir="$(dirname "$dir")"
done
echo "unable to resolve Burrow repository root" >&2
return 1
}
repo_root="$(resolve_repo_root)"
cd "$repo_root"
case "$command" in
release-ios)
Scripts/ci/package-apple-artifacts.sh ios
;;
release-macos)
Scripts/ci/package-apple-artifacts.sh macos
;;
release-all)
Scripts/ci/package-apple-artifacts.sh all
;;
*)
echo "unknown apple runner command: ${command}" >&2
exit 64
;;
esac