From 76e6ca16223141a0927ff8d6beda96d8af101c58 Mon Sep 17 00:00:00 2001 From: Fredrik Simonsson Date: Fri, 3 Nov 2023 09:31:14 +0900 Subject: [PATCH] CI Clippy and fmt workflows --- .github/workflows/rust-checks.yaml | 40 +++++++++++++++--------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/.github/workflows/rust-checks.yaml b/.github/workflows/rust-checks.yaml index 6fb26152264..db4b50ace0b 100644 --- a/.github/workflows/rust-checks.yaml +++ b/.github/workflows/rust-checks.yaml @@ -11,31 +11,31 @@ concurrency: cancel-in-progress: true jobs: - rust-checks: + rust-fmt: runs-on: ubuntu-20.04 steps: - name: Checkout source code uses: actions/checkout@v4 - - - name: Install Protoc - uses: arduino/setup-protoc@v1 + - uses: actions-rust-lang/setup-rust-toolchain@v1 with: - version: "3.6.1" - - - name: Install clippy and fmt - run: rustup component add clippy rustfmt - - - name: Add wasm32-unknown-unknown target - run: rustup target add wasm32-unknown-unknown - - - name: Run Format Checks - uses: actions-rs/cargo@v1 + toolchain: nightly + components: rustfmt + - uses: actions-rust-lang/rustfmt@v1 + clippy-lint: + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v4 + - uses: actions-rust-lang/setup-rust-toolchain@v1 with: - command: fmt - args: --all - + toolchain: stable + components: clippy + - name: Install deps for musl build + run: | + sudo apt-get update + sudo apt-get install -y protobuf-compiler musl-tools clang build-essential curl llvm-dev libclang-dev linux-headers-generic libsnappy-dev liblz4-dev libzstd-dev libgflags-dev zlib1g-dev libbz2-dev + sudo ln -s /usr/bin/g++ /usr/bin/musl-g++ - name: Clippy - uses: actions-rs/cargo@v1 + uses: actions-rs-plus/clippy-check@v2 with: - command: clippy - args: --all-targets -- --no-deps -D warnings + toolchain: stable + args: --all-targets --all-features