From e7b6fda724b39facb448cbab1078028b1a0a45a0 Mon Sep 17 00:00:00 2001 From: dev0 Date: Fri, 22 Sep 2023 04:18:23 +1000 Subject: [PATCH] arm --- .cargo/config | 6 +----- .github/workflows/ci.yml | 8 +++++++- scripts/build.sh | 8 -------- 3 files changed, 8 insertions(+), 14 deletions(-) diff --git a/.cargo/config b/.cargo/config index 49915acdf..7885b5964 100644 --- a/.cargo/config +++ b/.cargo/config @@ -4,8 +4,4 @@ rustflags = ["--cfg", "tokio_unstable"] [env] BORING_BSSL_SOURCE_PATH = { value = "deps/boringssl/src", relative = true} -RUST_LOG= { value = "clash=trace" } - -[target.aarch64-unknown-linux-gnu] -linker = "aarch64-linux-gnu-gcc" -rustflags = ["-Clinker-flavor=gcc"] \ No newline at end of file +RUST_LOG= { value = "clash=trace" } \ No newline at end of file diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7bfd997b7..205170bb7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -40,12 +40,18 @@ jobs: strategy: matrix: os: [ubuntu-22.04, macos-13] + arch: [x86_64, aarch64] include: - os: ubuntu-22.04 + arch: x86_64 container: quay.io/pypa/manylinux_2_28_x86_64 targets: > x86_64-unknown-linux-gnu -# aarch64-unknown-linux-gnu + - os: ubuntu-22.04 + arch: aarch64 + container: quay.io/pypa/manylinux_2_28_aarch64 + targets: > + aarch64-unknown-linux-gnu - os: macos-13 targets: > aarch64-apple-darwin diff --git a/scripts/build.sh b/scripts/build.sh index b78c18c45..0aeac7797 100644 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -7,14 +7,6 @@ set -xe for TARGET in $1; do echo "building for $TARGET" rustup target add $TARGET - case $TARGET in - aarch64-unknown-linux-gnu) - sudo apt-get install -y gcc-aarch64-linux-gnu binutils-aarch64-linux-gnu - export BINDGEN_EXTRA_CLANG_ARGS='-I/usr/aarch64-linux-gnu/include' - ;; - *) - ;; - esac cargo build -p clash --target $TARGET --release ls -l ./target/$TARGET/release/ mv ./target/$TARGET/release/clash ./target/artifacts/clash-$TARGET