Skip to content

Commit

Permalink
Cache devnet on Windows (#1438)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
franciszekjob authored Aug 14, 2024
1 parent 08d1cea commit 87f8bb4
Showing 1 changed file with 23 additions and 5 deletions.
28 changes: 23 additions & 5 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name: Checks
env:
CAIRO_LANG_VERSION: "0.13.1"
DEVNET_VERSION: "0.1.2"
DEVNET_SHA: 7e7dbb5

on:
push:
Expand Down Expand Up @@ -358,11 +359,19 @@ jobs:

# ====================== SETUP DEVNET ====================== #

- name: Cache devnet build
id: windows-devnet-cache
uses: actions/cache@v4
with:
path: ${{ github.workspace }}\starknet_py\tests\e2e\devnet\bin
key: ${{ runner.os }}-devnet-${{ env.DEVNET_SHA }}

- name: Install devnet
if: steps.windows-devnet-cache.outputs.cache-hit != 'true'
run: |
$DEVNET_INSTALL_DIR = "$(git rev-parse --show-toplevel)/starknet_py/tests/e2e/devnet"
cargo install --git https://github.com/0xSpaceShard/starknet-devnet-rs.git --locked --rev 7e7dbb5 --root $DEVNET_INSTALL_DIR
$DEVNET_INSTALL_DIR = "${{ github.workspace }}\starknet_py\tests\e2e\devnet"
cargo install --git https://github.com/0xSpaceShard/starknet-devnet-rs.git --locked --rev ${{ env.DEVNET_SHA }} --root $DEVNET_INSTALL_DIR
shell: pwsh
# ====================== SETUP PYTHON ====================== #

- name: Install poetry
Expand Down Expand Up @@ -512,10 +521,19 @@ jobs:
# ====================== SETUP DEVNET ====================== #

- name: Cache devnet build
id: windows-devnet-cache
uses: actions/cache@v4
with:
path: ${{ github.workspace }}\starknet_py\tests\e2e\devnet\bin
key: ${{ runner.os }}-devnet-${{ env.DEVNET_SHA }}

- name: Install devnet
if: steps.windows-devnet-cache.outputs.cache-hit != 'true'
run: |
$DEVNET_INSTALL_DIR = "$(git rev-parse --show-toplevel)/starknet_py/tests/e2e/devnet"
cargo install --git https://github.com/0xSpaceShard/starknet-devnet-rs.git --locked --rev 7e7dbb5 --root $DEVNET_INSTALL_DIR
$DEVNET_INSTALL_DIR = "${{ github.workspace }}\starknet_py\tests\e2e\devnet"
cargo install --git https://github.com/0xSpaceShard/starknet-devnet-rs.git --locked --rev ${{ env.DEVNET_SHA }} --root $DEVNET_INSTALL_DIR
shell: pwsh

# ====================== RUN TESTS ====================== #

Expand Down

0 comments on commit 87f8bb4

Please sign in to comment.