-
Notifications
You must be signed in to change notification settings - Fork 164
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* ci: optimize build checks Split build checks to parallel builds by: - Sharding the workspace-level feature check; - Launching a job per crate for the crate-level feature check. * ci: test all combinations * Update cairo1-run/Cargo.toml * Update rust version for workflows added by this PR * Download proof_porgrams symlinks * Fix yaml * Fix yaml * Add Checkout step * Update rust toolchain to match other workflows * Remove duplicate feature --------- Co-authored-by: Pedro Fontana <[email protected]> Co-authored-by: fmoletta <[email protected]> Co-authored-by: Federica <[email protected]> Co-authored-by: Juan Bono <[email protected]>
- Loading branch information
1 parent
404407d
commit 918d01c
Showing
9 changed files
with
88 additions
and
22 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 |
---|---|---|
|
@@ -194,6 +194,10 @@ jobs: | |
smoke: | ||
needs: merge-caches | ||
name: Make sure all builds work | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
crate: ["vm", "cairo-vm-cli", "cairo1-run"] | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Install Rust | ||
|
@@ -210,6 +214,7 @@ jobs: | |
uses: taiki-e/install-action@v2 | ||
with: | ||
tool: cargo-all-features | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
|
@@ -226,19 +231,86 @@ jobs: | |
fail-on-cache-miss: true | ||
|
||
# NOTE: we do this separately because --workspace operates in weird ways | ||
- name: Check all features (vm) | ||
- name: Check all features (${{ matrix.crate }}) | ||
run: | | ||
cd vm | ||
cd ${{ matrix.crate }} | ||
cargo check-all-features | ||
cargo check-all-features --workspace --all-targets | ||
smoke-workspace: | ||
needs: merge-caches | ||
name: Make sure all builds work (workspace) | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
chunk: [1, 2, 3, 4, 5, 6] | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Install Rust | ||
uses: dtolnay/[email protected] | ||
with: | ||
targets: wasm32-unknown-unknown | ||
|
||
- name: Set up cargo cache | ||
uses: Swatinem/rust-cache@v2 | ||
with: | ||
cache-on-failure: true | ||
|
||
- name: Install cargo-all-features | ||
uses: taiki-e/install-action@v2 | ||
with: | ||
tool: cargo-all-features | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Download proof programs symlinks | ||
uses: actions/download-artifact@master | ||
with: | ||
name: proof_programs | ||
path: cairo_programs/proof_programs/ | ||
|
||
- name: Fetch programs | ||
uses: actions/cache/restore@v3 | ||
with: | ||
path: ${{ env.CAIRO_PROGRAMS_PATH }} | ||
key: all-programs-cache-${{ hashFiles('cairo_programs/**/*.cairo', 'examples/wasm-demo/src/array_sum.cairo') }} | ||
fail-on-cache-miss: true | ||
|
||
- name: Check all features (CLI) | ||
run: | | ||
cd cairo-vm-cli | ||
cargo check-all-features | ||
- name: Check all features (workspace) | ||
run: | | ||
cargo check-all-features --workspace --all-targets | ||
cargo check-all-features --n-chunks 6 --chunk ${{ matrix.chunk }} --workspace --all-targets | ||
smoke-no-std: | ||
needs: merge-caches | ||
name: Make sure all builds work (no_std) | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Install Rust | ||
uses: dtolnay/[email protected] | ||
with: | ||
targets: wasm32-unknown-unknown | ||
|
||
- name: Set up cargo cache | ||
uses: Swatinem/rust-cache@v2 | ||
with: | ||
cache-on-failure: true | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Download proof programs symlinks | ||
uses: actions/download-artifact@master | ||
with: | ||
name: proof_programs | ||
path: cairo_programs/proof_programs/ | ||
|
||
- name: Fetch programs | ||
uses: actions/cache/restore@v3 | ||
with: | ||
path: ${{ env.CAIRO_PROGRAMS_PATH }} | ||
key: all-programs-cache-${{ hashFiles('cairo_programs/**/*.cairo', 'examples/wasm-demo/src/array_sum.cairo') }} | ||
fail-on-cache-miss: true | ||
|
||
- name: Check no-std | ||
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
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
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
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
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