From dbaafdd57fa5d8df07b597ad90807bb695e99a44 Mon Sep 17 00:00:00 2001 From: zonyitoo Date: Sun, 29 Nov 2020 00:31:00 +0800 Subject: [PATCH] users other actions to install nightly --- .github/workflows/build-and-test.yml | 33 ++++++++++++++++++---------- .github/workflows/build-release.yml | 10 +++++++-- build/build-host-release | 4 ++-- build/build-host-release.ps1 | 2 +- 4 files changed, 32 insertions(+), 17 deletions(-) diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index 70df2ec0..6260f461 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -25,13 +25,16 @@ jobs: target key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} - name: Install Rust nightly - run: rustup toolchain install nightly + uses: actions-rs/toolchain@v1 + with: + toolchain: nightly + override: true - name: Build & Test (Default) - run: cargo +nightly test --verbose --no-fail-fast + run: cargo test --verbose --no-fail-fast - name: Build & Test (--no-default-features) - run: cargo +nightly test --verbose --no-default-features --no-fail-fast + run: cargo test --verbose --no-default-features --no-fail-fast - name: Build with All Features Enabled - run: cargo +nightly build --verbose --features "local-redir local-dns dns-over-tls" + run: cargo build --verbose --features "local-redir local-dns dns-over-tls" build-windows: runs-on: windows-latest @@ -46,13 +49,16 @@ jobs: target key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} - name: Install Rust nightly - run: rustup toolchain install nightly + uses: actions-rs/toolchain@v1 + with: + toolchain: nightly + override: true - name: Build & Test (Default) - run: cargo +nightly test --verbose --no-fail-fast + run: cargo test --verbose --no-fail-fast - name: Build & Test (--no-default-features) - run: cargo +nightly test --verbose --no-default-features --no-fail-fast + run: cargo test --verbose --no-default-features --no-fail-fast - name: Build with All Features Enabled - run: cargo +nightly build --verbose --features "local-dns dns-over-tls" + run: cargo build --verbose --features "local-dns dns-over-tls" build-macos: runs-on: macos-latest @@ -72,10 +78,13 @@ jobs: target key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} - name: Install Rust nightly - run: rustup toolchain install nightly + uses: actions-rs/toolchain@v1 + with: + toolchain: nightly + override: true - name: Build & Test (Default) - run: cargo +nightly test --verbose --no-fail-fast + run: cargo test --verbose --no-fail-fast - name: Build & Test (--no-default-features) - run: cargo +nightly test --verbose --no-default-features --no-fail-fast + run: cargo test --verbose --no-default-features --no-fail-fast - name: Build with All Features Enabled - run: cargo +nightly build --verbose --features "local-redir local-dns dns-over-tls" + run: cargo build --verbose --features "local-redir local-dns dns-over-tls" diff --git a/.github/workflows/build-release.yml b/.github/workflows/build-release.yml index 427218d3..37d29bb7 100644 --- a/.github/workflows/build-release.yml +++ b/.github/workflows/build-release.yml @@ -62,7 +62,10 @@ jobs: echo "/usr/local/opt/gnu-tar/libexec/gnubin" >> $GITHUB_PATH - name: Install Rust nightly - run: rustup toolchain install nightly + uses: actions-rs/toolchain@v1 + with: + toolchain: nightly + override: true - name: Build release shell: bash @@ -86,7 +89,10 @@ jobs: - uses: actions/checkout@v2 - name: Install Rust nightly - run: rustup toolchain install nightly + uses: actions-rs/toolchain@v1 + with: + toolchain: nightly + override: true - name: Build release run: | diff --git a/build/build-host-release b/build/build-host-release index 75c4b870..01c4a39b 100755 --- a/build/build-host-release +++ b/build/build-host-release @@ -19,9 +19,9 @@ HOST_TRIPLE=$(rustc -Vv | grep 'host:' | awk '{print $2}') echo "Started build release for ${HOST_TRIPLE} ..." if [[ "${BUILD_TARGET}" != "" ]]; then - cargo +nightly build --release --features "${BUILD_EXTRA_FEATURES}" --target "${BUILD_TARGET}" + cargo build --release --features "${BUILD_EXTRA_FEATURES}" --target "${BUILD_TARGET}" else - cargo +nightly build --release --features "${BUILD_EXTRA_FEATURES}" + cargo build --release --features "${BUILD_EXTRA_FEATURES}" fi if [[ "$?" != "0" ]]; then diff --git a/build/build-host-release.ps1 b/build/build-host-release.ps1 index 27306708..662711de 100644 --- a/build/build-host-release.ps1 +++ b/build/build-host-release.ps1 @@ -10,7 +10,7 @@ $TargetTriple = (rustc -Vv | Select-String -Pattern "host: (.*)" | ForEach-Objec Write-Host "Started building release for ${TargetTriple} ..." -cargo +nightly build --release +cargo build --release if (!$?) { exit $LASTEXITCODE }