chore(solana): merge with main #2442
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
| # Based on https://github.com/actions-rs/example/blob/master/.github/workflows/quickstart.yml | |
| name: rust | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| paths: | |
| - '**.rs' | |
| - '**.toml' | |
| - '**.lock' | |
| - '**.proto' | |
| - 'abi/**' | |
| - '.github/workflows/rust.yml' | |
| jobs: | |
| lints: | |
| name: fmt-and-clippy | |
| runs-on: depot-ubuntu-24.04-4 | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Set up environment | |
| uses: ./.github/actions/foundry-setup | |
| - name: Run cargo fmt | |
| uses: actions-rs/cargo@v1 | |
| with: | |
| command: fmt | |
| args: --all -- --check | |
| - name: Run cargo clippy | |
| uses: actions-rs/cargo@v1 | |
| with: | |
| command: clippy | |
| tests: | |
| name: unit-tests | |
| runs-on: depot-ubuntu-24.04-4 | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Set up environment | |
| uses: ./.github/actions/foundry-setup | |
| - name: Install just | |
| uses: extractions/setup-just@v3 | |
| - name: Run unit tests | |
| run: just test-cargo | |
| env: | |
| RUST_BACKTRACE: 1 | |
| build-relayer: | |
| name: build-relayer | |
| runs-on: depot-ubuntu-24.04-4 | |
| continue-on-error: true | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Set up environment | |
| uses: ./.github/actions/foundry-setup | |
| - name: Build | |
| uses: actions-rs/cargo@v1 | |
| with: | |
| command: build | |
| args: --bin relayer --release --locked | |
| build-operator: | |
| name: build-operator | |
| runs-on: depot-ubuntu-24.04-4 | |
| continue-on-error: true | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Set up environment | |
| uses: ./.github/actions/foundry-setup | |
| - name: Build | |
| uses: actions-rs/cargo@v1 | |
| with: | |
| command: build | |
| args: --bin operator --release --locked | |
| build-08-wasm-eth: | |
| name: build-08-wasm-eth | |
| runs-on: depot-ubuntu-24.04-4 | |
| continue-on-error: true | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Set up Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: rustfmt, clippy | |
| targets: wasm32-unknown-unknown | |
| # TODO: re-enable once cosmwasm-check is updated | |
| # - name: Install cargo-run-script and cosmwasm-check | |
| # uses: actions-rs/cargo@v1 | |
| # with: | |
| # command: install | |
| # args: cosmwasm-check | |
| - name: Install just | |
| uses: extractions/setup-just@v3 | |
| - name: Compute SHA-256 of commited binary | |
| id: commited_sha256 | |
| run: | | |
| echo "sha256=$(gunzip -c e2e/interchaintestv8/wasm/cw_ics08_wasm_eth.wasm.gz | sha256sum | awk '{print $1}')" >> $GITHUB_OUTPUT | |
| - name: Build optimized wasm binary | |
| run: just build-cw-ics08-wasm-eth | |
| # checks that the wasm binary is a proper cosmwasm smart contract | |
| # it checks for things like memories, exports, imports, available capabilities, and non-determinism | |
| # TODO: re-enable once cosmwasm-check is updated | |
| # - name: Check cosmwasm file | |
| # run: cosmwasm-check artifacts/cw_ics08_wasm_eth.wasm | |
| - name: Verify built binary matches commited | |
| run: | | |
| sha256_built=$(sha256sum artifacts/cw_ics08_wasm_eth.wasm | awk '{print $1}') | |
| if [ "$sha256_built" != "${{ steps.commited_sha256.outputs.sha256 }}" ]; then | |
| echo "SHA-256 hashes do not match" | |
| exit 1 | |
| fi | |