Skip to content

Commit

Permalink
ci(docker): only enable simd on x86_64
Browse files Browse the repository at this point in the history
  • Loading branch information
Itsusinn committed May 20, 2024
1 parent 41cdda8 commit 3e681a5
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion .github/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,14 @@ RUN apk add git gcc musl-dev
COPY . /app/tuic

WORKDIR /app/tuic
ARG RUSTFLAGS="-Ctarget-feature=+sse2,+sse3,+avx"

RUN if [ "$DOCKER_PLATFORM" = "amd64" ]; then \
echo "Setting RUSTFLAGS for x86_64" && \
export RUSTFLAGS="-Ctarget-feature=+sse2,+sse3,+avx" ; \
else \
export RUSTFLAGS="" ; \
fi

RUN cargo build --release --config net.git-fetch-with-cli=true --package tuic-server
RUN cp ./target/release/tuic-server /usr/bin/tuic-server
RUN chmod +x /usr/bin/tuic-server
Expand Down

0 comments on commit 3e681a5

Please sign in to comment.