Update rust.yml #116
This file contains hidden or 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
| name: Rust CI | |
| on: [push] | |
| jobs: | |
| build-ubuntu-rustc: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: print rustc version | |
| run: | | |
| rustc --version | |
| - name: check code formatting | |
| run: | | |
| rustup component add --toolchain nightly-x86_64-unknown-linux-gnu rustfmt | |
| cd rust | |
| cargo fmt -- --check | |
| rustup component add --toolchain nightly-x86_64-unknown-linux-gnu clippy | |
| RUSTFLAGS="-A unused" cargo clippy -- -Dwarnings | |
| cargo clippy --tests | |
| - name: compile and test | |
| run: | | |
| cd rust | |
| cargo test |