Skip to content

Commit 94a09af

Browse files
authored
Use starknet-devnet from .tool-versions (#3455)
Closes #3440
1 parent 32bc655 commit 94a09af

File tree

6 files changed

+15
-84
lines changed

6 files changed

+15
-84
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -235,9 +235,7 @@ jobs:
235235
with:
236236
toolchain: stable
237237
- uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6
238-
- name: Install starknet-devnet on Linux/Macos
239-
run: |
240-
./scripts/install_devnet.sh
238+
- uses: asdf-vm/actions/install@05e0d2ed97b598bfce82fd30daf324ae0c4570e6
241239
- uses: software-mansion/setup-scarb@v1
242240
- uses: software-mansion/setup-universal-sierra-compiler@v1
243241
- name: Run tests

.github/workflows/scheduled.yml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -111,9 +111,16 @@ jobs:
111111
with:
112112
scarb-version: ${{ matrix.version }}
113113
- uses: software-mansion/setup-universal-sierra-compiler@v1
114-
115-
- name: Install starknet-devnet
116-
run: ./scripts/install_devnet.sh
114+
- name: Get Devnet version from .tool-versions
115+
id: get-devnet-version
116+
run: |
117+
devnet_version=$(grep starknet-devnet .tool-versions | cut -d " " -f 2)
118+
echo "Devnet version: $devnet_version"
119+
echo "version=$devnet_version" >> "$GITHUB_OUTPUT"
120+
- uses: asdf-vm/actions/install@05e0d2ed97b598bfce82fd30daf324ae0c4570e6
121+
with:
122+
tool_versions: |
123+
starknet-devnet ${{ steps.get-devnet-version.outputs.version }}
117124
118125
- run: cargo test --release -p sncast
119126

@@ -145,7 +152,7 @@ jobs:
145152
uses: ./.github/workflows/_build-plugin-binaries.yml
146153
with:
147154
overridden_plugin_version: ${{ needs.get-version.outputs.version }}-test.${{ github.run_id }}
148-
155+
149156
publish-plugin:
150157
needs: [get-version, build-plugin-binaries]
151158
uses: ./.github/workflows/_publish-plugin.yml

.tool-versions

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
scarb 2.9.4
2+
starknet-devnet 0.4.2

crates/sncast/tests/helpers/devnet.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,7 @@ fn start_devnet() {
3434
}
3535
}
3636

37-
let devnet_path = "tests/utils/devnet/starknet-devnet";
38-
39-
Command::new(devnet_path)
37+
Command::new("starknet-devnet")
4038
.args([
4139
"--port",
4240
&port,

docs/src/development/environment-setup.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ about installing `cairo-profiler` [here](https://github.com/software-mansion/cai
4444
> After pushing the branch to the remote, those tests should pass.
4545
4646
### Starknet Devnet
47-
To install it run `./scripts/install_devnet.sh`
47+
Install [starknet-devnet](https://github.com/0xSpaceShard/starknet-devnet) via [asdf](https://asdf-vm.com/).
4848
4949
### Universal sierra compiler
5050
Install the latest [universal-sierra-compiler](https://github.com/software-mansion/universal-sierra-compiler) version.

scripts/install_devnet.sh

Lines changed: 0 additions & 73 deletions
This file was deleted.

0 commit comments

Comments
 (0)