-
Notifications
You must be signed in to change notification settings - Fork 33
58 lines (51 loc) · 1.96 KB
/
cli-e2e.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
name: CLI e2e test
on:
push:
branches: ["main"]
pull_request:
branches: ["**"]
paths:
- "crates/stark-backend/**"
- "crates/circuits/primitives/**"
- "crates/vm/**"
- "crates/cargo-axiom/**"
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true
env:
CARGO_TERM_COLOR: always
AXIOM_FAST_TEST: "1"
jobs:
tests:
runs-on:
- runs-on=${{ github.run_id }}
- runner=32cpu-linux-arm64
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
- uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true
- uses: taiki-e/install-action@nextest
- name: Install cargo-axiom
working-directory: crates/cargo-axiom
run: |
rustup component add rust-src --toolchain nightly-2024-10-30-aarch64-unknown-linux-gnu
cargo install --force --locked --path .
- name: E2E CLI test
working-directory: crates/cargo-axiom
run: |
if [[ "${{ github.event_name }}" == "push" ]]; then
RUN_E2E=true
fi
if [[ "${{ github.event_name }}" == "pull_request" ]]; then
LABELS='${{ toJson(github.event.pull_request.labels) }}'
RUN_E2E=$(echo "$LABELS" | jq 'any(.name == "run-cli-e2e")')
fi
if [ ! -z $RUN_E2E ]; then
cargo axiom build --manifest-dir ../axvm-sdk/example --transpile --transpiler-config example/app_config.toml --transpile-to /tmp/example.axvmexe
cargo axiom keygen --config example/app_config.toml --output /tmp/example.pk --vk-output /tmp/example.vk
cargo axiom run --exe /tmp/example.axvmexe --config example/app_config.toml
cargo axiom prove app --app-pk /tmp/example.pk --exe /tmp/example.axvmexe --output /tmp/example.apppf
cargo axiom verify app --app-vk /tmp/example.vk --proof /tmp/example.apppf
fi