From d6f119929df624e414bde93cfe89f78a64142d03 Mon Sep 17 00:00:00 2001 From: zonyitoo Date: Sat, 27 Apr 2024 01:02:19 +0800 Subject: [PATCH] enable local-tun for windows targets --- .github/workflows/build-and-test.yml | 2 +- .github/workflows/build-nightly-release.yml | 6 +++++- .github/workflows/build-release.yml | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index 2a72bd933c31..c069a206a228 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -44,6 +44,6 @@ jobs: run: cargo build --verbose --features "local-http-rustls local-redir local-dns local-tun dns-over-tls dns-over-https stream-cipher aead-cipher-extra aead-cipher-2022 aead-cipher-2022-extra security-replay-attack-detect" - name: Build with All Features Enabled (Windows) if: ${{ runner.os == 'Windows' }} - run: cargo build --verbose --features "local-http-rustls local-dns dns-over-tls dns-over-https stream-cipher aead-cipher-extra aead-cipher-2022 aead-cipher-2022-extra security-replay-attack-detect winservice" + run: cargo build --verbose --features "local-http-rustls local-dns local-tun dns-over-tls dns-over-https stream-cipher aead-cipher-extra aead-cipher-2022 aead-cipher-2022-extra security-replay-attack-detect winservice" - name: Build with All Features Enabled - shadowsocks run: cargo build --manifest-path ./crates/shadowsocks/Cargo.toml --verbose --features "stream-cipher aead-cipher-2022" diff --git a/.github/workflows/build-nightly-release.yml b/.github/workflows/build-nightly-release.yml index 6f50f17d65c0..5a71fbe7bc0a 100644 --- a/.github/workflows/build-nightly-release.yml +++ b/.github/workflows/build-nightly-release.yml @@ -42,6 +42,10 @@ jobs: compile_features="-f local-redir -f local-tun" fi + if [[ "$compile_target" == *"-windows-"* ]]; then + compile_features="-f winservice -f local-tun" + fi + if [[ "$compile_target" == "mips-"* || "$compile_target" == "mipsel-"* || "$compile_target" == "mips64-"* || "$compile_target" == "mips64el-"* ]]; then sudo apt-get update -y && sudo apt-get install -y upx; if [[ "$?" == "0" ]]; then @@ -117,7 +121,7 @@ jobs: - name: Build release run: | - pwsh ./build/build-host-release.ps1 winservice + pwsh ./build/build-host-release.ps1 winservice local-tun - name: Upload Artifacts uses: actions/upload-artifact@v4 diff --git a/.github/workflows/build-release.yml b/.github/workflows/build-release.yml index 7911ea5ac082..bc514b6e5f10 100644 --- a/.github/workflows/build-release.yml +++ b/.github/workflows/build-release.yml @@ -59,7 +59,7 @@ jobs: fi if [[ "$compile_target" == *"-windows-"* ]]; then - compile_features="-f winservice" + compile_features="-f winservice -f local-tun" fi if [[ "$compile_target" == "mips-"* || "$compile_target" == "mipsel-"* || "$compile_target" == "mips64-"* || "$compile_target" == "mips64el-"* ]]; then @@ -144,7 +144,7 @@ jobs: - name: Build release run: | - pwsh ./build/build-host-release.ps1 winservice + pwsh ./build/build-host-release.ps1 winservice local-tun - name: Upload Github Assets uses: softprops/action-gh-release@v1