Repository navigation
Wasmer upgrade to v7.5.0 for maintenance line v3.0.x #569
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: contracts | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: [ "main" ] | |
| pull_request: | |
| env: | |
| TOOLCHAIN_STABLE: 1.82.0 # Rust toolchain for building contracts in stable channel. | |
| TOOLCHAIN_STABLE_INTEGRATION: 1.96.0 # Rust toolchain for running integration tests in stable channel. | |
| TOOLCHAIN_NIGHTLY: nightly-2024-09-01 # Rust toolchain for building contracts in nightly channel for version 1.81.0. | |
| TOOLCHAIN_NIGHTLY_INTEGRATION: nightly-2026-04-11 # Rust toolchain for running integration in nightly channel for version 1.96.0. | |
| TOOLCHAIN_CHECK: 1.96.0 # Rust toolchain for building cosmwasm-check tool. | |
| jobs: | |
| stable: | |
| name: ${{ matrix.dir }}-${{ matrix.os }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ ubuntu-latest, macos-latest ] | |
| dir: [ | |
| burner, | |
| crypto-verify, | |
| cyberpunk, | |
| empty, | |
| hackatom, | |
| ibc2, | |
| ibc-callbacks, | |
| ibc-reflect, | |
| ibc-reflect-send, | |
| nested-contracts, | |
| queue, | |
| reflect, | |
| replier, | |
| staking, | |
| virus | |
| ] | |
| defaults: | |
| run: | |
| shell: bash | |
| working-directory: contracts/${{ matrix.dir }} | |
| steps: | |
| - name: Checkout sources | |
| uses: actions/checkout@v6 | |
| - name: Install Rust for compiling contracts | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| toolchain: ${{ env.TOOLCHAIN_STABLE }} | |
| targets: wasm32-unknown-unknown | |
| components: clippy, rustfmt | |
| - name: Install Rust for running integration tests | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| toolchain: ${{ env.TOOLCHAIN_STABLE_INTEGRATION }} | |
| - name: Check formatting | |
| run: cargo +${{ env.TOOLCHAIN_STABLE }} fmt -- --check | |
| - name: Run unit tests | |
| run: cargo +${{ env.TOOLCHAIN_STABLE }} test --lib --locked | |
| - name: Build WASM binary | |
| run: cargo +${{ env.TOOLCHAIN_STABLE }} build --release --lib --locked --target wasm32-unknown-unknown | |
| - name: Run linter | |
| run: cargo +${{ env.TOOLCHAIN_STABLE }} clippy --all-targets --tests -- -D warnings | |
| - name: Run integration tests | |
| run: | | |
| RUSTFLAGS="-A warnings" cargo +${{ env.TOOLCHAIN_STABLE_INTEGRATION }} test \ | |
| -p integration-${{ matrix.dir }} \ | |
| --test integration \ | |
| --manifest-path=integration/Cargo.toml \ | |
| --locked | |
| - name: Run schema generator | |
| run: cargo +${{ env.TOOLCHAIN_STABLE }} run --bin schema --locked | |
| - name: Ensure schemas are up-to-date | |
| run: git diff --quiet ./schema | |
| - name: Upload WASM binary | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: ${{ matrix.dir }}-${{ runner.os }} | |
| path: ./contracts/${{ matrix.dir }}/target/wasm32-unknown-unknown/release/*.wasm | |
| nightly: | |
| name: ${{ matrix.dir }}-${{ matrix.os }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ ubuntu-latest, macos-latest ] | |
| dir: [ floaty ] | |
| defaults: | |
| run: | |
| shell: bash | |
| working-directory: ./contracts/${{ matrix.dir }} | |
| steps: | |
| - name: Checkout sources | |
| uses: actions/checkout@v6 | |
| - name: Install Rust for compiling contracts | |
| uses: dtolnay/rust-toolchain@nightly | |
| with: | |
| toolchain: ${{ env.TOOLCHAIN_NIGHTLY }} | |
| targets: wasm32-unknown-unknown | |
| components: clippy, rustfmt | |
| - name: Install Rust for running integration tests | |
| uses: dtolnay/rust-toolchain@nightly | |
| with: | |
| toolchain: ${{ env.TOOLCHAIN_NIGHTLY_INTEGRATION }} | |
| - name: Check formatting | |
| run: cargo +${{ env.TOOLCHAIN_NIGHTLY }} fmt -- --check | |
| - name: Run unit tests | |
| run: cargo +${{ env.TOOLCHAIN_NIGHTLY }} test --lib --locked | |
| - name: Build WASM binary | |
| run: RUSTFLAGS="-C target-feature=+nontrapping-fptoint" cargo +${{ env.TOOLCHAIN_NIGHTLY }} build --release --lib --locked --target wasm32-unknown-unknown | |
| - name: Run linter | |
| run: cargo +${{ env.TOOLCHAIN_NIGHTLY }} clippy --all-targets --tests -- -D warnings | |
| - name: Run integration tests | |
| run: | | |
| RUSTFLAGS="-A warnings" cargo +${{ env.TOOLCHAIN_NIGHTLY_INTEGRATION }} test \ | |
| -p integration-${{ matrix.dir }} \ | |
| --test integration \ | |
| --manifest-path=integration/Cargo.toml \ | |
| --locked | |
| - name: Run schema generator | |
| run: cargo +${{ env.TOOLCHAIN_NIGHTLY }} run --bin schema --locked | |
| - name: Ensure schemas are up-to-date | |
| run: git diff --quiet ./schema | |
| - name: Upload WASM binary | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: ${{ matrix.dir }}-${{ runner.os }} | |
| path: ./contracts/${{ matrix.dir }}/target/wasm32-unknown-unknown/release/*.wasm | |
| chkd: | |
| name: check-dev-${{ matrix.os }} | |
| runs-on: ${{ matrix.os }} | |
| needs: [ stable, nightly ] | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ ubuntu-latest, macos-latest ] | |
| steps: | |
| - name: Checkout sources | |
| uses: actions/checkout@v6 | |
| - name: Install Rust for compiling cosmwasm-check | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| toolchain: ${{ env.TOOLCHAIN_CHECK }} | |
| - name: Install currently developed cosmwasm-check | |
| run: cargo +${{ env.TOOLCHAIN_CHECK }} install --path ./packages/check --force --locked | |
| - uses: actions/download-artifact@v7 | |
| with: | |
| name: burner-${{ runner.os }} | |
| path: . | |
| - uses: actions/download-artifact@v7 | |
| with: | |
| name: crypto-verify-${{ runner.os }} | |
| path: . | |
| - uses: actions/download-artifact@v7 | |
| with: | |
| name: cyberpunk-${{ runner.os }} | |
| path: . | |
| - uses: actions/download-artifact@v7 | |
| with: | |
| name: empty-${{ runner.os }} | |
| path: . | |
| - uses: actions/download-artifact@v7 | |
| with: | |
| name: floaty-${{ runner.os }} | |
| path: . | |
| - uses: actions/download-artifact@v7 | |
| with: | |
| name: hackatom-${{ runner.os }} | |
| path: . | |
| - uses: actions/download-artifact@v7 | |
| with: | |
| name: ibc2-${{ runner.os }} | |
| path: . | |
| - uses: actions/download-artifact@v7 | |
| with: | |
| name: ibc-callbacks-${{ runner.os }} | |
| path: . | |
| - uses: actions/download-artifact@v7 | |
| with: | |
| name: ibc-reflect-${{ runner.os }} | |
| path: . | |
| - uses: actions/download-artifact@v7 | |
| with: | |
| name: ibc-reflect-send-${{ runner.os }} | |
| path: . | |
| - uses: actions/download-artifact@v7 | |
| with: | |
| name: nested-contracts-${{ runner.os }} | |
| path: . | |
| - uses: actions/download-artifact@v7 | |
| with: | |
| name: queue-${{ runner.os }} | |
| path: . | |
| - uses: actions/download-artifact@v7 | |
| with: | |
| name: reflect-${{ runner.os }} | |
| path: . | |
| - uses: actions/download-artifact@v7 | |
| with: | |
| name: replier-${{ runner.os }} | |
| path: . | |
| - uses: actions/download-artifact@v7 | |
| with: | |
| name: staking-${{ runner.os }} | |
| path: . | |
| - uses: actions/download-artifact@v7 | |
| with: | |
| name: virus-${{ runner.os }} | |
| path: . | |
| - name: Check contracts | |
| shell: bash | |
| run: cosmwasm-check *.wasm |