diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 3db4ee482..6bba0bf63 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -22,10 +22,9 @@ jobs: - uses: actions/checkout@v2 - name: Install rust - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - override: true + run: | + rustup override set stable + rustup update stable - name: set up docker buildx run: docker buildx create --name builder --use @@ -62,10 +61,9 @@ jobs: - uses: actions/checkout@v2 - name: Install rust - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - override: true + run: | + rustup override set stable + rustup update stable - name: set up docker buildx run: docker buildx create --name builder --use @@ -108,10 +106,9 @@ jobs: - uses: actions/checkout@v2 - name: Install rust - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - override: true + run: | + rustup override set stable + rustup update stable - name: set up docker buildx run: docker buildx create --name builder --use @@ -157,10 +154,9 @@ jobs: - uses: actions/checkout@v2 - name: Install rust - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - override: true + run: | + rustup override set stable + rustup update stable - name: Rust Cache uses: Swatinem/rust-cache@v2 @@ -189,11 +185,10 @@ jobs: - uses: actions/checkout@v2 - name: Install rust - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - override: true - components: llvm-tools + run: | + rustup override set stable + rustup update stable + rustup components add llvm-tools - name: Add cargo-llvm-cov uses: taiki-e/install-action@v2 @@ -212,16 +207,10 @@ jobs: shared-key: "stable" - name: Build - uses: actions-rs/cargo@v1 - with: - command: build - args: --workspace --all-targets --all-features --release + run: cargo build --workspace --all-targets --all-features --release - name: Run tests - uses: actions-rs/cargo@v1 - with: - command: llvm-cov - args: --workspace --all-features --all-targets --release --lcov --output-path lcov.info + run: cargo llvm-cov --workspace --all-features --all-targets --release --lcov --output-path lcov.info - name: Upload code coverage uses: codecov/codecov-action@v3 @@ -238,11 +227,9 @@ jobs: run: echo "NIGHTLY_VERSION=$(curl https://rust-lang.github.io/rustup-components-history/x86_64-unknown-linux-gnu/rustc)" >> $GITHUB_ENV - name: Install rust - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: nightly-${{ env.NIGHTLY_VERSION }} - override: true + run: | + rustup set profile minimal + rustup override set nightly-${{ env.NIGHTLY_VERSION }} - name: Install dependencies uses: awalsh128/cache-apt-pkgs-action@latest @@ -256,22 +243,13 @@ jobs: shared-key: "nightly" - name: Update to minimal direct dependencies - uses: actions-rs/cargo@v1 - with: - command: update - args: -Zdirect-minimal-versions + run: cargo update -Zdirect-minimal-versions - name: Build - uses: actions-rs/cargo@v1 - with: - command: build - args: --workspace --all-targets --all-features --release + run: cargo build --workspace --all-targets --all-features --release - name: Run tests - uses: actions-rs/cargo@v1 - with: - command: test - args: --workspace --all-features --all-targets --release + run: cargo test --workspace --all-features --all-targets --release build-and-test-msrv: runs-on: ubuntu-latest @@ -280,10 +258,8 @@ jobs: - uses: actions/checkout@v2 - name: Install rust - uses: actions-rs/toolchain@v1 - with: - toolchain: "1.70" - override: true + run: | + rustup override set 1.70 - name: Install dependencies uses: awalsh128/cache-apt-pkgs-action@latest @@ -297,16 +273,10 @@ jobs: shared-key: "msrv" - name: Build - uses: actions-rs/cargo@v1 - with: - command: build - args: --workspace --all-targets --all-features --release + run: cargo build --workspace --all-targets --all-features --release - name: Run tests - uses: actions-rs/cargo@v1 - with: - command: test - args: --workspace --all-features --all-targets --release + run: cargo test --workspace --all-features --all-targets --release miri: needs: build-and-test @@ -319,12 +289,10 @@ jobs: run: echo "NIGHTLY_VERSION=$(curl https://rust-lang.github.io/rustup-components-history/x86_64-unknown-linux-gnu/miri)" >> $GITHUB_ENV - name: Install rust - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: nightly-${{ env.NIGHTLY_VERSION }} - override: true - components: miri + run: | + rustup set profile minimal + rustup override set nightly-${{ env.NIGHTLY_VERSION }} + rustup component add miri - name: Install dependencies uses: awalsh128/cache-apt-pkgs-action@latest @@ -338,10 +306,7 @@ jobs: shared-key: miri - name: Run tests - uses: actions-rs/cargo@v1 - with: - command: miri - args: test --workspace --all-features miri + run: cargo miri test --workspace --all-features miri format: runs-on: ubuntu-latest @@ -351,12 +316,11 @@ jobs: - uses: actions/checkout@v2 - name: Install rust - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: stable - override: true - components: rustfmt + run: | + rustup set profile minimal + rustup override set stable + rustup update stable + rustup component add rustfmt - name: Rust Cache uses: Swatinem/rust-cache@v2 @@ -364,10 +328,7 @@ jobs: shared-key: "stable" - name: Run rustfmt - uses: actions-rs/cargo@v1 - with: - command: fmt - args: --all -- --check + run: cargo fmt --all -- --check clippy: needs: format @@ -378,12 +339,11 @@ jobs: - uses: actions/checkout@v2 - name: Install rust - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: stable - override: true - components: clippy + run: | + rustup set profile minimal + rustup override set stable + rustup update stable + rustup component add clippy - name: Install dependencies uses: awalsh128/cache-apt-pkgs-action@latest @@ -408,11 +368,10 @@ jobs: - uses: actions/checkout@v2 - name: Install rust - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: stable - override: true + run: | + rustup set profile minimal + rustup override set stable + rustup update stable - name: Install dependencies uses: awalsh128/cache-apt-pkgs-action@latest @@ -426,10 +385,7 @@ jobs: shared-key: "stable" - name: Build docs - uses: actions-rs/cargo@v1 - with: - command: doc - args: --no-deps --document-private-items --all-features + run: cargo doc --no-deps --document-private-items --all-features audit: needs: clippy @@ -438,11 +394,10 @@ jobs: - uses: actions/checkout@v2 - name: Install rust - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: stable - override: true + run: | + rustup set profile minimal + rustup override set stable + rustup update stable - name: Install cargo-audit uses: taiki-e/install-action@v2 @@ -455,6 +410,4 @@ jobs: shared-key: "audit" - name: Run audit - uses: actions-rs/cargo@v1 - with: - command: audit + run: cargo audit