Skip to content

Commit 87f8bb4

Browse files
Cache devnet on Windows (#1438)
* Cache devnet on windows * Trigger `Build wheels` workflow on new tag push * Fix syntax of `Install devnet` job * Add `id` and change `path` in `Cache devnet build` * Use dynamic python versions matrix depending on the event name * Restore python `3.12` for `Setup Tests` * Update setting python versions matrix as env variable * Update setting python versions matrix as env variable * Fix versions matrix echo * Add missing `needs` in jobs * Fix matrix versions echo * Fix matrix versions echo * Remove dynamic python versions matrix determination * Remove changes in `package.yml` * Remove check for event name in windows tests * Add `DEVNET_SHA` env in windows tests * Restore skipping windows tests on PR * Use `actions/cache@v4` for devnet on windows * Add windows devnet cache to `run-docs-tests-windows` * Temporarily enable `run-docs-tests-windows` * Revert "Temporarily enable `run-docs-tests-windows`" This reverts commit 86d9d90. * Change `DEVNET_SHA` env to be global
1 parent 08d1cea commit 87f8bb4

File tree

1 file changed

+23
-5
lines changed

1 file changed

+23
-5
lines changed

.github/workflows/checks.yml

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ name: Checks
33
env:
44
CAIRO_LANG_VERSION: "0.13.1"
55
DEVNET_VERSION: "0.1.2"
6+
DEVNET_SHA: 7e7dbb5
67

78
on:
89
push:
@@ -358,11 +359,19 @@ jobs:
358359

359360
# ====================== SETUP DEVNET ====================== #
360361

362+
- name: Cache devnet build
363+
id: windows-devnet-cache
364+
uses: actions/cache@v4
365+
with:
366+
path: ${{ github.workspace }}\starknet_py\tests\e2e\devnet\bin
367+
key: ${{ runner.os }}-devnet-${{ env.DEVNET_SHA }}
368+
361369
- name: Install devnet
370+
if: steps.windows-devnet-cache.outputs.cache-hit != 'true'
362371
run: |
363-
$DEVNET_INSTALL_DIR = "$(git rev-parse --show-toplevel)/starknet_py/tests/e2e/devnet"
364-
cargo install --git https://github.com/0xSpaceShard/starknet-devnet-rs.git --locked --rev 7e7dbb5 --root $DEVNET_INSTALL_DIR
365-
372+
$DEVNET_INSTALL_DIR = "${{ github.workspace }}\starknet_py\tests\e2e\devnet"
373+
cargo install --git https://github.com/0xSpaceShard/starknet-devnet-rs.git --locked --rev ${{ env.DEVNET_SHA }} --root $DEVNET_INSTALL_DIR
374+
shell: pwsh
366375
# ====================== SETUP PYTHON ====================== #
367376

368377
- name: Install poetry
@@ -512,10 +521,19 @@ jobs:
512521
513522
# ====================== SETUP DEVNET ====================== #
514523

524+
- name: Cache devnet build
525+
id: windows-devnet-cache
526+
uses: actions/cache@v4
527+
with:
528+
path: ${{ github.workspace }}\starknet_py\tests\e2e\devnet\bin
529+
key: ${{ runner.os }}-devnet-${{ env.DEVNET_SHA }}
530+
515531
- name: Install devnet
532+
if: steps.windows-devnet-cache.outputs.cache-hit != 'true'
516533
run: |
517-
$DEVNET_INSTALL_DIR = "$(git rev-parse --show-toplevel)/starknet_py/tests/e2e/devnet"
518-
cargo install --git https://github.com/0xSpaceShard/starknet-devnet-rs.git --locked --rev 7e7dbb5 --root $DEVNET_INSTALL_DIR
534+
$DEVNET_INSTALL_DIR = "${{ github.workspace }}\starknet_py\tests\e2e\devnet"
535+
cargo install --git https://github.com/0xSpaceShard/starknet-devnet-rs.git --locked --rev ${{ env.DEVNET_SHA }} --root $DEVNET_INSTALL_DIR
536+
shell: pwsh
519537

520538
# ====================== RUN TESTS ====================== #
521539

0 commit comments

Comments
 (0)