fix abi build #794
Workflow file for this run
This file contains hidden or 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: | |
| branches: [main] | |
| env: | |
| REVIVE_DEV_NODE_VERSION: 20311a9465b9ea0e28edd480cbfce8c3daa6b903 | |
| CI_UNIFIED_IMAGE: "docker.io/paritytech/ci-unified:bullseye-1.93.0-2026-01-27-v202602020922" | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 180 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Rust | |
| uses: dtolnay/rust-toolchain@master | |
| with: | |
| toolchain: 1.92 | |
| components: rustfmt, clippy, rust-src | |
| - name: Install solc | |
| run: | | |
| SOLC_VERSION=0.8.26 | |
| curl -L https://github.com/ethereum/solidity/releases/download/v${SOLC_VERSION}/solc-static-linux \ | |
| -o solc | |
| chmod +x solc | |
| sudo mv solc /usr/local/bin/solc | |
| - name: Install anvil-polkadot | |
| run: | | |
| export FOUNDRY_DIR="$HOME/.foundry" | |
| curl -L https://raw.githubusercontent.com/paritytech/foundry-polkadot/refs/heads/master/foundryup/install | bash | |
| "$FOUNDRY_DIR/bin/foundryup-polkadot" | |
| echo "$FOUNDRY_DIR/bin" >> $GITHUB_PATH | |
| - name: Install Rust nightly for scaffold tests | |
| run: | | |
| rustup toolchain install nightly-2026-02-01 --component rust-src --profile minimal | |
| - name: Run formatting check | |
| run: cargo fmt --check | |
| - name: Run clippy | |
| run: cargo clippy --workspace --all-targets --all-features -- -D warnings | |
| - name: Run unit tests (types + macros + storage) | |
| run: cargo test -p pvm-contract-types --all-features && cargo test -p pvm-contract-macros && cargo test -p pvm-storage --features alloc | |
| - name: Run solc differential storage-layout tests | |
| run: cargo test -p pvm-contract-macros --features solc-tests --test solc_differential | |
| - name: Run solc differential storage-representation tests | |
| run: cargo test -p pvm-solc-differential --features solc-tests | |
| - name: Run integration tests | |
| run: cargo test -p cargo-pvm-contract -- --test-threads=1 | |
| - name: Cache revive-dev-node | |
| id: cache-dev-node | |
| uses: actions/cache@v4 | |
| with: | |
| path: revive-dev-node | |
| key: revive-dev-node-${{ env.REVIVE_DEV_NODE_VERSION }} | |
| - name: Build revive-dev-node | |
| if: steps.cache-dev-node.outputs.cache-hit != 'true' | |
| run: | | |
| docker run --rm -v $GITHUB_WORKSPACE:/output -w /build $CI_UNIFIED_IMAGE bash -c " | |
| git init . && | |
| git remote add origin https://github.com/paritytech/polkadot-sdk.git && | |
| git fetch --depth 1 origin $REVIVE_DEV_NODE_VERSION && | |
| git checkout FETCH_HEAD && | |
| cargo build -p revive-dev-node --release && | |
| cp target/release/revive-dev-node /output/ | |
| " | |
| - name: Install revive-dev-node | |
| run: sudo install revive-dev-node /usr/local/bin/ | |
| - name: Build cargo-pvm-contract binary | |
| run: cargo build -p cargo-pvm-contract | |
| - name: Run e2e tests | |
| run: cargo test -p pvm-contract-e2e-tests -- --test-threads=1 | |
| check-examples: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Rust | |
| uses: dtolnay/rust-toolchain@master | |
| with: | |
| toolchain: 1.92 | |
| components: rust-src | |
| - name: Install Rust nightly for example build | |
| run: | | |
| rustup toolchain install nightly-2026-02-01 --component rust-src --profile minimal | |
| - name: Install solc | |
| run: | | |
| SOLC_VERSION=0.8.26 | |
| curl -L https://github.com/ethereum/solidity/releases/download/v${SOLC_VERSION}/solc-static-linux \ | |
| -o solc | |
| chmod +x solc | |
| sudo mv solc /usr/local/bin/solc | |
| - name: Install CLI tool | |
| run: cargo install --locked --path crates/cargo-pvm-contract | |
| - name: Build example project | |
| working-directory: examples/example-mytoken | |
| run: cargo pvm-contract build |