single multiplatform build for shadowsockets-rust
Some checks failed
CI / Build shadowsocks-rust docker images (push) Has been cancelled
Some checks failed
CI / Build shadowsocks-rust docker images (push) Has been cancelled
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
FROM --platform=$BUILDPLATFORM rust:alpine3.20 AS builder
|
||||
FROM --platform=$TARGETPLATFORM rust:alpine AS builder
|
||||
|
||||
ARG TARGETARCH VERSION
|
||||
ARG VERSION TARGETPLATFORM
|
||||
|
||||
RUN set -x \
|
||||
&& apk add --no-cache build-base cmake llvm15-dev clang15-libclang clang15 rust-bindgen git
|
||||
@@ -9,7 +9,7 @@ WORKDIR /root/shadowsocks-rust
|
||||
|
||||
RUN git clone --depth 1 --branch "v${VERSION}" https://github.com/shadowsocks/shadowsocks-rust.git .
|
||||
|
||||
RUN case "$TARGETARCH" in \
|
||||
RUN case "$TARGETPLATFORM" in \
|
||||
"386") \
|
||||
RUST_TARGET="i686-unknown-linux-musl" \
|
||||
MUSL="i686-linux-musl" \
|
||||
@@ -22,8 +22,12 @@ RUN case "$TARGETARCH" in \
|
||||
RUST_TARGET="aarch64-unknown-linux-musl" \
|
||||
MUSL="aarch64-linux-musl" \
|
||||
;; \
|
||||
"linux/arm/v7") \
|
||||
RUST_TARGET="arm-unknown-linux-musleabihf" \
|
||||
MUSL="arm-linux-musleabihf" \
|
||||
;; \
|
||||
*) \
|
||||
echo "Doesn't support $TARGETARCH architecture" \
|
||||
echo "Doesn't support $TARGETPLATFORM architecture" \
|
||||
exit 1 \
|
||||
;; \
|
||||
esac \
|
||||
|
Reference in New Issue
Block a user