From 1835968c789a2ef03d68a89aed07b615b219a6c4 Mon Sep 17 00:00:00 2001 From: Itsusinn Date: Tue, 21 May 2024 02:19:50 +0800 Subject: [PATCH] build: enable simd for docker --- .github/Dockerfile | 1 + .github/workflows/ci.yml | 22 +++++++++++----------- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/.github/Dockerfile b/.github/Dockerfile index 63683ba9..5c3be6db 100644 --- a/.github/Dockerfile +++ b/.github/Dockerfile @@ -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 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8b0ff2be..b98ac96d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -107,11 +107,11 @@ 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 @@ -119,11 +119,11 @@ jobs: 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 @@ -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