Update ci config to setup rust (#1937)

This commit is contained in:
tottoto 2023-04-15 16:46:43 +09:00 committed by GitHub
parent 39bb28130d
commit 7219fd8df5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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