Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI Clippy and fmt workflows #54

Merged
merged 1 commit into from
Nov 3, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 20 additions & 20 deletions .github/workflows/rust-checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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