From 3741e72c8a824304613878719ffc838aaacac9a6 Mon Sep 17 00:00:00 2001 From: Chandler Carruth Date: Thu, 5 Nov 2026 20:09:08 +0000 Subject: [PATCH] Clean up environment variables after deleting Android SDK (#8099) Without this, new versions of Bazel tools break on our runners. Assisted-by: Antigravity with Opus --- .github/actions/build-setup-ubuntu/action.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/actions/build-setup-ubuntu/action.yml b/.github/actions/build-setup-ubuntu/action.yml index 32047fc45161..1f3e40e4bbf1 100644 --- a/.github/actions/build-setup-ubuntu/action.yml +++ b/.github/actions/build-setup-ubuntu/action.yml @@ -22,6 +22,18 @@ runs: # to save time. large-packages: false + # The image's Android environment variables still point into the SDK and + # NDK deleted above, which confuses tools that look for them, such as + # rules_android. `$GITHUB_ENV` can't unset variables, so set them to empty, + # which rules_android treats as unset. + - name: Clear Android environment variables + shell: bash + run: | + for var in ANDROID_HOME ANDROID_SDK_ROOT ANDROID_NDK ANDROID_NDK_HOME \ + ANDROID_NDK_LATEST_HOME ANDROID_NDK_ROOT; do + echo "$var=" >> "$GITHUB_ENV" + done + # Select the LLVM release - by the cache key and the download. - name: Select LLVM release shell: bash