Skip to content
Merged
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
9 changes: 9 additions & 0 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,15 @@ common:remote_arm64 --platforms=//bazel/platforms:rbe_linux_arm64
common:remote_arm64 --host_platform=//bazel/platforms:rbe_linux_arm64


# macOS arm64 remote execution (--config=remote_macos) on the self-hosted executor, for the macos-aarch64 natives and
# their tests. Its own cache namespace: the macOS C/C++ wrapper selects the executor's SDK outside action keys, so
# these results never share entries with Linux or with developer machines.
common:remote_macos --config=remote
common:remote_macos --platforms=//bazel/platforms:rbe_macos_arm64
common:remote_macos --host_platform=//bazel/platforms:rbe_macos_arm64
common:remote_macos --remote_instance_name=elide-dev/truffledata/macos/v1
common:remote_macos --jobs=16

# Nearby GCP execution; selected by trusted CI only after shared-cache setup succeeds.
# --config=remote retains hosted BuildBuddy execution; --config=local remains host-local.
common:shared_cache --remote_executor=grpcs://elide-dev.buildbuddy.io:443
Expand Down
26 changes: 18 additions & 8 deletions .github/workflows/check.natives.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,15 @@ jobs:
platform: --dynamic_mode=off --platforms=//bazel/platforms:linux_arm64_musl
shared: false
- target: aarch64-apple-darwin
# Trusted runs execute on the self-hosted macOS executor (--config=remote_macos) from a Linux runner;
# fork PRs, which get no BuildBuddy key, build on a hosted macOS runner.
runner: macos-15
remote: true
platform: ''
shared: true
runs-on: ${{ matrix.runner }}
runs-on: ${{ matrix.remote && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) && 'ubuntu-24.04' || matrix.runner }}
env:
BAZEL_CONFIG: ${{ matrix.remote && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) && 'remote_macos' || 'local' }}
Comment on lines +37 to +39

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Uncredentialed macOS checks lose local fallback

When neither optional BuildBuddy secret is set, BAZEL_CONFIG still selects remote_macos on a Linux runner. The explicit config overrides configure-buildbuddy.sh's local fallback, so both native checks fail without credentials.

Learn more

The reusable native workflow declares both BuildBuddy secrets optional. When neither is set, the credential setup writes a local Bazel configuration, but the macOS matrix still selects an Ubuntu runner and passes --config=remote_macos. A command-line config takes precedence over the fallback, leaving the build pointed at the remote executor without credentials. The two macOS jobs cannot run their native tests on that Linux runner.

Example: Run the CI workflow on main in a repository where neither BuildBuddy secret is configured. The CSV and YAML macOS jobs start on Ubuntu and invoke remote execution without a key; previously they started on macos-15 and ran locally.

Recommended fix: Gate both runs-on and BAZEL_CONFIG on the presence of a BuildBuddy key as well as the trusted-event condition, while keeping the secret out of logs and action environments.

Devin Review


Was this helpful? React with 👍 or 👎 to provide feedback.

timeout-minutes: 45
steps:
- name: Harden runner
Expand All @@ -54,15 +59,15 @@ jobs:
- name: Native kernel and isolated archive acceptance
env:
TARGET_PLATFORM: ${{ matrix.platform }}
run: bazel test --config=local $TARGET_PLATFORM //csv/native:api_test //csv/native:index_test //tools/release:csv_archive_test
run: bazel test --config=$BAZEL_CONFIG $TARGET_PLATFORM //csv/native:api_test //csv/native:index_test //tools/release:csv_archive_test
- name: Shared loading and ThinLTO acceptance
if: matrix.shared
run: bazel test --config=local //tools/release:csv_c_static_test //tools/release:csv_c_thinlto_test
run: bazel test --config=$BAZEL_CONFIG //tools/release:csv_c_static_test //tools/release:csv_c_thinlto_test
- name: Musl static ThinLTO acceptance
if: ${{ !matrix.shared }}
env:
TARGET_PLATFORM: ${{ matrix.platform }}
run: bazel test --config=local $TARGET_PLATFORM //tools/release:csv_musl_c_static_test //tools/release:csv_musl_c_thinlto_test
run: bazel test --config=$BAZEL_CONFIG $TARGET_PLATFORM //tools/release:csv_musl_c_static_test //tools/release:csv_musl_c_thinlto_test
- name: Remove BuildBuddy credentials
if: always()
run: rm -f user.bazelrc
Expand All @@ -85,10 +90,15 @@ jobs:
platform: --dynamic_mode=off --platforms=//bazel/platforms:linux_arm64_musl
shared: false
- target: aarch64-apple-darwin
# Trusted runs execute on the self-hosted macOS executor (--config=remote_macos) from a Linux runner;
# fork PRs, which get no BuildBuddy key, build on a hosted macOS runner.
runner: macos-15
remote: true
platform: ''
shared: true
runs-on: ${{ matrix.runner }}
runs-on: ${{ matrix.remote && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) && 'ubuntu-24.04' || matrix.runner }}
env:
BAZEL_CONFIG: ${{ matrix.remote && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) && 'remote_macos' || 'local' }}
timeout-minutes: 45
steps:
- name: Harden runner
Expand All @@ -111,15 +121,15 @@ jobs:
- name: Native decoder and isolated archive acceptance
env:
TARGET_PLATFORM: ${{ matrix.platform }}
run: bazel test --config=local $TARGET_PLATFORM //yaml/native:api_test //yaml/native:input_test //yaml/native:stream_test //tools/release:yaml_archive_test
run: bazel test --config=$BAZEL_CONFIG $TARGET_PLATFORM //yaml/native:api_test //yaml/native:input_test //yaml/native:stream_test //tools/release:yaml_archive_test
- name: Shared loading and ThinLTO acceptance
if: matrix.shared
run: bazel test --config=local //tools/release:yaml_c_static_test //tools/release:yaml_c_thinlto_test
run: bazel test --config=$BAZEL_CONFIG //tools/release:yaml_c_static_test //tools/release:yaml_c_thinlto_test
- name: Musl static ThinLTO acceptance
if: ${{ !matrix.shared }}
env:
TARGET_PLATFORM: ${{ matrix.platform }}
run: bazel test --config=local $TARGET_PLATFORM //tools/release:yaml_musl_c_static_test //tools/release:yaml_musl_c_thinlto_test
run: bazel test --config=$BAZEL_CONFIG $TARGET_PLATFORM //tools/release:yaml_musl_c_static_test //tools/release:yaml_musl_c_thinlto_test
- name: Remove BuildBuddy credentials
if: always()
run: rm -f user.bazelrc
17 changes: 17 additions & 0 deletions bazel/platforms/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,23 @@ constraint_value(
("arm64", "aarch64"),
]]

# The organization's self-hosted macOS arm64 executor (--config=remote_macos): bare metal, no container or VM
# isolation, registered in pool komodo-release-macos-arm64 (MY_POOL in its launchd job). Actions use the build's
# hermetic toolchains plus the executor's Command Line Tools SDK.
platform(
name = "rbe_macos_arm64",
constraint_values = [
"@platforms//os:macos",
"@platforms//cpu:aarch64",
],
exec_properties = {
"OSFamily": "darwin",
"Arch": "arm64",
"use-self-hosted-executors": "true",
"Pool": "komodo-release-macos-arm64",
},
)

# Opt-in GCP workers: same image/toolchains and hermetic network policy as hosted RBE.
platform(
name = "rbe_linux_amd64_shared",
Expand Down