Skip to content

Commit 0d38c25

Browse files
chore: ci changes
1 parent d0b18c4 commit 0d38c25

File tree

4 files changed

+39
-2
lines changed

4 files changed

+39
-2
lines changed

.github/workflows/ci-stylus-e2e-tests.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,5 +51,19 @@ jobs:
5151
sudo chmod a+x /usr/bin/solc
5252
- name: Setup nitro node
5353
run: ./scripts/nitro-testnode.sh -d -i
54+
- name: Set up Environment
55+
run: |
56+
echo "RPC_URL=http://localhost:8547" >> $GITHUB_ENV
57+
echo "PRIVATE_KEY=0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80" >> $GITHUB_ENV
58+
echo "WALLER_ADDRESS=0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266" >> $GITHUB_ENV
59+
- name: Deploy Mock Pyth Contract
60+
run: |
61+
cd pyth-mock-solidity
62+
deployed_to=$(forge script ./script/MockPyth.s.sol:MockPythScript \
63+
--rpc-url "$RPC_URL" \
64+
--private-key "$PRIVATE_KEY" \
65+
--broadcast \
66+
| grep -oP '(?<=Pyth contract address: )0x[a-fA-F0-9]{40}' | tail -n 1)
67+
echo "MOCK_PYTH_ADDRESS=$deployed_to" >> $GITHUB_ENV
5468
- name: run integration tests
5569
run: ./scripts/e2e-tests.sh

.github/workflows/ci-stylus-gas-bench.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,5 +48,19 @@ jobs:
4848
name: Install pnpm
4949
- name: Setup nitro node
5050
run: ./scripts/nitro-testnode.sh -d -i
51+
- name: Set up Environment
52+
run: |
53+
echo "RPC_URL=http://localhost:8547" >> $GITHUB_ENV
54+
echo "PRIVATE_KEY=0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80" >> $GITHUB_ENV
55+
echo "WALLER_ADDRESS=0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266" >> $GITHUB_ENV
56+
- name: Deploy Mock Pyth Contract
57+
run: |
58+
cd pyth-mock-solidity
59+
deployed_to=$(forge script ./script/MockPyth.s.sol:MockPythScript \
60+
--rpc-url "$RPC_URL" \
61+
--private-key "$PRIVATE_KEY" \
62+
--broadcast \
63+
| grep -oP '(?<=Pyth contract address: )0x[a-fA-F0-9]{40}' | tail -n 1)
64+
echo "MOCK_PYTH_ADDRESS=$deployed_to" >> $GITHUB_ENV
5165
- name: run benches
5266
run: ./scripts/bench.sh

target_chains/ethereum/sdk/stylus/scripts/bench.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
#!/bin/bash
22
set -e
33

4+
if [ -z "$CI" ]; then
5+
46
MYDIR=$(realpath "$(dirname "$0")")
57
cd "$MYDIR"
68
cd ..
79

10+
811
export RPC_URL=http://localhost:8547
912
export PRIVATE_KEY=0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80
1013
export WALLER_ADDRESS=0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266
@@ -23,7 +26,9 @@ deployed_to=$(
2326

2427
export MOCK_PYTH_ADDRESS=$deployed_to
2528
cd ..
26-
29+
else
30+
echo "Skipping MockPyth deployment in CI"
31+
fi
2732

2833
MYDIR=$(realpath "$(dirname "$0")")
2934
cd "$MYDIR"

target_chains/ethereum/sdk/stylus/scripts/e2e-tests.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
#!/bin/bash
22
set -e
33

4+
if [ -z "$CI" ]; then
5+
46
MYDIR=$(realpath "$(dirname "$0")")
57
cd "$MYDIR"
68

@@ -21,9 +23,11 @@ deployed_to=$(
2123
--broadcast \
2224
| grep -oP '(?<=Pyth contract address: )0x[a-fA-F0-9]{40}' | tail -n 1
2325
)
24-
2526
export MOCK_PYTH_ADDRESS=$deployed_to
2627
cd ..
28+
else
29+
echo "Skipping MockPyth deployment in CI"
30+
fi
2731

2832
# Navigate to project root
2933
cd "$(dirname "$(realpath "$0")")/.."

0 commit comments

Comments
 (0)