openrpc-testgenv2 #8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: openrpc-testgenv2 | |
on: | |
workflow_dispatch: | |
env: | |
CARGO_TERM_COLOR: always | |
RUST_VERSION: 1.80.0 | |
jobs: | |
build: | |
runs-on: arc-runner-set | |
steps: | |
- name: Checkout main repository | |
uses: actions/checkout@v3 | |
- name: Install build dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y build-essential libclang-dev | |
- name: Install Rust toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
- name: Cache Rust dependencies | |
uses: Swatinem/rust-cache@v2 | |
- name: Build katana | |
run: | | |
cargo build --release --bin katana | |
mkdir -p bins | |
cp ./target/release/katana bins/ | |
- name: Upload katana binary | |
uses: actions/upload-artifact@v4 | |
with: | |
name: dojo-bins | |
path: bins | |
test: | |
needs: build | |
runs-on: arc-runner-set | |
steps: | |
- name: Checkout main repository | |
uses: actions/checkout@v3 | |
- name: Install build dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y build-essential libclang-dev git curl bash | |
- name: Install Rust toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
- name: Cache Rust dependencies | |
uses: Swatinem/rust-cache@v2 | |
- name: Install asdf | |
run: | | |
git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.14.1 | |
echo ". $HOME/.asdf/asdf.sh" >> ~/.bashrc | |
echo ". $HOME/.asdf/completions/asdf.bash" >> ~/.bashrc | |
source ~/.bashrc | |
- name: Set PATH for asdf | |
run: | | |
echo "PATH=$HOME/.asdf/bin:$HOME/.asdf/shims:$PATH" >> $GITHUB_ENV | |
- name: Install Scarb | |
run: | | |
source ~/.asdf/asdf.sh | |
asdf plugin add scarb | |
asdf install scarb 2.8.4 | |
asdf global scarb 2.8.4 | |
shell: bash | |
- name: Verify Scarb installation | |
run: | | |
scarb --version | |
shell: bash | |
- name: Cache target directory | |
uses: actions/cache@v3 | |
with: | |
path: katana-runner/target | |
key: ${{ runner.os }}-cargo-${{ hashFiles('katana-runner/Cargo.lock') }} | |
restore-keys: | | |
${{ runner.os }}-cargo- | |
- name: Download katana binary | |
uses: actions/download-artifact@v4 | |
with: | |
name: dojo-bins | |
path: /tmp/bins | |
- name: Make katana executable | |
run: | | |
chmod +x /tmp/bins/katana | |
- name: Start katana node | |
run: | | |
/tmp/bins/katana & | |
until curl -s http://127.0.0.1:5050 >/dev/null; do | |
echo "Waiting for Katana to be ready..." | |
sleep 5 | |
done | |
- name: Checkout katana-runner repository | |
uses: actions/checkout@v3 | |
with: | |
repository: neotheprogramist/starknet-rpc-tests | |
path: katana-runner | |
- name: Scarb build | |
run: | | |
cd katana-runner | |
scarb build | |
- name: Verify Scarb build output | |
run: | | |
cd katana-runner | |
ls -la target/dev/ | |
shell: bash | |
- name: Build openrpc-testgen-runner | |
run: | | |
cd katana-runner | |
cargo build --release --features katana | |
- name: Make openrpc-testgen-runner executable | |
run: | | |
chmod +x katana-runner/target/release/openrpc-testgen-runner | |
- name: Run openrpc-testgen-runner binary | |
run: | | |
cd katana-runner | |
target/release/openrpc-testgen-runner \ | |
--urls "http://127.0.0.1:5050" \ | |
--paymaster-account-address "0x127fd5f1fe78a71f8bcd1fec63e3fe2f0486b6ecd5c86a0466c3a21fa5cfcec" \ | |
--paymaster-private-key "0xc5b2fcab997346f3ea1c00b002ecf6f382c5f9c9659a3894eb783c5320f912" \ | |
--udc-address "0x41a78e741e5af2fec34b695679bc6891742439f7afb8484ecd7766661ad02bf" \ | |
--account-class-hash "0x07dc7899aa655b0aae51eadff6d801a58e97dd99cf4666ee59e704249e51adf2" | |