From 1d0fc9ab61ab7345ad7d22fef056c6b12eb8bdc2 Mon Sep 17 00:00:00 2001 From: cyber386 <62885475+cyber386@users.noreply.github.com> Date: Fri, 7 Aug 2020 16:25:57 +0800 Subject: [PATCH] Add docker build for mips/el-unknown-linux-musl --- .github/workflows/build-release.yml | 2 ++ build/build-release | 10 ++++++++++ 2 files changed, 12 insertions(+) diff --git a/.github/workflows/build-release.yml b/.github/workflows/build-release.yml index 811b2c27..f32153fc 100644 --- a/.github/workflows/build-release.yml +++ b/.github/workflows/build-release.yml @@ -20,6 +20,8 @@ jobs: docker build -t shadowsocks-rust:x86_64-unknown-linux-gnu -f Dockerfile.x86_64-unknown-linux-gnu . docker build -t shadowsocks-rust:arm-unknown-linux-gnueabihf -f Dockerfile.arm-unknown-linux-gnueabihf . docker build -t shadowsocks-rust:aarch64-unknown-linux-gnu -f Dockerfile.aarch64-unknown-linux-gnu . + docker build -t shadowsocks-rust:mips-unknown-linux-musl -f Dockerfile.mips-unknown-linux-musl . + docker build -t shadowsocks-rust:mipsel-unknown-linux-musl -f Dockerfile.mipsel-unknown-linux-musl . - name: Install cross run: cargo install cross - name: Build releases diff --git a/build/build-release b/build/build-release index 75849295..be8ae67f 100755 --- a/build/build-release +++ b/build/build-release @@ -28,6 +28,9 @@ if [[ "${#targets[@]}" == "0" ]]; then "arm-unknown-linux-gnueabihf" # armhf, hard "aarch64-unknown-linux-gnu" + + "mips-unknown-linux-musl" # big endian + "mipsel-unknown-linux-musl" # little endian ) fi @@ -44,8 +47,15 @@ function build() { EXTRA_FEATURES="local-redir" fi + EXTRA_FLAG="" + if [[ "$TARGET" == "mips"* ]]; then + EXTRA_FEATURES="sodium rc4 aes-cfb aes-ctr local-http local-http-native-tls local-tunnel local-socks4 local-redir" + EXTRA_FLAG="--no-default-features" + fi + cross build --target "${TARGET}" \ --features "aes-pmac-siv openssl-vendored ${EXTRA_FEATURES}" \ + ${EXTRA_FLAG} \ --release if [[ $? != "0" ]]; then