From 818dd9cb3009ac854854d277a5bf796da3781241 Mon Sep 17 00:00:00 2001 From: Congyu Date: Sat, 2 Mar 2024 13:15:21 +0800 Subject: [PATCH] fix linux-cross CI --- .github/workflows/CI.yml | 15 +++++++++------ .github/workflows/PR.yml | 15 +++++++++------ 2 files changed, 18 insertions(+), 12 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index ad9cc23..b60b008 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -201,14 +201,17 @@ jobs: manylinux: 2_28 args: --release --out dist --interpreter '3.7 3.8 3.9 3.10 3.11 3.12' container: congyuwang/manylinux_2_28_aarch64:llvm-17.0.6 + docker-options: "-e BINDGEN_EXTRA_CLANG_ARGS" env: LIBCLANG_PATH: /usr/local/lib - CC: /usr/local/bin/clang - CXX: /usr/local/bin/clang++ - AR: /usr/local/bin/llvm-ar - CFLAGS: "-flto=thin -O3" - CXXFLAGS: "-flto=thin -O3" - RUSTFLAGS: "-Clinker-plugin-lto -Clinker=/usr/local/bin/clang -Clink-arg=-fuse-ld=/usr/local/bin/ld.lld" + CC_aarch64_unknown_linux_gnu: /usr/local/bin/clang + CXX_aarch64_unknown_linux_gnu: /usr/local/bin/clang++ + AR_aarch64_unknown_linux_gnu: /usr/local/bin/llvm-ar + CFLAGS_aarch64_unknown_linux_gnu: "-flto=thin -O3 --sysroot=/usr/aarch64-unknown-linux-gnu/aarch64-unknown-linux-gnu/sysroot/" + CXXFLAGS_aarch64_unknown_linux_gnu: "-flto=thin -O3 --sysroot=/usr/aarch64-unknown-linux-gnu/aarch64-unknown-linux-gnu/sysroot/" + BINDGEN_EXTRA_CLANG_ARGS: "--sysroot=/usr/aarch64-unknown-linux-gnu/aarch64-unknown-linux-gnu/sysroot/" + CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER: "/usr/local/bin/clang" + CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_RUSTFLAGS: "-Clinker-plugin-lto -Clinker=/usr/local/bin/clang -Clink-arg=-fuse-ld=/usr/local/bin/ld.lld" - uses: uraimo/run-on-arch-action@v2 name: Install built wheel and test with: diff --git a/.github/workflows/PR.yml b/.github/workflows/PR.yml index 2b51105..9f2f130 100644 --- a/.github/workflows/PR.yml +++ b/.github/workflows/PR.yml @@ -201,14 +201,17 @@ jobs: manylinux: 2_28 args: --release --out dist --interpreter '3.7 3.8 3.9 3.10 3.11 3.12' container: congyuwang/manylinux_2_28_aarch64:llvm-17.0.6 + docker-options: "-e BINDGEN_EXTRA_CLANG_ARGS" env: LIBCLANG_PATH: /usr/local/lib - CC: /usr/local/bin/clang - CXX: /usr/local/bin/clang++ - AR: /usr/local/bin/llvm-ar - CFLAGS: "-flto=thin -O3" - CXXFLAGS: "-flto=thin -O3" - RUSTFLAGS: "-Clinker-plugin-lto -Clinker=/usr/local/bin/clang -Clink-arg=-fuse-ld=/usr/local/bin/ld.lld" + CC_aarch64_unknown_linux_gnu: /usr/local/bin/clang + CXX_aarch64_unknown_linux_gnu: /usr/local/bin/clang++ + AR_aarch64_unknown_linux_gnu: /usr/local/bin/llvm-ar + CFLAGS_aarch64_unknown_linux_gnu: "-flto=thin -O3 --sysroot=/usr/aarch64-unknown-linux-gnu/aarch64-unknown-linux-gnu/sysroot/" + CXXFLAGS_aarch64_unknown_linux_gnu: "-flto=thin -O3 --sysroot=/usr/aarch64-unknown-linux-gnu/aarch64-unknown-linux-gnu/sysroot/" + BINDGEN_EXTRA_CLANG_ARGS: "--sysroot=/usr/aarch64-unknown-linux-gnu/aarch64-unknown-linux-gnu/sysroot/" + CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER: "/usr/local/bin/clang" + CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_RUSTFLAGS: "-Clinker-plugin-lto -Clinker=/usr/local/bin/clang -Clink-arg=-fuse-ld=/usr/local/bin/ld.lld" - uses: uraimo/run-on-arch-action@v2 name: Install built wheel and test with: