Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .aspect/workflows/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
workspaces:
- .
- e2e
- e2e/cases/bcr-simulation-900
- examples/uv_pip_compile:
tasks:
- bazel-9:
Expand Down
35 changes: 35 additions & 0 deletions e2e/cases/bcr-simulation-900/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
load("@aspect_rules_py//py/unstable:defs.bzl", "py_venv_binary")
load("@bazel_lib//lib:transitions.bzl", "platform_transition_filegroup")
load("@rules_shell//shell:sh_test.bzl", "sh_test")

platform(
name = "arm64_linux",
constraint_values = [
"@platforms//os:linux",
"@platforms//cpu:aarch64",
],
)

py_venv_binary(
name = "hello_bin",
srcs = ["hello.py"],
main = "hello.py",
python_version = "3.12",
venv = "hello_venv",
)

platform_transition_filegroup(
name = "arm64_transition",
srcs = [":hello_bin"],
target_platform = ":arm64_linux",
)

sh_test(
name = "bcr_compatibility_test",
srcs = ["test.sh"],
data = [":arm64_transition"],
target_compatible_with = [
"@platforms//os:linux",
"@platforms//cpu:x86_64",
],
)
21 changes: 21 additions & 0 deletions e2e/cases/bcr-simulation-900/MODULE.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
module(name = "bcr_simulation_900")

bazel_dep(name = "aspect_rules_py", version = "0.0.0")
local_path_override(
module_name = "aspect_rules_py",
path = "../../..",
)

bazel_dep(name = "platforms", version = "1.0.0")
bazel_dep(name = "bazel_lib", version = "3.2.2")
bazel_dep(name = "rules_shell", version = "0.6.1")
bazel_dep(name = "rules_python", version = "1.0.0")

python = use_extension("@rules_python//python/extensions:python.bzl", "python")
python.toolchain(
is_default = True,
python_version = "3.12",
)
use_repo(python, "python_3_12")

register_toolchains("@python_3_12//:all")
1 change: 1 addition & 0 deletions e2e/cases/bcr-simulation-900/hello.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
print("hello")
11 changes: 11 additions & 0 deletions e2e/cases/bcr-simulation-900/test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash
set -e

echo "BCR Compatibility Test"
echo "======================"
echo
echo "If this test runs, either:"
echo " 1. ARM64 toolchains are registered (test passes)"
echo " 2. target_compatible_with constraints are properly set (test skipped)"
echo
echo "The arm64_transition target was successfully resolved."