-
Notifications
You must be signed in to change notification settings - Fork 11
42 lines (40 loc) · 1.04 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: 1.79.0
components: clippy,rustfmt
- uses: actions/cache@v2
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
mantle/target/
key: ${{ runner.os }}-ci-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Build
working-directory: mantle
run: cargo build --locked --verbose
- name: Run linters
working-directory: mantle
run: |
rustup show
cargo version
cargo clippy -V
cargo fmt -- --check
cargo clippy -- -D warnings
- name: Generate schema
working-directory: mantle
run: cargo run --bin gen_schema