Juno DEX #71
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: Compiled binaries checks | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - main | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| check-artifacts-size: | |
| runs-on: ubuntu-latest | |
| name: Check Artifacts Size | |
| steps: | |
| - name: Cancel Previous Runs | |
| uses: styfle/cancel-workflow-action@0.12.1 | |
| with: | |
| access_token: ${{ github.token }} | |
| - name: Checkout sources | |
| uses: actions/checkout@v4 | |
| - name: Restore cached cargo artifacts | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cargo/bin | |
| ~/.cargo/git/checkouts | |
| ~/.cargo/git/db | |
| ~/.cargo/registry/cache | |
| ~/.cargo/registry/index | |
| key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-cargo- | |
| - name: Build Artifacts | |
| run: | | |
| docker run \ | |
| -v "$GITHUB_WORKSPACE":/code \ | |
| -v ~/.cargo/registry:/usr/local/cargo/registry \ | |
| -v ~/.cargo/git:/usr/local/cargo/git \ | |
| cosmwasm/rust-optimizer:0.17.0 | |
| # if there are new integrations with custom protobuf paths, we need to re-enable our custom optimizer | |
| # ghcr.io/astroport-fi/rust-optimizer:v0.15.1-astroport | |
| - name: Check Artifacts Size | |
| run: | | |
| $GITHUB_WORKSPACE/scripts/check_artifacts_size.sh | |
| - name: Check Juno v1 artifact set | |
| run: | | |
| python3 $GITHUB_WORKSPACE/scripts/check_juno_v1_artifacts.py | |
| - name: Upload checked artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: cosmwasm-artifacts-${{ github.sha }} | |
| path: artifacts | |
| if-no-files-found: error | |
| cosmwasm-check: | |
| runs-on: ubuntu-latest | |
| name: Cosmwasm check | |
| needs: check-artifacts-size | |
| steps: | |
| - name: Install Rust for compiling cosmwasm-check | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| toolchain: 1.88.0 | |
| - name: Install cosmwasm-check | |
| run: cargo install --version 1.5.11 cosmwasm-check | |
| - name: Checkout sources | |
| uses: actions/checkout@v4 | |
| - name: Download checked artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: cosmwasm-artifacts-${{ github.sha }} | |
| path: artifacts | |
| - name: Cosmwasm check | |
| run: | | |
| # Juno wasmvm capability set (post-v30 ships wasmvm v3.0.4): | |
| # - no `neutron` capability (upstream Astroport included it for the | |
| # pair_concentrated_duality Slinky-CL precompile, which we deleted). | |
| # - `cosmwasm_2_0` added for forward compat with interface_version_9 | |
| # contracts on wasmvm v3.0.4. Astroport v5.13.1 itself ships | |
| # cosmwasm-std 1.5 (interface_version_8), so the v2.0 capability | |
| # is preparatory — it doesn't gate the current wasms. | |
| cosmwasm-check $GITHUB_WORKSPACE/artifacts/*.wasm --available-capabilities staking,cosmwasm_1_1,cosmwasm_2_0,iterator,stargate |