Skip to content

Commit

Permalink
Refactor devnet installation action; Add temporary workflow which wil…
Browse files Browse the repository at this point in the history
…l create devnet cache
  • Loading branch information
franciszekjob committed Jan 27, 2025
1 parent 819321e commit e4b947c
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 7 deletions.
21 changes: 15 additions & 6 deletions .github/composite-actions/devnet/action.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
name: "Devnet Setup"

inputs:
devnet_sha:
description: "Commit SHA for the starknet-devnet-rs repository"
required: true


runs:
using: "composite"
steps:
Expand All @@ -7,20 +14,22 @@ runs:
with:
submodules: recursive

- name: Cache devnet build
id: cache-devnet
uses: actions/cache@v4
with:
path: starknet-devnet-rs/target/release
key: ${{ runner.os }}-starknet-devnet-rs-target-release-${{ inputs.devnet_sha }}

- name: Clone starknet-devnet-rs
if: steps.cache-devnet.outputs.cache-hit != 'true'
shell: bash
run: |
DEVNET_SHA="dd559716849ade47cc06be150edf250e5dccb2bf"
git clone https://github.com/0xSpaceShard/starknet-devnet-rs.git starknet-devnet-rs
cd starknet-devnet-rs
git checkout "$DEVNET_SHA"
- name: Cache devnet build
uses: actions/cache@v4
with:
path: starknet-devnet-rs/target/release
key: ${{ runner.os }}-starknet-devnet-rs-target-release-dd559716849ade47cc06be150edf250e5dccb2bf

- name: Build and install devnet
shell: bash
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Checks
env:
CAIRO_LANG_VERSION: "0.13.1"
DEVNET_VERSION: "0.1.2"
DEVNET_SHA: 7e7dbb5
DEVNET_SHA: dd55971
LEDGER_APP_SHA: dd58c5c
LEDGER_APP_DEV_TOOLS_SHA: a037d42181f4bed9694246256e2c9e2a899e775c302a9c6482c81f87c28e1432

Expand Down
15 changes: 15 additions & 0 deletions .github/workflows/install_devnet.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Devnet Setup Workflow

on:
push:
branches:
- development
pull_request:

jobs:
devnet-setup:
runs-on: ubuntu-latest

steps:
- name: Run Devnet Setup
uses: ./.github/composite-actions/devnet

0 comments on commit e4b947c

Please sign in to comment.