aaron-ai commented on code in PR #490:
URL: https://github.com/apache/rocketmq-clients/pull/490#discussion_r1173573008
##########
.github/workflows/rust_build.yml:
##########
@@ -2,27 +2,114 @@ name: Rust Build
on:
workflow_call:
jobs:
+ fmt:
+ runs-on: ubuntu-latest
+ name: fmt
+ steps:
+ - uses: actions/checkout@v3
+ with:
+ submodules: true
+ - name: Install stable
+ uses: actions-rs/toolchain@v1
+ with:
+ toolchain: stable
+ components: rustfmt
+ - name: Code format check
+ working-directory: ./rust
+ run: cargo fmt --check
+ clippy:
+ runs-on: ubuntu-latest
+ name: clippy
+ permissions: write-all
+ strategy:
+ fail-fast: false
+ steps:
+ - uses: actions/checkout@v3
+ with:
+ submodules: true
+ - name: Install stable
+ uses: actions-rs/toolchain@v1
+ with:
+ toolchain: stable
+ components: clippy
+ - name: Install protoc
+ uses: arduino/setup-protoc@v1
+ with:
+ version: '3.x'
+ repo-token: ${{ secrets.GITHUB_TOKEN }}
+ - name: Clippy check
+ uses: actions-rs/clippy-check@v1
+ with:
+ token: ${{ secrets.GITHUB_TOKEN }}
+ args: --all-features --manifest-path rust/Cargo.toml -- -D warnings
+ doc:
+ runs-on: ubuntu-latest
+ name: doc
+ steps:
+ - uses: actions/checkout@v3
+ with:
+ submodules: true
+ - name: Install stable
+ uses: actions-rs/toolchain@v1
+ with:
+ toolchain: stable
+ - name: Install protoc
+ uses: arduino/setup-protoc@v1
+ with:
+ version: '3.x'
+ repo-token: ${{ secrets.GITHUB_TOKEN }}
+ - name: Build doc
+ working-directory: ./rust
+ run: cargo doc --no-deps --all-features
+ env:
+ RUSTDOCFLAGS: --cfg docsrs
+ msrv:
+ runs-on: ubuntu-latest
+ strategy:
+ matrix:
+ msrv: [1.61]
+ name: msrv / ${{ matrix.msrv }}
+ steps:
+ - uses: actions/checkout@v3
+ with:
+ submodules: true
+ - name: Install ${{ matrix.msrv }}
+ uses: actions-rs/toolchain@v1
+ with:
+ toolchain: ${{ matrix.msrv }}
Review Comment:
Do we need to set
[override](https://github.com/actions-rs/toolchain#example-workflow:~:text=false-,override,-Set%20installed%20toolchain)
to true? I am not sure if the additional version we installed will be enabled
if we do not set it to true.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]