Repository navigation
100 lines (84 loc) · 3.46 KB
/
Copy pathprover.yml
File metadata and controls
100 lines (84 loc) · 3.46 KB
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: Run prover guest code checks
on: pull_request
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }}
cancel-in-progress: true
permissions: {}
jobs:
extract-rust-version:
name: Extract Rust toolchain version
runs-on: ubuntu-latest
outputs:
rust-version: ${{ steps.extract.outputs.rust-version }}
steps:
- name: Checkout repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Extract Rust toolchain version
id: extract
uses: $/.github/actions/extract-rust-version # zizmor: ignore[unpinned-uses]
eval_perf:
permissions:
# Needed to install the toolchain.
contents: write
# Needed to post the performance report comments.
pull-requests: write
runs-on: ubuntu-latest
needs: extract-rust-version
steps:
- name: Checkout repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Set up Rust
env:
RUST_NIGHTLY: ${{ needs.extract-rust-version.outputs.rust-version }}
run: |
rustup toolchain install "$RUST_NIGHTLY" --profile minimal
rustup default "$RUST_NIGHTLY"
- name: Install protoc
uses: arduino/setup-protoc@c65c819552d16ad3c9b72d9dfd5ba5237b9c906b # v3.0.0
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Use Cargo cache
uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2
with:
cache-on-failure: true
- name: Install SP1 core runner override
uses: $/.github/actions/sp1-core-runner-override # zizmor: ignore[unpinned-uses]
# Installs mold (modern ld), a drop-in replacement for lld.
# Under the hood, the following action symlinks mold binary onto lld,
# so everything is linked faster (hopefully).
- name: Install mold linker
uses: rui314/setup-mold@10ca16bf91dc22e05ebdc935cad9c75ea248f621 # v1
- name: Set up Clang
uses: egor-tensin/setup-clang@23bc15cd4207e45f1566447deb48f4ff3ef932cb # v2.3
with:
version: latest
platform: x64
- name: Install SP1 Toolchain
env:
# Pin to a release that matches the workspace's
# sp1-{helper,sdk,verifier} dependencies. Bump in lockstep when
# upgrading.
SP1_VERSION: "v6.8.1"
run: |
# `-c` installs the RISC-V C++ toolchain so secp256k1-sys (and
# other C-bound crates) cross-compile for the guest target.
curl -fsSL --proto '=https' --tlsv1.2 https://sp1.succinct.xyz | bash && ~/.sp1/bin/sp1up -v "$SP1_VERSION" -c
export PATH=~/.sp1/bin:$PATH
cargo prove --version
- name: Checkout code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Run performance evaluation
run: |
RUST_LOG=info SP1_PROVER=light BUILD_ELF=1 cargo run --profile prover-ci -- \
--github-token "${{ secrets.GITHUB_TOKEN }}" \
--programs checkpoint
working-directory: bin/prover-perf
env:
CHECKPOINT_RUNTIME_PARAMS_PATH: ${{ github.workspace }}/.github/fixtures/checkpoint-runtime-params.json
RUSTFLAGS: "-C target-cpu=native -C link-arg=-fuse-ld=lld"