-
Notifications
You must be signed in to change notification settings - Fork 25
chore: improve ci workflows #1113
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
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
e36be3e
ci: remove rust installation from contract tests
cedoor 19afaa0
ci: remove solc installation from build_enclave_cli
cedoor d8a4a6a
revert: add solc installation back to build_enclave_cli
cedoor 8bd81da
ci: use NOIR_TOOLCHAIN environment variable
cedoor 0954873
ci: remove unnecessary builds in crisp workflows
cedoor 8c1f7d7
revert: add solc installation back to crisp workflow
cedoor 1c8a7c6
ci: remove foundry installation from crisp workflow
cedoor d98bc34
ci: add crisp sdk artifacts to ci workflow
cedoor 225c994
ci: update crisp sdk build command
cedoor cfeed9c
ci: add nargo installation to crisp sdk build workflow
cedoor 5633f25
revert: add foundry to crisp_unit workflow
cedoor 2bf2cab
ci: update crisp sdk artifacts path in ci workflow
cedoor 29ca7ce
ci: update crisp sdk artifacts path
cedoor 189372c
ci: update crisp-e2e workflow naming
cedoor 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 |
|---|---|---|
|
|
@@ -21,6 +21,7 @@ env: | |
| CIPHERNODE_IMAGE_NAME: ghcr.io/${{ github.repository_owner }}/ciphernode | ||
| NODE_VERSION: 22 | ||
| RUST_TOOLCHAIN: 1.86.0 | ||
| NOIR_TOOLCHAIN: v1.0.0-beta.15 | ||
| HARDHAT_VAR_MNEMONIC: 'test test test test test test test test test test test junk' | ||
| HARDHAT_VAR_INFURA_API_KEY: 'zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz' | ||
| PRIVATE_KEY: '0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80' | ||
|
|
@@ -200,15 +201,6 @@ jobs: | |
| - name: 'Check out the repo' | ||
| uses: 'actions/checkout@v4' | ||
|
|
||
| - name: Cache Rust dependencies | ||
| uses: ./.github/actions/cache-dependencies | ||
|
|
||
| - name: Install Rust | ||
| uses: dtolnay/rust-toolchain@stable | ||
| with: | ||
| toolchain: ${{ env.RUST_TOOLCHAIN }} | ||
| target: wasm32-unknown-unknown | ||
|
|
||
| - name: pnpm-setup | ||
| uses: pnpm/action-setup@v4 | ||
|
|
||
|
|
@@ -285,7 +277,7 @@ jobs: | |
| - name: Install Nargo | ||
| uses: noir-lang/[email protected] | ||
| with: | ||
| toolchain: v1.0.0-beta.15 | ||
| toolchain: ${{ env.NOIR_TOOLCHAIN }} | ||
|
|
||
| - name: Install solc | ||
| run: | | ||
|
|
@@ -413,9 +405,9 @@ jobs: | |
| path: ~/.cargo/bin/enclave | ||
| retention-days: 1 | ||
|
|
||
| # CRISP Unit Tests (Rust, JavaScript, Noir, Solidity) | ||
| crisp_unit: | ||
| runs-on: ubuntu-latest | ||
| needs: [build_crisp_sdk] | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| with: | ||
|
|
@@ -438,7 +430,7 @@ jobs: | |
| - name: Install Nargo | ||
| uses: noir-lang/[email protected] | ||
| with: | ||
| toolchain: v1.0.0-beta.15 | ||
| toolchain: ${{ env.NOIR_TOOLCHAIN }} | ||
|
|
||
| - name: Setup pnpm | ||
| uses: pnpm/action-setup@v4 | ||
|
|
@@ -452,8 +444,11 @@ jobs: | |
|
|
||
| - name: Install dependencies | ||
| working-directory: . | ||
| run: | | ||
| pnpm --version && pnpm install --frozen-lockfile && pnpm build:ts | ||
| run: pnpm install --frozen-lockfile | ||
|
|
||
| - name: Compile Enclave contracts | ||
| working-directory: . | ||
| run: pnpm evm:build | ||
|
|
||
| - name: Install solc | ||
| run: | | ||
|
|
@@ -465,6 +460,12 @@ jobs: | |
| working-directory: ./examples/CRISP | ||
| run: 'cargo test' | ||
|
|
||
| - name: Download Crisp SDK artifacts | ||
| uses: actions/download-artifact@v4 | ||
| with: | ||
| name: crisp-sdk-artifacts | ||
| path: ./examples/CRISP | ||
|
|
||
| - name: Run Noir tests | ||
| working-directory: ./examples/CRISP | ||
| run: 'pnpm test:circuits' | ||
|
|
@@ -475,12 +476,11 @@ jobs: | |
|
|
||
| - name: Run Solidity tests | ||
| working-directory: ./examples/CRISP | ||
| run: 'pnpm build:sdk && pnpm test:contracts' | ||
| run: 'pnpm test:contracts' | ||
|
|
||
| crisp_e2e: | ||
| runs-on: ubuntu-latest | ||
| needs: [build_enclave_cli] | ||
|
|
||
| needs: [build_enclave_cli, build_crisp_sdk] | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| with: | ||
|
|
@@ -509,29 +509,46 @@ jobs: | |
| cache: 'pnpm' | ||
| cache-dependency-path: pnpm-lock.yaml | ||
|
|
||
| # We must install foundry in order to be able to test anvil | ||
| - name: Install Foundry | ||
| uses: foundry-rs/foundry-toolchain@v1 | ||
|
|
||
| - name: Install solc | ||
| run: | | ||
| sudo add-apt-repository ppa:ethereum/ethereum \ | ||
| && sudo apt-get update -y \ | ||
| && sudo apt-get install -y solc | ||
|
|
||
| - name: Install Nargo | ||
| uses: noir-lang/[email protected] | ||
| with: | ||
| toolchain: v1.0.0-beta.15 | ||
|
|
||
| - name: Install yq | ||
| run: | | ||
| sudo wget -qO- https://github.com/mikefarah/yq/releases/download/v4.45.1/yq_linux_amd64.tar.gz | sudo tar xz -C /usr/local/bin --transform='s|yq_linux_amd64|yq|' --no-same-owner | ||
|
|
||
| - name: Install dependencies | ||
| working-directory: . | ||
| run: pnpm install --frozen-lockfile | ||
|
|
||
| - name: Compile Enclave contracts | ||
| working-directory: . | ||
| run: pnpm evm:build | ||
|
|
||
| - name: Compile Crisp contracts | ||
| working-directory: ./examples/CRISP | ||
| run: pnpm compile:contracts | ||
|
|
||
| - name: Copy environment variables | ||
| working-directory: ./examples/CRISP | ||
| run: | | ||
| cp server/.env.example server/.env | ||
| cp client/.env.example client/.env | ||
| cp .env.example .env | ||
|
|
||
| - name: Build Crisp server and CLI binaries | ||
| working-directory: ./examples/CRISP/server | ||
| run: | | ||
| pnpm --version && pnpm install --frozen-lockfile && pnpm build:ts | ||
| cargo build --locked --bin cli | ||
| cargo build --locked --bin server | ||
|
|
||
| - name: Download Crisp SDK artifacts | ||
| uses: actions/download-artifact@v4 | ||
| with: | ||
| name: crisp-sdk-artifacts | ||
| path: ./examples/CRISP | ||
|
|
||
| - name: Install Playwright browsers | ||
| working-directory: ./examples/CRISP | ||
|
|
@@ -572,7 +589,7 @@ jobs: | |
| - name: Install Nargo | ||
| uses: noir-lang/[email protected] | ||
| with: | ||
| toolchain: v1.0.0-beta.15 | ||
| toolchain: ${{ env.NOIR_TOOLCHAIN }} | ||
|
|
||
| - name: Check formatting | ||
| working-directory: ./circuits | ||
|
|
@@ -674,6 +691,50 @@ jobs: | |
| retention-days: 1 | ||
| if-no-files-found: warn | ||
|
|
||
| build_crisp_sdk: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - name: Install pnpm | ||
| uses: pnpm/action-setup@v4 | ||
|
|
||
| - name: Setup Node.js | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: ${{ env.NODE_VERSION }} | ||
| cache: 'pnpm' | ||
| cache-dependency-path: pnpm-lock.yaml | ||
|
|
||
| - name: Install Nargo | ||
| uses: noir-lang/[email protected] | ||
| with: | ||
| toolchain: ${{ env.NOIR_TOOLCHAIN }} | ||
|
|
||
| - name: Setup Rust | ||
| uses: dtolnay/rust-toolchain@stable | ||
| with: | ||
| toolchain: ${{ env.RUST_TOOLCHAIN }} | ||
| targets: wasm32-unknown-unknown | ||
|
|
||
| - name: Install node dependencies | ||
| run: pnpm install --frozen-lockfile | ||
|
|
||
| - name: Build the sdk | ||
| working-directory: ./examples/CRISP | ||
| run: pnpm build:sdk | ||
|
|
||
| - name: Upload SDK artifacts | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: crisp-sdk-artifacts | ||
| path: | | ||
| examples/CRISP/packages/crisp-sdk/dist | ||
| examples/CRISP/packages/crisp-zk-inputs/dist | ||
| examples/CRISP/circuits/target | ||
| retention-days: 1 | ||
| if-no-files-found: warn | ||
|
|
||
| template_integration: | ||
| runs-on: ubuntu-latest | ||
| needs: [build_enclave_cli, build_e3_support_dev, build_sdk] | ||
|
|
||
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.
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.