From 5e90134183745c723da5335930ca157962c703f1 Mon Sep 17 00:00:00 2001 From: dev0 Date: Sun, 27 Oct 2024 04:18:37 +1100 Subject: [PATCH] f --- .github/workflows/ci.yml | 33 ++++++++++++++++++++++++++++----- 1 file changed, 28 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5f11f014a..2dfa647c5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,7 +16,6 @@ env: REGISTRY: "ghcr.io" IMAGE_NAME: "clash-rs" RUST_LOG: "clash=TRACE" - ENABLED_FEATURES: "'shadowsocks, tuic, onion'" # Arm builder https://github.blog/changelog/2024-09-03-github-actions-arm64-linux-and-windows-runners-are-now-generally-available/ @@ -38,6 +37,7 @@ jobs: # toolchain: nightly # cross: false # postfix: "" + # extra-args: "" # components: "" # rustflags: "--cfg tokio_unstable" @@ -45,81 +45,99 @@ jobs: - os: ubuntu-latest target: x86_64-unknown-linux-gnu cross: true + extra-args: -F "shadowsocks, tuic, onion" - os: ubuntu-latest target: i686-unknown-linux-gnu cross: true + extra-args: -F "shadowsocks, tuic, onion" # Linux x86 musl - os: ubuntu-latest target: x86_64-unknown-linux-musl cross: true + extra-args: -F "shadowsocks, tuic, onion" # Linux x86 gnu static-crt - os: ubuntu-latest target: x86_64-unknown-linux-gnu release-name: x86_64-unknown-linux-gnu-static-crt cross: true + extra-args: -F "shadowsocks, tuic, onion" rustflags: "-Ctarget-feature=+crt-static --cfg tokio_unstable" - os: ubuntu-latest target: i686-unknown-linux-gnu release-name: i686-unknown-linux-gnu-static-crt cross: true + extra-args: -F "shadowsocks, tuic, onion" rustflags: "-Ctarget-feature=+crt-static --cfg tokio_unstable" # Linux arm gnu - os: ubuntu-latest target: aarch64-unknown-linux-gnu cross: true + extra-args: -F "shadowsocks, tuic, onion" - os: ubuntu-latest target: armv7-unknown-linux-gnueabi cross: true + extra-args: -F "shadowsocks, tuic, onion" - os: ubuntu-latest target: armv7-unknown-linux-gnueabihf cross: true + extra-args: -F "shadowsocks, tuic, onion" # Linux arm musl - os: ubuntu-latest target: aarch64-unknown-linux-musl cross: true + extra-args: -F "shadowsocks, tuic, onion" - os: ubuntu-latest target: armv7-unknown-linux-musleabihf cross: true + extra-args: -F "shadowsocks, tuic, onion" # Linux arm gnu static-crt - os: ubuntu-latest target: aarch64-unknown-linux-gnu release-name: aarch64-unknown-linux-gnu-static-crt cross: true + extra-args: -F "shadowsocks, tuic, onion" rustflags: "-Ctarget-feature=+crt-static --cfg tokio_unstable" - os: ubuntu-latest target: armv7-unknown-linux-gnueabi release-name: armv7-unknown-linux-gnueabi-static-crt cross: true + extra-args: -F "shadowsocks, tuic, onion" rustflags: "-Ctarget-feature=+crt-static --cfg tokio_unstable" # Linux RISC-V gnu # - os: ubuntu-latest # target: riscv64gc-unknown-linux-gnu # cross: true + # extra-args: "--all-features" # Windows - os: windows-latest target: x86_64-pc-windows-msvc cross: false postfix: ".exe" + extra-args: -F "shadowsocks, tuic, onion" - os: windows-latest target: i686-pc-windows-msvc cross: false postfix: ".exe" + extra-args: -F "shadowsocks, tuic, onion" - os: windows-latest target: aarch64-pc-windows-msvc cross: false postfix: ".exe" + extra-args: --F "shadowsocks,tuic" # Windows static-crt - os: windows-latest target: x86_64-pc-windows-msvc release-name: x86_64-pc-windows-msvc-static-crt cross: false postfix: ".exe" + extra-args: -F "shadowsocks, tuic, onion" rustflags: "-Ctarget-feature=+crt-static --cfg tokio_unstable" - os: windows-latest target: i686-pc-windows-msvc release-name: i686-pc-windows-msvc-static-crt cross: false postfix: ".exe" + extra-args: -F "shadowsocks, tuic, onion" rustflags: >- -Ctarget-feature=+crt-static -Clink-args=/NODEFAULTLIB:libvcruntimed.lib @@ -140,24 +158,29 @@ jobs: release-name: aarch64-pc-windows-msvc-static-crt cross: false postfix: ".exe" + extra-args: -F "shadowsocks, tuic" rustflags: "-Ctarget-feature=+crt-static --cfg tokio_unstable" # MacOSX - os: macos-14 target: x86_64-apple-darwin cross: false + extra-args: -F "shadowsocks, tuic, onion" - os: macos-14 target: aarch64-apple-darwin cross: false + extra-args: -F "shadowsocks, tuic, onion" # MacOSX static-crt - os: macos-14 target: x86_64-apple-darwin release-name: x86_64-apple-darwin-static-crt cross: false + extra-args: -F "shadowsocks, tuic, onion" rustflags: "-Ctarget-feature=+crt-static --cfg tokio_unstable" - os: macos-14 target: aarch64-apple-darwin release-name: aarch64-apple-darwin-static-crt cross: false + extra-args: -F "shadowsocks, tuic, onion" rustflags: "-Ctarget-feature=+crt-static --cfg tokio_unstable" # Linux mips: tier-3, pity # Windows gnu: tokio dont work @@ -212,7 +235,7 @@ jobs: with: use-cross: ${{ matrix.cross }} command: clippy - args: --all --target ${{ matrix.target }} -F ${{ env.ENABLED_FEATURES }} -- -D warnings + args: --all --target ${{ matrix.target }} ${{ matrix.extra-args }} -- -D warnings env: CLASH_DOCKER_TEST: "true" @@ -222,7 +245,7 @@ jobs: with: use-cross: ${{ matrix.cross }} command: test - args: --all --target ${{ matrix.target }} -F ${{ env.ENABLED_FEATURES }} + args: --all --target ${{ matrix.target }} ${{ matrix.extra-args }} env: CROSS_CONTAINER_OPTS: "--network host" CLASH_DOCKER_TEST: "true" @@ -234,7 +257,7 @@ jobs: with: use-cross: ${{ matrix.cross }} command: test - args: --all --target ${{ matrix.target }} -F ${{ env.ENABLED_FEATURES }} + args: --all --target ${{ matrix.target }} ${{ matrix.extra-args }} env: RUSTFLAGS: ${{ matrix.rustflags || '--cfg tokio_unstable' }} @@ -243,7 +266,7 @@ jobs: with: use-cross: ${{ matrix.cross }} command: build - args: --release --target ${{ matrix.target }} -F ${{ env.ENABLED_FEATURES }} + args: --release --target ${{ matrix.target }} ${{ matrix.extra-args }} env: RUSTFLAGS: ${{ matrix.rustflags || '--cfg tokio_unstable' }}