-
Notifications
You must be signed in to change notification settings - Fork 68
79 lines (72 loc) · 2.26 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
name: CI
on:
push:
branches: [ "main" ]
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
# this is needed to gain access via OIDC to the S3 bucket for caching
permissions:
id-token: write
contents: read
env:
CARGO_TERM_COLOR: always
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
test:
name: test
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: risc0/risc0/.github/actions/[email protected]
- uses: risc0/risc0/.github/actions/[email protected]
- uses: risc0/cargo-install@v1
with:
crate: cargo-binstall
- run: cargo binstall -y --force [email protected]
- run: cargo risczero install
- run: cargo test --all-targets -p zeth-core -p zeth-guests -p zeth-preflight -p zeth -p zeth-benchmark -F debug-guest-build
- run: cargo test --all-targets -p zeth-core-ethereum -p zeth-preflight-ethereum -p zeth-ethereum -F debug-guest-build
- run: cargo test --all-targets -p zeth-core-optimism -p zeth-preflight-optimism -p zeth-optimism -F debug-guest-build
clippy:
name: clippy
runs-on: [self-hosted, prod, "${{ matrix.os }}"]
strategy:
fail-fast: false
matrix:
include:
- os: Linux
feature: default
- os: Linux
feature: cuda
- os: macOS
feature: default
- os: macOS
feature: metal
env:
FEATURE: ${{ matrix.feature }}
RISC0_SKIP_BUILD: 1
RISC0_SKIP_BUILD_KERNELS: 1
steps:
- uses: actions/checkout@v4
- if: matrix.feature == 'cuda'
uses: risc0/risc0/.github/actions/[email protected]
- uses: risc0/risc0/.github/actions/[email protected]
- uses: risc0/risc0/.github/actions/[email protected]
- uses: risc0/clippy-action@main
with:
reporter: 'github-pr-check'
fail_on_error: true
clippy_flags: -F $FEATURE --workspace --all-targets -- -Dwarnings
fmt:
name: fmt
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- uses: risc0/risc0/.github/actions/[email protected]
- run: cargo fmt --all --check