-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* chore: clean up - [x] Add checks for ci actions - [x] Run prettier, clippy, fmt commands for all the files - [x] Move circom circuits to a circom folder - [x] Get rid of js var statements * chore: add resolver version for cargo.toml * chore: add circom tests * chore: optimize check triggers * chore: remove `check` command * chore: use only `pnpm` * chore: update readme --------- Co-authored-by: 0xmad <[email protected]>
- Loading branch information
Showing
70 changed files
with
7,047 additions
and
6,505 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
name: Circom checks | ||
on: | ||
workflow_dispatch: | ||
|
||
push: | ||
branches: [main] | ||
|
||
pull_request: | ||
branches: [main] | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
checks: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
node-version: [18] | ||
command: ["prettier", "types", "test:coverage"] | ||
|
||
runs-on: ubuntu-latest | ||
|
||
timeout-minutes: 240 | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Clone circom repository | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: iden3/circom | ||
path: ./circom | ||
|
||
- uses: pnpm/action-setup@v2 | ||
with: | ||
version: latest | ||
|
||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
|
||
- uses: dtolnay/rust-toolchain@nightly | ||
with: | ||
components: "clippy, rustfmt" | ||
|
||
- name: Cache circom | ||
uses: actions/cache@v3 | ||
id: circom-cache | ||
continue-on-error: true | ||
with: | ||
path: | | ||
~/.cargo/bin/circom | ||
key: ${{ runner.os }}-circom-${{ hashFiles('./circom/Cargo.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-circom- | ||
- name: Install circom | ||
if: steps.circom-cache.outputs.cache-hit != 'true' | ||
run: | | ||
cargo build --release | ||
cargo install --path circom | ||
working-directory: ./circom | ||
|
||
|
||
- name: Build javascript | ||
run: | | ||
pnpm install --no-frozen-lockfile --prefer-offline | ||
pnpm run build | ||
working-directory: "./javascript" | ||
|
||
- name: Check circom | ||
run: | | ||
pnpm install --no-frozen-lockfile --prefer-offline | ||
pnpm run ${{ matrix.command }} | ||
working-directory: "./circuits/circom" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: Javascript checks | ||
on: | ||
workflow_dispatch: | ||
|
||
push: | ||
branches: [main] | ||
|
||
pull_request: | ||
branches: [main] | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
checks: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
node-version: [18] | ||
command: ["prettier", "types", "test:coverage"] | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: pnpm/action-setup@v2 | ||
with: | ||
version: latest | ||
|
||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
|
||
- name: Check javascript | ||
run: | | ||
pnpm install --no-frozen-lockfile --prefer-offline | ||
pnpm run build | ||
pnpm run ${{ matrix.command }} | ||
working-directory: "./javascript" |
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,36 @@ | ||
name: Rust test suite | ||
on: [push, pull_request] | ||
name: Rust checks | ||
on: | ||
workflow_dispatch: | ||
|
||
push: | ||
branches: [main] | ||
|
||
pull_request: | ||
branches: [main] | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
test: | ||
name: cargo test | ||
checks: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
directory: ["./rust-arkworks", "./rust-k256"] | ||
command: ["clippy", "test"] | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: dtolnay/rust-toolchain@nightly | ||
- run: cargo test --all-features | ||
working-directory: ./rust-k256 | ||
- run: cargo test --all-features | ||
working-directory: ./rust-arkworks | ||
with: | ||
components: "clippy, rustfmt" | ||
|
||
- name: ${{ matrix.command }} | ||
run: | | ||
cargo build | ||
cargo ${{ matrix.command }} --all-features | ||
working-directory: ${{ matrix.directory }} |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
dist/ | ||
node_modules/ | ||
coverage/ | ||
target | ||
**/target/ | ||
**/dist/ | ||
**/node_modules/ | ||
**/coverage/ | ||
pnpm-lock.yaml |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"arrowParens": "always", | ||
"bracketSpacing": true, | ||
"endOfLine": "auto", | ||
"singleQuote": false, | ||
"semi": true, | ||
"tabWidth": 2, | ||
"useTabs": false, | ||
"trailingComma": "all" | ||
} |
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
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
File renamed without changes.
File renamed without changes.
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
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
Oops, something went wrong.