Skip to content

Commit

Permalink
build: enable simd for docker
Browse files Browse the repository at this point in the history
  • Loading branch information
Itsusinn committed May 20, 2024
1 parent 6da53bc commit 1835968
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
1 change: 1 addition & 0 deletions .github/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ RUN apk add git gcc musl-dev
COPY . /app/tuic

WORKDIR /app/tuic
ARG RUSTFLAGS="-Ctarget-feature=+sse2,+sse3,+avx"
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
22 changes: 11 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,23 +107,23 @@ jobs:
cross: false

# FreeBSD
- os: ubuntu-latest
target: x86_64-unknown-freebsd
release-name: x86_64-freebsd
cross: true
rustflags: "-Ctarget-feature=+sse2,+sse3,+avx"
# - os: ubuntu-latest
# target: x86_64-unknown-freebsd
# release-name: x86_64-freebsd
# cross: true
# rustflags: "-Ctarget-feature=+sse2,+sse3,+avx"

# RISC-V
- os: ubuntu-latest
target: riscv64gc-unknown-linux-gnu
release-name: riscv64gc-linux
cross: true

# Loongarch64
- os: ubuntu-latest
target: loongarch64-unknown-linux-gnu
release-name: loongarch64-linux
cross: true
# Loongarch64 ring problem
# - os: ubuntu-latest
# target: loongarch64-unknown-linux-gnu
# release-name: loongarch64-linux
# cross: true

# Linux mips: tier-3, pity
# Windows gnu: tokio dont work
Expand Down Expand Up @@ -275,7 +275,7 @@ jobs:
- name: Build and push
uses: docker/build-push-action@v5
if: startsWith(github.ref, 'refs/heads/master')
if: startsWith(github.ref, 'refs/heads/dev')
with:
context: .
file: .github/Dockerfile
Expand Down

0 comments on commit 1835968

Please sign in to comment.