Skip to content

Commit

Permalink
chore: folder reorg (#909)
Browse files Browse the repository at this point in the history
* chore: move lib/algebra to extensions/algebra/guest

* chore: fix imports

* chore: move ecc guest crates

* fix: update CI directories

* chore: add axvm-pairing-guest crate

* chore: create axvm-native-compiler and axvm-native-recursion crates

* fix: imports

* fix: imports

* chore: update CI

* chore: update CI

* chore: update CI

* chore: move sw and moduli macros

* fix: CI

* fix: setup imports

* chore: change crate folder structure

* fix: CI paths

* fix: CI dir

* fix: workflow directory

* chore: change lib/recursion to recursion

* fix: CI path

* chore: ignore pairing tests expected to fail
  • Loading branch information
yi-sun authored Dec 2, 2024
1 parent 8369471 commit 76add8b
Show file tree
Hide file tree
Showing 579 changed files with 663 additions and 587 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/axvm-sdk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ on:
pull_request:
branches: ["**"]
paths:
- "stark-backend/**"
- "circuits/primitives/**"
- "vm/**"
- "axvm-sdk/**"
- "crates/stark-backend/**"
- "crates/circuits/primitives/**"
- "crates/vm/**"
- "crates/axvm-sdk/**"

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
Expand Down Expand Up @@ -48,7 +48,7 @@ jobs:
exit 1
;;
esac
echo "Checking s5cmd"
if type s5cmd &>/dev/null; then
echo "s5cmd was installed."
Expand All @@ -62,12 +62,12 @@ jobs:
fi
- name: Setup halo2
working-directory: axvm-sdk
working-directory: crates/axvm-sdk
run: |
bash ../lib/recursion/trusted_setup_s3.sh
bash ../../extensions/native/recursion/trusted_setup_s3.sh
- name: Run axvm-sdk crate tests
working-directory: axvm-sdk
working-directory: crates/axvm-sdk
run: |
export RUST_BACKTRACE=1
cargo nextest run --cargo-profile=fast --features parallel,static-verifier
6 changes: 3 additions & 3 deletions .github/workflows/benchmark-call.yml
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ jobs:
echo "FEATURE_FLAGS=${FEATURE_FLAGS},aggregation" >> $GITHUB_ENV
- name: Setup e2e (halo2 and arguments)
working-directory: lib/recursion # We only ever run halo2 for recursion
working-directory: extensions/native/recursion # We only ever run halo2 for recursion
run: |
E2E_BENCH=$(jq -r --arg name "${{ inputs.benchmark_name }}" \
--arg instance_type "${{ inputs.instance_type }}" \
Expand All @@ -172,7 +172,7 @@ jobs:
select(.run_params[] | (.root_log_blowup // 0) == $root_log_blowup) |
select(.run_params[] | (.internal_log_blowup // 0) == $internal_log_blowup) |
.e2e_bench
' ../../ci/benchmark-config.json)
' ../../../ci/benchmark-config.json)
echo "E2E_BENCH=${E2E_BENCH}" >> $GITHUB_ENV
if [[ "${E2E_BENCH}" == "true" ]]; then
Expand Down Expand Up @@ -209,7 +209,7 @@ jobs:
echo "working_dir=$WORKSPACE_DIR" >> $GITHUB_OUTPUT
echo "relative_path=$RELATIVE_PATH" >> $GITHUB_OUTPUT
if [[ "${E2E_BENCH}" == "true" ]]; then
bash ./lib/recursion/trusted_setup_s3.sh
bash ./extensions/native/recursion/trusted_setup_s3.sh
fi
##########################################################################
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ on:
types: [opened, synchronize, reopened, labeled]
branches: ["**"]
paths:
- "stark-backend/**"
- "stark-sdk/**"
- "circuits/**"
- "vm/**"
- "toolchain/**"
- "lib/recursion/**"
- "crates/stark-backend/**"
- "crates/stark-sdk/**"
- "crates/circuits/**"
- "crates/vm/**"
- "crates/toolchain/**"
- "crates/extensions/**"
- "benchmarks/**"
- ".github/workflows/benchmark-call.yml"
- ".github/workflows/benchmarks.yml"
Expand Down
29 changes: 11 additions & 18 deletions .github/workflows/ecc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,13 @@ on:
pull_request:
branches: ["**"]
paths:
- "stark-backend/**"
- "circuits/primitives/**"
- "vm/**"
- "toolchain/native-compiler/**"
- "lib/ecc/**"
- "lib/ecc-execution/**"
- "cargo-axiom/**"
- "extensions/ecc/circuit/**"
- "extensions/pairing/circuit/**"
- "crates/stark-backend/**"
- "crates/circuits/primitives/**"
- "crates/vm/**"
- "crates/cargo-axiom/**"
- "extensions/ecc/**"
- "extensions/native/compiler/**"
- "extensions/pairing/**"

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
Expand All @@ -39,7 +37,7 @@ jobs:
- uses: taiki-e/install-action@nextest

- name: Run ecc-execution crate tests
working-directory: lib/ecc-execution
working-directory: extensions/ecc/execution
run: |
cargo nextest run --cargo-profile=fast
Expand All @@ -53,18 +51,13 @@ jobs:
run: |
RUST_MIN_STACK=8388608 cargo nextest run --cargo-profile=fast
- name: Run axvm-ecc crate tests
working-directory: lib/ecc
run: |
RUST_MIN_STACK=8388608 cargo nextest run --features halo2curves
- name: Install cargo-axiom
working-directory: cargo-axiom
working-directory: crates/cargo-axiom
run: |
rustup component add rust-src --toolchain nightly-aarch64-unknown-linux-gnu
cargo install --force --locked --path .
- name: Build axvm-ecc crate for axvm
working-directory: lib/ecc
- name: Build axvm-ecc-guest crate for axvm
working-directory: extensions/ecc/guest
run: |
cargo axiom build
10 changes: 5 additions & 5 deletions .github/workflows/primitives.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ on:
pull_request:
branches: ["**"]
paths:
- "stark-backend/**"
- "circuits/primitives/**"
- "circuits/hashes/poseidon2-air/**"
- "crates/stark-backend/**"
- "crates/circuits/primitives/**"
- "crates/circuits/poseidon2-air/**"

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
Expand All @@ -33,11 +33,11 @@ jobs:
- uses: taiki-e/install-action@nextest

- name: Run tests for primitives
working-directory: circuits/primitives
working-directory: crates/circuits/primitives
run: |
cargo nextest run --cargo-profile fast --features parallel
- name: Run tests for poseidon2-air
working-directory: circuits/hashes/poseidon2-air
working-directory: crates/circuits/poseidon2-air
run: |
cargo nextest run --cargo-profile fast --features parallel
12 changes: 6 additions & 6 deletions .github/workflows/recursion.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ on:
pull_request:
branches: ["**"]
paths:
- "stark-backend/**"
- "circuits/primitives/**"
- "vm/**"
- "toolchain/native-compiler/**"
- "lib/recursion/**"
- "crates/stark-backend/**"
- "crates/circuits/primitives/**"
- "crates/vm/**"
- "extensions/native/compiler/**"
- "extensions/native/recursion/**"

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
Expand All @@ -37,6 +37,6 @@ jobs:
run: (hash svm 2>/dev/null || cargo install --version 0.2.23 svm-rs) && svm install 0.8.19 && solc --version

- name: Run recursion crate tests
working-directory: lib/recursion
working-directory: extensions/native/recursion
run: |
cargo nextest run --features parallel,static-verifier
12 changes: 8 additions & 4 deletions .github/workflows/riscv.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,12 @@ on:
pull_request:
branches: ["**"]
paths:
- "vm/**"
- "toolchain/riscv/**"
- "crates/vm/**"
- "crates/toolchain/platform/**"
- "crates/toolchain/instructions/**"
- "crates/toolchain/build/**"
- "crates/toolchain/macros/**"
- "crates/toolchain/tests/**"

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
Expand Down Expand Up @@ -37,13 +41,13 @@ jobs:
submodules: recursive

- name: Run Makefile
working-directory: toolchain/tests/rv32im-test-vectors
working-directory: crates/toolchain/tests/rv32im-test-vectors
run: |
export PATH=/opt/riscv/bin:$PATH
make
- name: Run RISC-V test vector tests
working-directory: toolchain/tests
working-directory: crates/toolchain/tests
run: |
rustup component add rust-src --toolchain nightly-aarch64-unknown-linux-gnu
cargo nextest run --cargo-profile=fast --run-ignored only -- test_rv32im_riscv_vector_runtime
4 changes: 2 additions & 2 deletions .github/workflows/stark-backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
pull_request:
branches: ["**"]
paths:
- "stark-backend/**"
- "crates/stark-backend/**"

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
Expand All @@ -30,6 +30,6 @@ jobs:
- uses: taiki-e/install-action@nextest

- name: Run tests
working-directory: stark-backend
working-directory: crates/stark-backend
run: |
cargo nextest run --features parallel
6 changes: 3 additions & 3 deletions .github/workflows/toolchain-edsl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ on:
pull_request:
branches: ["**"]
paths:
- "vm/**"
- "toolchain/native-compiler/**"
- "crates/vm/**"
- "extensions/native/compiler/**"

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
Expand All @@ -32,6 +32,6 @@ jobs:
- uses: taiki-e/install-action@nextest

- name: Run compiler tests
working-directory: toolchain/native-compiler
working-directory: extensions/native/compiler
run: |
cargo nextest run --cargo-profile=fast --features parallel
13 changes: 5 additions & 8 deletions .github/workflows/toolchain.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,8 @@ on:
pull_request:
branches: ["**"]
paths:
- "vm/**"
- "toolchain/riscv/**"
- "toolchain/instructions/**"
- "toolchain/tests/**"
- "toolchain/transpiler/**"
- "crates/vm/**"
- "crates/toolchain/**"

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
Expand All @@ -35,18 +32,18 @@ jobs:
- uses: taiki-e/install-action@nextest

- name: Run axvm-instructions tests
working-directory: toolchain/instructions
working-directory: crates/toolchain/instructions
run: |
cargo nextest run
- name: Run transpiler tests
working-directory: toolchain/transpiler
working-directory: crates/toolchain/transpiler
run: |
rustup component add rust-src --toolchain nightly-aarch64-unknown-linux-gnu
cargo nextest run --cargo-profile=fast
- name: Run toolchain tests
working-directory: toolchain/tests
working-directory: crates/toolchain/tests
run: |
rustup component add rust-src --toolchain nightly-aarch64-unknown-linux-gnu
cargo nextest run --cargo-profile=fast
8 changes: 4 additions & 4 deletions .github/workflows/vm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ on:
pull_request:
branches: ["**"]
paths:
- "stark-backend/**"
- "circuits/primitives/**"
- "vm/**"
- "crates/stark-backend/**"
- "crates/circuits/**"
- "crates/vm/**"

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
Expand All @@ -33,6 +33,6 @@ jobs:
- uses: taiki-e/install-action@nextest

- name: Run vm crate tests
working-directory: vm
working-directory: crates/vm
run: |
cargo nextest run --cargo-profile=fast --features parallel
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[submodule "toolchain/tests/rv32im-test-vectors/riscv-tests"]
path = toolchain/tests/rv32im-test-vectors/riscv-tests
path = crates/toolchain/tests/rv32im-test-vectors/riscv-tests
url = https://github.com/riscv-software-src/riscv-tests.git
Loading

0 comments on commit 76add8b

Please sign in to comment.