Skip to content

Commit

Permalink
Update rust ci
Browse files Browse the repository at this point in the history
Still need to add support for running tests in ci
  • Loading branch information
emesare committed Dec 31, 2024
1 parent 268747a commit 8b87d99
Showing 1 changed file with 15 additions and 33 deletions.
48 changes: 15 additions & 33 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
@@ -1,44 +1,26 @@
name: Rust PR Checks
name: Rust CI

on:
push:
paths:
- 'rust/**'
pull_request:
paths:
- 'rust/**'

jobs:
build_and_lint:
name: cargo check & cargo clippy
# TODO: Cargo clippy (just warnings don't fail)
# TODO: Cargo test (we would need to pull in binary ninja)
# Check formatting with rustfmt
formatting:
name: cargo fmt
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3
with:
submodules: true

- name: Install Clang
run: |
sudo apt update
sudo apt install clang -y
- name: Install Rust
uses: actions-rs/toolchain@v1
- uses: actions/checkout@v4
# Ensure rustfmt is installed and setup problem matcher
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: 1.83.0
profile: minimal
override: true
components: clippy

- name: cargo check
working-directory: ./rust
run: cargo check --workspace --all-features

- name: cargo doc test
working-directory: ./rust
run: cargo test --doc -- --show-output

- name: cargo clippy
components: rustfmt
- name: Rustfmt Check
working-directory: ./rust
run: cargo clippy -- -D warnings
continue-on-error: true
# If this step fails, it will warn (?)
uses: actions-rust-lang/rustfmt@v1

0 comments on commit 8b87d99

Please sign in to comment.