33992542b1
* updated contracts to cosmwasm2.2 and fixed build issues * removed old coconut contract code + additional dkg fixes * replace deprecated to_binary and from_binary functions * mixnet contract tests compiling some are failing due to incorrect addresses * made other contract tests compile * fixed remaining tests * allow usage of manually dispatching contract replies * nym-api test fixes * removed old toolchain from contracts CI * linter fixes * regenerated contract schema * fixed easy_addr * further license fixes * post rebase fixes + update to 2.2.2 * change ci runner * minor CI adjustments * change wallet CI to use node 20 * more CI changes... * run cosmwasm-check against release contracts * test ci changes * wip...
72 lines
1.9 KiB
YAML
72 lines
1.9 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: ubuntu-20.04
|
|
env:
|
|
CARGO_TERM_COLOR: always
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Setup rust
|
|
uses: actions-rs/toolchain@v1
|
|
with:
|
|
profile: minimal
|
|
toolchain: stable
|
|
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
|
|
|
|
- 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
|