Control unsigned ismp with a storage item #1781
Workflow file for this run
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: CI | |
on: | |
push: | |
branches: | |
- main | |
pull_request_target: | |
types: [opened, synchronize] | |
# pull_request: | |
# branches: | |
# - main | |
concurrency: | |
group: ci-${{ github.head_ref || github.ref_name }} | |
cancel-in-progress: true | |
env: | |
CARGO_TERM_COLOR: always | |
FOUNDRY_PROFILE: ci | |
BSC_URL: ${{ secrets.BSC_URL }} | |
OP_URL: ${{ secrets.OP_URL }} | |
SEPOLIA_URL: ${{ secrets.SEPOLIA_URL }} | |
SIGNING_KEY: ${{ secrets.SIGNING_KEY }} | |
POLYGON_RPC: ${{ secrets.POLYGON_RPC }} | |
WASM_BINDGEN_TEST_TIMEOUT: 5400 | |
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | |
MAINNET_FORK_URL: ${{ secrets.MAINNET_FORK_URL }} | |
TELEMETRY_SECRET_KEY: ${{ secrets.TELEMETRY_SECRET_KEY }} | |
jobs: | |
check-wasm: | |
name: Check Wasm Crates | |
runs-on: arc-runner-set | |
if: github.event.pull_request.draft == false | |
strategy: | |
matrix: | |
crate: [gargantua-runtime, nexus-runtime] | |
steps: | |
- name: Get User Permission | |
id: checkAccess | |
uses: actions-cool/check-user-permission@v2 | |
with: | |
require: write | |
username: ${{ github.triggering_actor }} | |
- name: Check User Permission | |
if: steps.checkAccess.outputs.require-result == 'false' | |
run: | | |
echo "${{ github.triggering_actor }} does not have permissions on this repo." | |
echo "Current permission level is ${{ steps.checkAccess.outputs.user-permission }}" | |
echo "Job originally triggered by ${{ github.actor }}" | |
exit 1 | |
- uses: actions/checkout@v3 | |
with: | |
ref: ${{ github.event.pull_request.head.sha }} | |
token: ${{ secrets.GH_TOKEN }} | |
submodules: recursive | |
- name: Install Dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y clang netcat wget curl libssl-dev llvm libudev-dev make protobuf-compiler pkg-config | |
- name: Install toolchain | |
uses: dtolnay/rust-toolchain@nightly | |
with: | |
toolchain: stable | |
- name: Add wasm toolchain | |
run: | | |
rustup update nightly | |
rustup target add wasm32-unknown-unknown --toolchain nightly | |
rustup target add wasm32-unknown-unknown | |
rustup component add rust-src | |
- uses: Swatinem/rust-cache@v2 | |
- uses: webfactory/[email protected] | |
with: | |
ssh-private-key: ${{ secrets.SSH_KEY }} | |
- name: check no-std | |
run: | | |
cargo check -p ${{ matrix.crate }} --no-default-features --target=wasm32-unknown-unknown --locked | |
check-workspace: | |
name: Check Workspace | |
runs-on: arc-runner-set | |
if: github.event.pull_request.draft == false | |
steps: | |
- name: Get User Permission | |
id: checkAccess | |
uses: actions-cool/check-user-permission@v2 | |
with: | |
require: write | |
username: ${{ github.triggering_actor }} | |
- name: Check User Permission | |
if: steps.checkAccess.outputs.require-result == 'false' | |
run: | | |
echo "${{ github.triggering_actor }} does not have permissions on this repo." | |
echo "Current permission level is ${{ steps.checkAccess.outputs.user-permission }}" | |
echo "Job originally triggered by ${{ github.actor }}" | |
exit 1 | |
- uses: actions/checkout@v3 | |
with: | |
ref: ${{ github.event.pull_request.head.sha }} | |
token: ${{ secrets.GH_TOKEN }} | |
submodules: recursive | |
- name: Install Dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y clang netcat wget curl libssl-dev llvm libudev-dev make protobuf-compiler pkg-config | |
- name: Install yarn | |
run: | | |
curl -fsSL --create-dirs -o $HOME/bin/yarn https://github.com/yarnpkg/yarn/releases/download/v1.22.22/yarn-1.22.22.js | |
chmod +x $HOME/bin/yarn | |
echo "$HOME/bin" >> $GITHUB_PATH | |
- name: Set up Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 22 | |
cache-dependency-path: "evm/yarn.lock" | |
cache: "yarn" | |
- name: Install npm dependencies | |
working-directory: evm | |
run: | | |
yarn install | |
- uses: webfactory/[email protected] | |
with: | |
ssh-private-key: ${{ secrets.SSH_KEY }} | |
- uses: Swatinem/rust-cache@v2 | |
- name: Install toolchain | |
uses: dtolnay/rust-toolchain@nightly | |
with: | |
toolchain: stable | |
- name: Add wasm toolchain | |
run: | | |
rustup update nightly | |
rustup target add wasm32-unknown-unknown --toolchain nightly | |
rustup target add wasm32-unknown-unknown | |
rustup component add rust-src | |
- uses: Swatinem/rust-cache@v2 | |
- name: check workspace | |
run: | | |
cargo check --all --benches --locked | |
unit-tests: | |
name: Unit Tests | |
runs-on: arc-runner-set | |
if: github.event.pull_request.draft == false | |
steps: | |
- name: Get User Permission | |
id: checkAccess | |
uses: actions-cool/check-user-permission@v2 | |
with: | |
require: write | |
username: ${{ github.triggering_actor }} | |
- name: Check User Permission | |
if: steps.checkAccess.outputs.require-result == 'false' | |
run: | | |
echo "${{ github.triggering_actor }} does not have permissions on this repo." | |
echo "Current permission level is ${{ steps.checkAccess.outputs.user-permission }}" | |
echo "Job originally triggered by ${{ github.actor }}" | |
exit 1 | |
- uses: actions/checkout@v3 | |
with: | |
ref: ${{ github.event.pull_request.head.sha }} | |
token: ${{ secrets.GH_TOKEN }} | |
submodules: recursive | |
- name: Install Dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y clang netcat wget curl libssl-dev llvm libudev-dev make protobuf-compiler pkg-config | |
- name: Install yarn | |
run: | | |
curl -fsSL --create-dirs -o $HOME/bin/yarn https://github.com/yarnpkg/yarn/releases/download/v1.22.22/yarn-1.22.22.js | |
chmod +x $HOME/bin/yarn | |
echo "$HOME/bin" >> $GITHUB_PATH | |
- name: Set up Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 22 | |
cache-dependency-path: "evm/yarn.lock" | |
cache: "yarn" | |
- name: Install npm dependencies | |
working-directory: evm | |
run: | | |
yarn install | |
- uses: webfactory/[email protected] | |
with: | |
ssh-private-key: ${{ secrets.SSH_KEY }} | |
- name: Install toolchain | |
uses: dtolnay/rust-toolchain@nightly | |
with: | |
toolchain: stable | |
- name: Add wasm toolchain | |
run: | | |
rustup update nightly | |
rustup target add wasm32-unknown-unknown --toolchain nightly | |
rustup target add wasm32-unknown-unknown | |
rustup component add rust-src | |
- uses: Swatinem/rust-cache@v2 | |
- name: Run unit tests | |
run: | | |
cargo test --all-targets --features=runtime-benchmarks --locked | |
integration-tests: | |
name: Integration Tests | |
runs-on: arc-runner-set | |
if: github.event.pull_request.draft == false | |
steps: | |
- name: Get User Permission | |
id: checkAccess | |
uses: actions-cool/check-user-permission@v2 | |
with: | |
require: write | |
username: ${{ github.triggering_actor }} | |
- name: Check User Permission | |
if: steps.checkAccess.outputs.require-result == 'false' | |
run: | | |
echo "${{ github.triggering_actor }} does not have permissions on this repo." | |
echo "Current permission level is ${{ steps.checkAccess.outputs.user-permission }}" | |
echo "Job originally triggered by ${{ github.actor }}" | |
exit 1 | |
- uses: actions/checkout@v3 | |
with: | |
ref: ${{ github.event.pull_request.head.sha }} | |
token: ${{ secrets.GH_TOKEN }} | |
submodules: recursive | |
- name: Install Dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y clang netcat wget curl libssl-dev llvm libudev-dev make protobuf-compiler pkg-config | |
- name: Install yarn | |
run: | | |
curl -fsSL --create-dirs -o $HOME/bin/yarn https://github.com/yarnpkg/yarn/releases/download/v1.22.22/yarn-1.22.22.js | |
chmod +x $HOME/bin/yarn | |
echo "$HOME/bin" >> $GITHUB_PATH | |
- name: Set up Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 22 | |
cache-dependency-path: "evm/yarn.lock" | |
cache: "yarn" | |
- name: Install npm dependencies | |
working-directory: evm | |
run: | | |
yarn install | |
- name: Install toolchain | |
uses: dtolnay/rust-toolchain@nightly | |
with: | |
toolchain: stable | |
- name: Add wasm toolchain | |
run: | | |
rustup update nightly | |
rustup target add wasm32-unknown-unknown --toolchain nightly | |
rustup target add wasm32-unknown-unknown | |
rustup component add rust-src | |
- uses: webfactory/[email protected] | |
with: | |
ssh-private-key: ${{ secrets.SSH_KEY }} | |
- uses: Swatinem/rust-cache@v2 | |
- name: Run Simnet Tests | |
run: | | |
# build hyperbridge binary | |
cargo build -p hyperbridge --release | |
./target/release/hyperbridge simnode --chain=gargantua-2000 --name=alice --tmp --state-pruning=archive --blocks-pruning=archive --rpc-port=9990 --port 40337 --log="mmr=trace" --rpc-cors=all --unsafe-rpc-external --rpc-methods=unsafe & | |
./scripts/wait_for_tcp_port_opening.sh localhost 9990 | |
cargo test -p simtests -- --nocapture --ignored --test-threads=1 | |
kill -9 $! | |
- name: Run Parachain Devnet | |
run: | | |
# install polkadot binary | |
cd ../ | |
mkdir -p polkadot-sdk/target/release | |
cd polkadot-sdk/target/release | |
wget -O ./polkadot -q --show-progress 'https://github.com/paritytech/polkadot-sdk/releases/download/polkadot-stable2407-1/polkadot' | |
wget -O ./polkadot-execute-worker -q --show-progress 'https://github.com/paritytech/polkadot-sdk/releases/download/polkadot-stable2407-1/polkadot-execute-worker' | |
wget -O ./polkadot-prepare-worker -q --show-progress 'https://github.com/paritytech/polkadot-sdk/releases/download/polkadot-stable2407-1/polkadot-prepare-worker' | |
sudo chmod +x ./polkadot | |
sudo chmod +x ./polkadot-execute-worker | |
sudo chmod +x ./polkadot-prepare-worker | |
# get back in to hyperbridge | |
cd ../../../hyperbridge | |
# install zombienet | |
wget -O ./zombienet -q --show-progress https://github.com/paritytech/zombienet/releases/download/v1.3.89/zombienet-linux-x64 | |
sudo chmod +x ./zombienet | |
# spawn devnet | |
nohup ./zombienet spawn --provider native ./scripts/zombienet/local-testnet.toml & disown | |
./scripts/wait_for_tcp_port_opening.sh localhost 9922 | |
./scripts/wait_for_tcp_port_opening.sh localhost 9990 | |
# - name: Beefy integration tests | |
# run: | | |
# cargo test -p ismp-solidity-tests -- --nocapture --ignored | |
# - name: parachain messaging relayer integration tests | |
# run: | | |
# cargo test -p tesseract-integration-test --lib -- --ignored --test-threads=1 | |
- name: Xcm integration tests | |
run: | | |
cargo test -p pallet-ismp-testsuite --lib xcm_integration_test --features runtime-benchmarks -- --nocapture --ignored | |
- name: Run Eth POS Devnet | |
run: | | |
git clone https://github.com/polytope-labs/eth-pos-devnet.git | |
cd eth-pos-devnet | |
DOCKER_CLIENT_TIMEOUT=300 COMPOSE_HTTP_TIMEOUT=300 docker-compose up -d | |
../scripts/wait_for_tcp_port_opening.sh localhost 3500 | |
../scripts/wait_for_tcp_port_opening.sh localhost 8545 | |
- name: sync-committee integration tests | |
run: | | |
cargo test -p sync-committee-prover -- --nocapture --ignored | |
# - name: polygon pos integration tests | |
# run: | | |
# cargo test -p polygon-pos-prover -- --nocapture --ignored | |
- name: Binance Smart Chain integration tests | |
run: | | |
cargo test -p bsc-prover -- --nocapture --ignored | |
check-solidity: | |
name: Check ismp-solidity | |
runs-on: ubuntu-latest | |
if: github.event.pull_request.draft == false | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: Install Foundry | |
uses: foundry-rs/foundry-toolchain@v1 | |
with: | |
version: nightly | |
- name: Run Forge build | |
run: | | |
cd ./evm | |
yarn | |
forge --version | |
forge build --sizes | |
id: build | |
- name: Run Forge tests | |
run: | | |
cd ./evm | |
yarn | |
forge test -vvv | |
id: test | |
hyperclient-tests: | |
name: Hyperclient Integration Tests | |
runs-on: ubuntu-latest | |
if: github.event.pull_request.draft == false | |
steps: | |
- name: Get User Permission | |
id: checkAccess | |
uses: actions-cool/check-user-permission@v2 | |
with: | |
require: write | |
username: ${{ github.triggering_actor }} | |
- name: Check User Permission | |
# if: steps.checkAccess.outputs.require-result == 'false' | |
if: false | |
run: | | |
echo "${{ github.triggering_actor }} does not have permissions on this repo." | |
echo "Current permission level is ${{ steps.checkAccess.outputs.user-permission }}" | |
echo "Job originally triggered by ${{ github.actor }}" | |
exit 1 | |
- uses: actions/checkout@v3 | |
with: | |
ref: ${{ github.event.pull_request.head.sha }} | |
token: ${{ secrets.GH_TOKEN }} | |
submodules: recursive | |
- name: Install wasm-pack | |
run: | | |
curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh | |
rustup target add wasm32-unknown-unknown | |
- name: Install chrome | |
uses: browser-actions/setup-chrome@latest | |
- name: Run WASM tests | |
run: | | |
wasm-pack test --headless --chrome --no-default-features --features=wasm,testing | |
working-directory: modules/hyperclient |