-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: add clippy linting and CI build/test (#30)
- Loading branch information
Showing
6 changed files
with
151 additions
and
53 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 |
---|---|---|
@@ -0,0 +1,83 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
|
||
jobs: | ||
build-test: | ||
strategy: | ||
fail-fast: false | ||
|
||
matrix: | ||
include: | ||
- os: windows-latest | ||
target: x86_64-pc-windows-msvc | ||
|
||
- os: ubuntu-latest | ||
target: x86_64-unknown-linux-gnu | ||
|
||
- os: macos-latest | ||
target: x86_64-apple-darwin | ||
|
||
name: Build & Test (${{ matrix.target }}) | ||
runs-on: ${{ matrix.os }} | ||
|
||
env: | ||
RA_TARGET: ${{ matrix.target }} | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install Rust toolchain | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
target: ${{ matrix.target }} | ||
profile: minimal | ||
override: true | ||
|
||
- name: Install Rust library source | ||
if: matrix.target == 'x86_64-unknown-linux-gnu' | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
target: ${{ matrix.target }} | ||
profile: minimal | ||
override: true | ||
components: rust-src | ||
|
||
- name: Build | ||
run: cargo build --verbose --target ${{ matrix.target }} | ||
|
||
- name: Run tests | ||
run: cargo test --verbose --target ${{ matrix.target }} | ||
|
||
lint: | ||
name: Formatter | ||
|
||
needs: build-test | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install Rust | ||
run: | | ||
rustup update stable | ||
rustup default stable | ||
rustup component add rustfmt | ||
rustup component add clippy | ||
- name: Check formatting | ||
run: cargo fmt --all -- --check | ||
|
||
- name: Check code for possible improvements | ||
run: cargo clippy -- -D warnings |
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
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
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
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
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
2403afb
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @Xithrius , Can you help me add linting & refactoring Verve ?
https://github.com/ParthJadhav/Verve
2403afb
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll see what I can do about the rust bit.