roc/.github/workflows/ci.yml

60 lines
1.3 KiB
YAML
Raw Normal View History

on: [pull_request]
2019-11-15 02:21:59 +03:00
2019-11-15 02:47:11 +03:00
name: CI
2019-11-15 02:21:59 +03:00
jobs:
2019-11-15 02:47:11 +03:00
test:
2020-01-05 08:12:37 +03:00
name: fmt, clippy, test, test --release
2019-11-15 02:47:11 +03:00
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
2020-01-11 05:47:03 +03:00
2019-11-15 02:47:11 +03:00
- name: Install LLVM
2019-11-15 02:58:10 +03:00
run: sudo ./ci/install-llvm.sh 8
2019-12-19 03:52:48 +03:00
- uses: actions-rs/toolchain@v1
name: Install Rust Toolchain
with:
profile: minimal
toolchain: stable
override: true
2019-11-15 02:21:59 +03:00
2019-11-15 02:47:11 +03:00
- run: rustup component add rustfmt
2020-01-05 08:12:37 +03:00
2020-01-11 05:47:03 +03:00
- name: Cache cargo registry
uses: actions/cache@v1
with:
path: ~/.cargo/registry
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
2020-01-11 21:27:31 +03:00
2020-01-11 05:47:03 +03:00
- name: Cache cargo index
uses: actions/cache@v1
with:
path: ~/.cargo/git
key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }}
2019-11-15 03:42:50 +03:00
- uses: actions-rs/cargo@v1
name: cargo fmt --check
2019-11-15 02:47:11 +03:00
with:
command: fmt
args: --all -- --check
2019-11-15 02:21:59 +03:00
2019-11-21 15:06:26 +03:00
- run: rustup component add clippy
2020-01-05 08:12:37 +03:00
2019-11-21 15:06:26 +03:00
- uses: actions-rs/cargo@v1
name: cargo clippy
with:
command: clippy
args: -- -D warnings
2020-01-05 08:12:37 +03:00
- uses: actions-rs/cargo@v1
name: cargo test
with:
command: test
- uses: actions-rs/cargo@v1
name: cargo test --release
with:
command: test
args: --release