Skip to content

Commit 872c4ee

Browse files
committed
fix(ci): force cmake builder for aws-lc-sys (bypasses GCC memcmp bug)
1 parent 13828dc commit 872c4ee

2 files changed

Lines changed: 5 additions & 17 deletions

File tree

.github/workflows/release.yml

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ permissions:
2323

2424
env:
2525
CARGO_TERM_COLOR: always
26+
# Use cmake builder for aws-lc-sys to bypass GCC memcmp bug in cross containers
27+
AWS_LC_SYS_CMAKE_BUILDER: 1
2628
# The binary name from [[bin]] in operator/Cargo.toml.
2729
# Override per repo if different.
2830
BINARY_NAME: ${{ vars.BINARY_NAME || 'vector-store-operator' }}
@@ -67,23 +69,6 @@ jobs:
6769
if: matrix.use_cross
6870
run: cargo install cross --git https://github.com/cross-rs/cross
6971

70-
# Strip CI-incompatible patches (local paths that only exist on dev machines).
71-
# The committed Cargo.lock already pins transitive deps (like yanked core2).
72-
- name: Prepare for CI build
73-
run: |
74-
# Remove [patch.crates-io] and [patch."https://..."] sections that
75-
# reference local paths (e.g. /Users/drew/.cargo/...).
76-
if grep -q 'patch.crates-io' Cargo.toml; then
77-
python3 -c "
78-
import re
79-
with open('Cargo.toml') as f: text = f.read()
80-
# Remove [patch.*] sections with local path = entries
81-
text = re.sub(r'\[patch[^\]]*\]\n(?:(?!^\[)[^\n]*\n)*', '', text, flags=re.MULTILINE)
82-
with open('Cargo.toml', 'w') as f: f.write(text)
83-
"
84-
echo 'Stripped local-path patches from Cargo.toml for CI'
85-
fi
86-
8772
- name: Build release binary
8873
run: |
8974
BUILD_CMD="cargo"

Cross.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,6 @@ pre-build = ["apt-get update && apt-get install -y protobuf-compiler cmake nasm
1010
image = "ghcr.io/cross-rs/aarch64-unknown-linux-gnu:main"
1111
pre-build = ["dpkg --add-architecture arm64 || true", "apt-get update && apt-get install -y protobuf-compiler cmake nasm libclang-dev pkg-config"]
1212

13+
[build.env]
14+
passthrough = ["AWS_LC_SYS_CMAKE_BUILDER"]
15+

0 commit comments

Comments
 (0)