-
Notifications
You must be signed in to change notification settings - Fork 227
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Still need to add support for running tests in ci
- Loading branch information
Showing
1 changed file
with
15 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |