From 7219fd8df520d295faa42b59f77e25ca2818b6b1 Mon Sep 17 00:00:00 2001 From: tottoto Date: Sat, 15 Apr 2023 16:46:43 +0900 Subject: [PATCH] Update ci config to setup rust (#1937) --- .github/workflows/CI.yml | 52 ++++++---------------------------------- 1 file changed, 7 insertions(+), 45 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 6fe0e4e5..31a98324 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -18,11 +18,8 @@ jobs: - uses: arduino/setup-protoc@v1 with: repo-token: ${{ secrets.GITHUB_TOKEN }} - - uses: dtolnay/rust-toolchain@stable + - uses: dtolnay/rust-toolchain@beta with: - toolchain: beta - override: true - profile: minimal components: clippy, rustfmt - uses: Swatinem/rust-cache@v2 - name: Check @@ -41,10 +38,6 @@ jobs: steps: - uses: actions/checkout@master - uses: dtolnay/rust-toolchain@stable - with: - toolchain: stable - override: true - profile: minimal - uses: Swatinem/rust-cache@v1 - name: cargo doc env: @@ -57,10 +50,6 @@ jobs: - uses: actions/checkout@master - uses: arduino/setup-protoc@v1 - uses: dtolnay/rust-toolchain@stable - with: - toolchain: stable - override: true - profile: minimal - uses: Swatinem/rust-cache@v1 - name: Install cargo-hack run: | @@ -75,11 +64,7 @@ jobs: crate: [axum, axum-core, axum-extra, axum-macros] steps: - uses: actions/checkout@master - - uses: dtolnay/rust-toolchain@stable - with: - toolchain: nightly - override: true - profile: minimal + - uses: dtolnay/rust-toolchain@nightly - uses: Swatinem/rust-cache@v1 - name: Install cargo-public-api-crates run: | @@ -96,11 +81,9 @@ jobs: steps: - uses: actions/checkout@master - uses: arduino/setup-protoc@v1 - - uses: dtolnay/rust-toolchain@stable + - uses: dtolnay/rust-toolchain@master with: toolchain: ${{ matrix.rust }} - override: true - profile: minimal - uses: Swatinem/rust-cache@v1 - name: Run tests uses: actions-rs/cargo@v1 @@ -114,12 +97,10 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@master - - uses: dtolnay/rust-toolchain@stable + - uses: dtolnay/rust-toolchain@master with: # same as `axum-macros/rust-toolchain` toolchain: nightly-2022-11-18 - override: true - profile: minimal - uses: Swatinem/rust-cache@v1 - name: Run nightly tests working-directory: axum-macros @@ -133,16 +114,11 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@master - - uses: dtolnay/rust-toolchain@stable + - uses: dtolnay/rust-toolchain@master with: toolchain: ${{ env.MSRV }} - override: true - profile: minimal - name: "install Rust nightly" - uses: dtolnay/rust-toolchain@stable - with: - toolchain: nightly - profile: minimal + uses: dtolnay/rust-toolchain@nightly - uses: Swatinem/rust-cache@v1 - name: Select minimal versions uses: actions-rs/cargo@v1 @@ -188,10 +164,6 @@ jobs: steps: - uses: actions/checkout@master - uses: dtolnay/rust-toolchain@stable - with: - toolchain: stable - override: true - profile: minimal - uses: Swatinem/rust-cache@v1 - name: Run doc tests uses: actions-rs/cargo@v1 @@ -222,10 +194,7 @@ jobs: - uses: actions/checkout@master - uses: dtolnay/rust-toolchain@stable with: - toolchain: stable target: armv5te-unknown-linux-musleabi - override: true - profile: minimal - uses: Swatinem/rust-cache@v1 - name: Check uses: actions-rs/cargo@v1 @@ -250,10 +219,7 @@ jobs: - uses: actions/checkout@master - uses: dtolnay/rust-toolchain@stable with: - toolchain: stable target: wasm32-unknown-unknown - override: true - profile: minimal - uses: Swatinem/rust-cache@v1 - name: Check uses: actions-rs/cargo@v1 @@ -267,11 +233,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@master - - uses: dtolnay/rust-toolchain@stable - with: - toolchain: beta - override: true - profile: minimal + - uses: dtolnay/rust-toolchain@beta - uses: Swatinem/rust-cache@v2 - name: Install cargo-sort run: |