[feat] cargo axiom e2e test #1
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |