-
Notifications
You must be signed in to change notification settings - Fork 78
94 lines (86 loc) · 2.78 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
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 }}
RISC0_VERSION: "1.1.3"
RISC0_TOOLCHAIN_VERSION: "r0.1.81.0"
jobs:
test:
name: cargo test
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@v4
- uses: risc0/risc0/.github/actions/rustup@main
- uses: risc0/risc0/.github/actions/sccache@main
- uses: ./.github/actions/risczero
with:
version: ${{ env.RISC0_VERSION }}
toolchain-version: ${{ env.RISC0_TOOLCHAIN_VERSION }}
- 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
ef-tests:
name: Ethereum execution tests
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: risc0/risc0/.github/actions/rustup@main
- uses: risc0/risc0/.github/actions/sccache@main
- uses: ./.github/actions/risczero
with:
version: ${{ env.RISC0_VERSION }}
toolchain-version: ${{ env.RISC0_TOOLCHAIN_VERSION }}
- run: cargo test --all-targets -p zeth-testeth -F ef-tests
clippy:
name: cargo 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/cuda@main
- uses: risc0/risc0/.github/actions/rustup@main
- uses: risc0/risc0/.github/actions/sccache@main
- uses: risc0/clippy-action@main
with:
reporter: 'github-pr-check'
fail_on_error: true
clippy_flags: -F $FEATURE --workspace --all-targets -- -Dwarnings
fmt:
name: cargo fmt
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- uses: risc0/risc0/.github/actions/rustup@main
- run: cargo fmt --all --check