-
Notifications
You must be signed in to change notification settings - Fork 50
100 lines (81 loc) · 2.19 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
name: CI
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "*" ]
env:
CARGO_TERM_COLOR: always
jobs:
build_and_test:
name: Tests
runs-on: ubuntu-latest
steps:
- name: Checkout Plonky3
uses: actions/checkout@v4
with:
repository: Plonky3/Plonky3
path: Plonky3
- name: Checkout Valida
uses: actions/checkout@v4
with:
path: valida
- name: Install nightly toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
- name: Build
working-directory: valida
run: cargo build --all-targets
- name: Test
working-directory: valida
run: cargo test
coverage:
name: Code coverage
runs-on: ubuntu-latest
container:
image: xd009642/tarpaulin:develop-nightly
options: --security-opt seccomp=unconfined
steps:
- name: Checkout Plonky3
uses: actions/checkout@v4
with:
repository: Plonky3/Plonky3
path: Plonky3
- name: Checkout Valida
uses: actions/checkout@v4
with:
path: valida
- name: Generate code coverage
working-directory: valida
run: |
cargo +nightly tarpaulin --verbose --all-features --workspace --timeout 120 --out xml
- name: Upload to codecov.io
uses: codecov/codecov-action@v2
lints:
name: Lints
runs-on: ubuntu-latest
steps:
- name: Checkout Plonky3
uses: actions/checkout@v4
with:
repository: Plonky3/Plonky3
path: Plonky3
- name: Checkout Valida
uses: actions/checkout@v4
with:
path: valida
- name: Install nightly toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
components: rustfmt, clippy
- name: Format
working-directory: valida
run: cargo fmt --all -- --check
# TODO: Enforce clippy at some point...
# - name: Run cargo clippy
# working-directory: valida
# run: cargo clippy --all-features --all-targets -- -D warnings -A incomplete-features