-
Notifications
You must be signed in to change notification settings - Fork 0
Add Github CI #107
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Add Github CI #107
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
af84ef4
chore: add ci tests
JoE11-y 97b6d1b
chore: fix fmts
JoE11-y bc51df8
chore: update stellar ci
JoE11-y db32886
chore: update ci
JoE11-y e0c6085
chore: expose Prover.toml for ci
JoE11-y cc607ea
chore: update ci to only run for push on branch main and add fixtures…
JoE11-y b9a5dc7
chore: update stellar ci to use generic circuit builder
JoE11-y a399211
chore: fix ci bug
JoE11-y f23dee9
chore: fix forge format
JoE11-y 4c1875b
chore: add tsx to devDepedencies
JoE11-y 8ece615
chore: fix suggestions
JoE11-y File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,64 @@ | ||
| name: EVM Contracts CI | ||
|
|
||
| on: | ||
| push: | ||
| branches: [main] | ||
| paths: | ||
| - "contracts/evm/**" | ||
| - ".github/workflows/evm-contracts.yml" | ||
| pull_request: | ||
| paths: | ||
| - "contracts/evm/**" | ||
| - ".github/workflows/evm-contracts.yml" | ||
| workflow_dispatch: | ||
|
|
||
| env: | ||
| FOUNDRY_PROFILE: ci | ||
|
|
||
| jobs: | ||
| check: | ||
| name: EVM Contracts | ||
| runs-on: ubuntu-latest | ||
| defaults: | ||
| run: | ||
| working-directory: contracts/evm | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| with: | ||
| submodules: recursive | ||
|
|
||
| - name: Install Foundry | ||
| uses: foundry-rs/foundry-toolchain@v1 | ||
|
|
||
| - name: Show Forge version | ||
| run: forge --version | ||
|
|
||
| - name: Install pnpm | ||
| uses: pnpm/action-setup@v4 | ||
|
|
||
| - name: Install Node.js | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: "18" | ||
| cache: "pnpm" | ||
|
|
||
| - name: Install dependencies | ||
| run: pnpm install --frozen-lockfile | ||
| working-directory: . | ||
|
|
||
| - name: Run Forge fmt | ||
| run: forge fmt --check | ||
| id: fmt | ||
|
|
||
| - name: Run Forge build | ||
| run: forge build --sizes | ||
| id: build | ||
|
|
||
| - name: Build deposit circuit | ||
| run: scripts/build_circuits.sh proof_circuits/deposits | ||
| working-directory: . | ||
|
|
||
| - name: Run Forge tests | ||
| run: forge test -vvv | ||
| id: test | ||
This file contains hidden or 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,99 @@ | ||
| name: Stellar Contracts CI | ||
|
|
||
| on: | ||
| push: | ||
| branches: [main] | ||
| paths: | ||
| - "contracts/stellar/**" | ||
| - ".github/workflows/stellar-contracts.yml" | ||
| pull_request: | ||
| paths: | ||
| - "contracts/stellar/**" | ||
| - ".github/workflows/stellar-contracts.yml" | ||
| workflow_dispatch: | ||
|
|
||
| env: | ||
| CARGO_TERM_COLOR: always | ||
|
|
||
| jobs: | ||
| lint: | ||
| name: Format Check | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - uses: dtolnay/rust-toolchain@stable | ||
| with: | ||
| components: rustfmt | ||
|
|
||
| - name: Check formatting | ||
| run: cargo fmt --all -- --check | ||
| working-directory: contracts/stellar | ||
|
|
||
| build-and-test: | ||
| name: Build & Test | ||
| runs-on: ubuntu-latest | ||
| needs: lint | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - uses: dtolnay/rust-toolchain@stable | ||
|
|
||
| - name: Install wasm32v1-none target | ||
| run: rustup target add wasm32v1-none | ||
|
|
||
| - name: Cache cargo directories | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: | | ||
| ~/.cargo/registry | ||
| ~/.cargo/git | ||
| contracts/stellar/target | ||
| key: ${{ runner.os }}-cargo-stellar-${{ hashFiles('contracts/stellar/Cargo.lock') }} | ||
|
|
||
| - name: Install Stellar CLI | ||
| run: | | ||
| curl -Ls https://github.com/stellar/stellar-cli/releases/download/v23.3.0/stellar-cli-23.3.0-x86_64-unknown-linux-gnu.tar.gz -o /tmp/stellar-cli.tar.gz | ||
| mkdir -p "$HOME/.local/bin" | ||
| tar -xzf /tmp/stellar-cli.tar.gz -C "$HOME/.local/bin" stellar | ||
| chmod +x "$HOME/.local/bin/stellar" | ||
| echo "$HOME/.local/bin" >> "$GITHUB_PATH" | ||
|
|
||
| - name: Install pnpm | ||
| uses: pnpm/action-setup@v4 | ||
|
|
||
| - name: Install Node.js | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: "18" | ||
| cache: "pnpm" | ||
|
|
||
| - name: Install Node dependencies | ||
| run: pnpm install --frozen-lockfile | ||
|
|
||
| - name: Build contract WASMs | ||
| run: | | ||
| stellar contract build --package ad-manager | ||
| stellar contract build --package order-portal | ||
| stellar contract build --package merkle-manager | ||
| stellar contract build --package verifier | ||
| working-directory: contracts/stellar | ||
|
|
||
| - name: Build deposit circuit | ||
| run: scripts/build_circuits.sh proof_circuits/deposits | ||
|
|
||
| - name: Build verifier test circuits | ||
| run: scripts/build_circuits.sh contracts/stellar/contracts/verifier/tests --prove | ||
|
|
||
| - name: Run unit tests | ||
| run: cargo test --workspace --exclude proofbridge-stellar | ||
| working-directory: contracts/stellar | ||
|
|
||
| - name: Generate integration test fixtures | ||
| run: npx tsx generate_fixtures.ts | ||
| working-directory: contracts/stellar/tests/fixtures | ||
|
|
||
| - name: Run integration tests | ||
| run: cargo test --test integration_test -- --nocapture | ||
| working-directory: contracts/stellar |
This file contains hidden or 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,3 +1,2 @@ | ||
| node_modules | ||
| target | ||
| Prover.toml | ||
| target |
This file was deleted.
Oops, something went wrong.
This file contains hidden or 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 hidden or 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.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.