Skip to content

Commit 5fa4d8f

Browse files
arman-bdclaude
andcommitted
fix: ensure clean BoringSSL builds across all platforms
This commit addresses platform cross-contamination issues where cached BoringSSL directories from one OS (e.g., macOS) would cause build failures on another OS (e.g., Linux trying to compile Apple assembly files). Changes: - Always remove and re-clone BoringSSL to prevent contamination - Clean build directories before building - Apply consistent build approach across Linux, macOS, and Windows - Temporarily reduce Python test matrix to 3.8 only for faster iteration This fixes the Linux build error where it was trying to assemble `aes-gcm-avx2-x86_64-apple.S` files with the GNU assembler. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 7d0274d commit 5fa4d8f

File tree

4 files changed

+35
-17
lines changed

4 files changed

+35
-17
lines changed

.github/workflows/_config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ jobs:
6262
6363
# Python versions to test
6464
PYTHON_MATRIX='[
65-
"3.8", "3.11", "3.14"
65+
"3.8"
6666
]'
6767
# Python versions: "3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.14"
6868

scripts/darwin/setup_vendors.sh

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,16 @@ cd "$VENDOR_DIR"
2727
#
2828
echo "==> Setting up BoringSSL..."
2929

30-
if [ ! -d "boringssl" ]; then
31-
echo "Cloning BoringSSL..."
32-
git clone --depth 1 https://boringssl.googlesource.com/boringssl
30+
# Always remove and re-clone BoringSSL to ensure clean state
31+
# This prevents platform cross-contamination (e.g., Linux files on macOS runners)
32+
if [ -d "boringssl" ]; then
33+
echo "Removing existing BoringSSL directory to ensure clean build..."
34+
rm -rf boringssl
3335
fi
3436

37+
echo "Cloning BoringSSL..."
38+
git clone --depth 1 https://boringssl.googlesource.com/boringssl
39+
3540
cd boringssl
3641

3742
# Check if already built
@@ -48,6 +53,12 @@ if [ ! -f "build/ssl/libssl.a" ] && [ ! -f "build/libssl.a" ]; then
4853
echo "WARNING: go not found. BoringSSL will build without some tests."
4954
fi
5055

56+
# Clean build directory if it exists
57+
if [ -d "build" ]; then
58+
echo "Cleaning previous build..."
59+
rm -rf build
60+
fi
61+
5162
mkdir -p build
5263
cd build
5364

scripts/linux/setup_vendors.sh

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -28,19 +28,15 @@ cd "$VENDOR_DIR"
2828
#
2929
echo "==> Setting up BoringSSL..."
3030

31-
# Always ensure clean BoringSSL clone to avoid platform detection issues
31+
# Always remove and re-clone BoringSSL to ensure clean state
32+
# This prevents platform cross-contamination (e.g., macOS files on Linux runners)
3233
if [ -d "boringssl" ]; then
33-
# Check if build exists, if not, remove and re-clone
34-
if [ ! -f "boringssl/build/libssl.a" ]; then
35-
echo "Removing incomplete BoringSSL clone..."
36-
rm -rf boringssl
37-
fi
34+
echo "Removing existing BoringSSL directory to ensure clean build..."
35+
rm -rf boringssl
3836
fi
3937

40-
if [ ! -d "boringssl" ]; then
41-
echo "Cloning BoringSSL..."
42-
git clone --depth 1 https://boringssl.googlesource.com/boringssl
43-
fi
38+
echo "Cloning BoringSSL..."
39+
git clone --depth 1 https://boringssl.googlesource.com/boringssl
4440

4541
cd boringssl
4642

scripts/windows/setup_vendors.sh

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,16 @@ cd "$VENDOR_DIR"
2828
#
2929
echo "==> Setting up BoringSSL..."
3030

31-
if [ ! -d "boringssl" ]; then
32-
echo "Cloning BoringSSL..."
33-
git clone --depth 1 https://boringssl.googlesource.com/boringssl
31+
# Always remove and re-clone BoringSSL to ensure clean state
32+
# This prevents platform cross-contamination (e.g., Linux files on Windows runners)
33+
if [ -d "boringssl" ]; then
34+
echo "Removing existing BoringSSL directory to ensure clean build..."
35+
rm -rf boringssl
3436
fi
3537

38+
echo "Cloning BoringSSL..."
39+
git clone --depth 1 https://boringssl.googlesource.com/boringssl
40+
3641
cd boringssl
3742

3843
# Check if already built
@@ -49,6 +54,12 @@ if [ ! -f "build/ssl/Release/ssl.lib" ] && [ ! -f "build/Release/ssl.lib" ]; the
4954
echo "WARNING: go not found. BoringSSL will build without some tests."
5055
fi
5156

57+
# Clean build directory if it exists
58+
if [ -d "build" ]; then
59+
echo "Cleaning previous build..."
60+
rm -rf build
61+
fi
62+
5263
mkdir -p build
5364
cd build
5465

0 commit comments

Comments
 (0)