users other actions to install nightly

This commit is contained in:
zonyitoo
2020-11-29 00:31:00 +08:00
parent 4a4576bcf5
commit dbaafdd57f
4 changed files with 32 additions and 17 deletions

View File

@@ -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"

View File

@@ -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: |

View File

@@ -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

View File

@@ -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
}