Skip to content

Commit e4b947c

Browse files
committed
Refactor devnet installation action; Add temporary workflow which will create devnet cache
1 parent 819321e commit e4b947c

File tree

3 files changed

+31
-7
lines changed

3 files changed

+31
-7
lines changed

.github/composite-actions/devnet/action.yml

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
11
name: "Devnet Setup"
2+
3+
inputs:
4+
devnet_sha:
5+
description: "Commit SHA for the starknet-devnet-rs repository"
6+
required: true
7+
8+
29
runs:
310
using: "composite"
411
steps:
@@ -7,20 +14,22 @@ runs:
714
with:
815
submodules: recursive
916

17+
- name: Cache devnet build
18+
id: cache-devnet
19+
uses: actions/cache@v4
20+
with:
21+
path: starknet-devnet-rs/target/release
22+
key: ${{ runner.os }}-starknet-devnet-rs-target-release-${{ inputs.devnet_sha }}
23+
1024
- name: Clone starknet-devnet-rs
25+
if: steps.cache-devnet.outputs.cache-hit != 'true'
1126
shell: bash
1227
run: |
1328
DEVNET_SHA="dd559716849ade47cc06be150edf250e5dccb2bf"
1429
git clone https://github.com/0xSpaceShard/starknet-devnet-rs.git starknet-devnet-rs
1530
cd starknet-devnet-rs
1631
git checkout "$DEVNET_SHA"
1732
18-
- name: Cache devnet build
19-
uses: actions/cache@v4
20-
with:
21-
path: starknet-devnet-rs/target/release
22-
key: ${{ runner.os }}-starknet-devnet-rs-target-release-dd559716849ade47cc06be150edf250e5dccb2bf
23-
2433
- name: Build and install devnet
2534
shell: bash
2635
run: |

.github/workflows/checks.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Checks
33
env:
44
CAIRO_LANG_VERSION: "0.13.1"
55
DEVNET_VERSION: "0.1.2"
6-
DEVNET_SHA: 7e7dbb5
6+
DEVNET_SHA: dd55971
77
LEDGER_APP_SHA: dd58c5c
88
LEDGER_APP_DEV_TOOLS_SHA: a037d42181f4bed9694246256e2c9e2a899e775c302a9c6482c81f87c28e1432
99

.github/workflows/install_devnet.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: Devnet Setup Workflow
2+
3+
on:
4+
push:
5+
branches:
6+
- development
7+
pull_request:
8+
9+
jobs:
10+
devnet-setup:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Run Devnet Setup
15+
uses: ./.github/composite-actions/devnet

0 commit comments

Comments
 (0)