From f153d97cae0330be2ce37f4b803e7dcf02f9614b Mon Sep 17 00:00:00 2001 From: Adam Perry Date: Wed, 8 Jul 2026 03:50:15 +0000 Subject: [PATCH] codex: address PR review feedback (#31357) --- .github/actions/setup-bazel-ci/action.yml | 6 +++++- .github/actions/setup-ci/action.yml | 16 +++++++++++++--- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/.github/actions/setup-bazel-ci/action.yml b/.github/actions/setup-bazel-ci/action.yml index 879eef4ee8..ac4f5aa97c 100644 --- a/.github/actions/setup-bazel-ci/action.yml +++ b/.github/actions/setup-bazel-ci/action.yml @@ -12,7 +12,8 @@ outputs: runs: using: composite steps: - - uses: ./.github/actions/setup-ci + - id: setup_ci + uses: ./.github/actions/setup-ci - name: Set up Bazel uses: bazel-contrib/setup-bazel@c5acdfb288317d0b5c0bbd7a396a3dc868bb0f86 # 0.19.0 @@ -20,6 +21,9 @@ runs: # and Windows can use the runner's standalone Bazel, ignoring .bazelversion. with: bazelisk-version: 1.28.1 + # setup-bazel writes an explicit output_base, which otherwise overrides + # BAZEL_OUTPUT_USER_ROOT and leaves Bazel's I/O-heavy trees on C:. + output-base: ${{ steps.setup_ci.outputs.bazel-output-base }} - name: Configure Bazel repository cache id: configure_bazel_repository_cache diff --git a/.github/actions/setup-ci/action.yml b/.github/actions/setup-ci/action.yml index ab2c16f245..aefac76b31 100644 --- a/.github/actions/setup-ci/action.yml +++ b/.github/actions/setup-ci/action.yml @@ -1,5 +1,9 @@ name: setup-ci description: Prepare common tools and environment shared by CI jobs. +outputs: + bazel-output-base: + description: Filesystem path used for Bazel's output base. + value: ${{ steps.configure_ci_build_paths.outputs.bazel-output-base }} runs: using: composite @@ -18,12 +22,15 @@ runs: run: echo "CI_BUILD_ROOT=$HOME/.cache/codex-ci" >> "$GITHUB_ENV" - name: Configure CI build paths + id: configure_ci_build_paths shell: bash run: | set -euo pipefail - # Keep this directory name tiny on every platform so the shared path - # contract preserves Windows' short Bazel output root. Long Windows - # Bazel paths can overflow argv and confuse test MANIFEST handling. + # setup-bazel passes output_base explicitly, so keep both it and the + # user root under the shared build root. Keep these directory names tiny + # on every platform so Windows Bazel paths do not overflow argv or + # confuse test MANIFEST handling. + bazel_output_base="$CI_BUILD_ROOT/o" bazel_output_user_root="$CI_BUILD_ROOT/b" bazel_repository_cache="$CI_BUILD_ROOT/bazel-repository-cache" bazel_repo_contents_cache="$CI_BUILD_ROOT/bazel-repo-contents-cache-$GITHUB_RUN_ID-$GITHUB_JOB" @@ -31,6 +38,7 @@ runs: tmp="$CI_BUILD_ROOT/tmp" build_dirs=( + "$bazel_output_base" "$bazel_output_user_root" "$bazel_repository_cache" "$bazel_repo_contents_cache" @@ -38,8 +46,10 @@ runs: "$tmp" ) mkdir -p "${build_dirs[@]}" + echo "bazel-output-base=$bazel_output_base" >> "$GITHUB_OUTPUT" { + echo "BAZEL_OUTPUT_BASE=$bazel_output_base" echo "BAZEL_OUTPUT_USER_ROOT=$bazel_output_user_root" echo "BAZEL_REPOSITORY_CACHE=$bazel_repository_cache" echo "BAZEL_REPO_CONTENTS_CACHE=$bazel_repo_contents_cache"