forked from starkware-libs/blockifier
-
Notifications
You must be signed in to change notification settings - Fork 8
59 lines (54 loc) · 1.48 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
name: CI
on:
push:
branches:
- main
- main-v[0-9].**
tags:
- v[0-9].**
pull_request:
types:
- opened
- reopened
- synchronize
- auto_merge_enabled
jobs:
checks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: dtolnay/rust-toolchain@master
with:
components: rustfmt, clippy
toolchain: nightly-2022-11-03
- uses: Swatinem/rust-cache@v2
- run: |
cargo +nightly-2022-11-03 fmt --all -- --check
cargo clippy --all-targets --all-features
run-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
components: rustfmt
toolchain: nightly-2022-11-03
- uses: Swatinem/rust-cache@v2
- run: cargo test
udeps:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: dtolnay/rust-toolchain@master
name: "Rust Toolchain Setup"
with:
toolchain: nightly-2022-11-03
- uses: Swatinem/rust-cache@v2
id: "cache-cargo"
- if: ${{ steps.cache-cargo.outputs.cache-hit != 'true' }}
name: "Download and run cargo-udeps"
run: |
wget -O - -c https://github.com/est31/cargo-udeps/releases/download/v0.1.35/cargo-udeps-v0.1.35-x86_64-unknown-linux-gnu.tar.gz | tar -xz
cargo-udeps-*/cargo-udeps udeps
env:
RUSTUP_TOOLCHAIN: nightly-2022-11-03