Skip to content

armgit / cua

Public Imported from GitHub
0

Scale computer-use 2.0 with open-source drivers, cross-OS sandboxes, and benchmarks for training, evaluation, and data generation.

fix(fleets): avoid shadowing Rust clang (#6736)

r33drichards24a5ebfbc66c
diff --git a/libs/fleet/terraform-provider-fleets/.github/workflows/release.yml b/libs/fleet/terraform-provider-fleets/.github/workflows/release.yml
index 7154214838..5d4eccce07 100644
--- a/libs/fleet/terraform-provider-fleets/.github/workflows/release.yml
+++ b/libs/fleet/terraform-provider-fleets/.github/workflows/release.yml
@@ -93,11 +93,15 @@ jobs:
unzip -q "$RUNNER_TEMP/$archive" -d "$toolchain_root"
toolchain_bin="$(find "$toolchain_root" -mindepth 2 -maxdepth 2 -type d -name bin -print -quit)"
test -n "$toolchain_bin"
- echo "$toolchain_bin" >> "$GITHUB_PATH"
+ go_build_cc="$(cygpath -m "$toolchain_bin/${{ matrix.cc }}.exe")"
+ echo "GO_BUILD_CC=$go_build_cc" >> "$GITHUB_ENV"
+ - name: Configure release compiler
+ if: matrix.goos != 'windows'
+ shell: bash
+ run: echo "GO_BUILD_CC=${{ matrix.cc }}" >> "$GITHUB_ENV"
- name: Build provider archive
shell: bash
env:
- GO_BUILD_CC: ${{ matrix.cc }}
VERSION: ${{ needs.prepare.outputs.version }}
run: ./scripts/build-release-archive.sh "$VERSION" dist
- name: Upload provider archive
diff --git a/libs/fleet/terraform-provider-fleets/scripts/test-release-contract.sh b/libs/fleet/terraform-provider-fleets/scripts/test-release-contract.sh
index 62751f92e7..9bfb88e032 100755
--- a/libs/fleet/terraform-provider-fleets/scripts/test-release-contract.sh
+++ b/libs/fleet/terraform-provider-fleets/scripts/test-release-contract.sh
@@ -5,6 +5,15 @@ repo_root="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
workflow="$repo_root/.github/workflows/release.yml"
builder="$repo_root/scripts/build-release-archive.sh"
+reject() {
+ local needle=$1
+ local file=$2
+ if grep -Fq -- "$needle" "$file"; then
+ printf 'unexpected release contract in %s: %s\n' "$file" "$needle" >&2
+ exit 1
+ fi
+}
+
require() {
local needle=$1
local file=$2
@@ -30,7 +39,10 @@ require 'LLVM_MINGW_VERSION: "20260616"' "$workflow"
require 'x86_64-w64-mingw32-clang' "$workflow"
require 'aarch64-w64-mingw32-clang' "$workflow"
require 'Install llvm-mingw' "$workflow"
-require "GO_BUILD_CC: \${{ matrix.cc }}" "$workflow"
+require "cygpath -m \"\$toolchain_bin/\${{ matrix.cc }}.exe\"" "$workflow"
+require "echo \"GO_BUILD_CC=\$go_build_cc\" >> \"\$GITHUB_ENV\"" "$workflow"
+require "GO_BUILD_CC=\${{ matrix.cc }}" "$workflow"
+reject 'GITHUB_PATH' "$workflow"
require "./scripts/build-release-archive.sh \"\$VERSION\" dist" "$workflow"
require "terraform-provider-fleets_\${VERSION}_SHA256SUMS" "$workflow"
require 'gpg --batch --armor --detach-sign' "$workflow"