a3223b4f56
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 6. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v4...v6) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: '6' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
74 lines
2.0 KiB
YAML
74 lines
2.0 KiB
YAML
name: ci-contracts
|
|
|
|
on:
|
|
push:
|
|
paths:
|
|
- 'contracts/**'
|
|
- 'common/**'
|
|
pull_request:
|
|
paths:
|
|
- 'contracts/**'
|
|
- 'common/**'
|
|
- 'Cargo.lock'
|
|
- 'Cargo.toml'
|
|
- '.github/workflows/ci-contracts.yml'
|
|
|
|
jobs:
|
|
build:
|
|
# since it's going to be compiled into wasm, there's absolutely
|
|
# no point in running CI on different OS-es
|
|
runs-on: arc-linux-latest
|
|
env:
|
|
CARGO_TERM_COLOR: always
|
|
RUSTUP_PERMIT_COPY_RENAME: 1
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
|
|
- name: Setup rust
|
|
uses: actions-rs/toolchain@v1
|
|
with:
|
|
profile: minimal
|
|
# pinned due to issues building contracts
|
|
toolchain: 1.86.0
|
|
target: wasm32-unknown-unknown
|
|
override: true
|
|
components: rustfmt, clippy
|
|
|
|
- name: Install cosmwasm-check
|
|
run: cargo install cosmwasm-check
|
|
|
|
- name: Install wasm-opt
|
|
uses: ./.github/actions/install-wasm-opt
|
|
with:
|
|
version: '114'
|
|
|
|
- name: Build contracts
|
|
uses: actions-rs/cargo@v1
|
|
env:
|
|
RUSTFLAGS: '-C link-arg=-s'
|
|
with:
|
|
command: build
|
|
args: --manifest-path contracts/Cargo.toml --workspace --lib --target wasm32-unknown-unknown
|
|
|
|
- name: Run unit tests
|
|
uses: actions-rs/cargo@v1
|
|
with:
|
|
command: test
|
|
args: --lib --manifest-path contracts/Cargo.toml --all-features
|
|
|
|
- name: Check formatting
|
|
uses: actions-rs/cargo@v1
|
|
with:
|
|
command: fmt
|
|
args: --manifest-path contracts/Cargo.toml --all -- --check
|
|
|
|
- name: Run clippy
|
|
uses: actions-rs/cargo@v1
|
|
with:
|
|
command: clippy
|
|
args: --lib --manifest-path contracts/Cargo.toml --workspace --all-targets -- -D warnings
|
|
|
|
- name: Check chain compatibility against release build
|
|
# this will build contracts in release mode, run wasm-opt and finally cosmwasm-check
|
|
run: make contracts
|