-
Notifications
You must be signed in to change notification settings - Fork 92
54 lines (47 loc) · 1.37 KB
/
cw-check.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
name: CosmWasm Compilation Check
on:
pull_request:
paths:
- .github/workflows/cw-check.yml
- Cargo.toml
- Cargo.lock
- ci/cw-check/**
- ci/**
- ibc/**
- ibc-core/**
- ibc-apps/**
- ibc-data-types/**
- ibc-clients/**
- ibc-primitives/**
- ibc-derive/**
push:
tags:
- v[0-9]+.*
branches:
- "release/*"
- main
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ !startsWith(github.ref, 'refs/tags/') && github.ref != 'refs/heads/main' }}
jobs:
cw-check:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
# only for caching cargo build artifacts from `cosmwasm/optimizer`
- uses: actions-rust-lang/setup-rust-toolchain@v1
- name: Create mount directories
run: mkdir -p "${HOME}/.cargo/registry" "$(pwd)"/target
- name: Compile `cw-check`
run: |
docker run \
-v "$(pwd)":/code \
-v "$(pwd)"/target:/target \
-v "${HOME}/.cargo/registry":/usr/local/cargo/registry \
cosmwasm/optimizer:0.15.1 ./ci/cw-check
- name: Install `cosmwasm-check` from crates.io
uses: baptiste0928/cargo-install@v3
with:
crate: cosmwasm-check
- name: Check compiled CosmWasm contract
run: cosmwasm-check artifacts/cw_check.wasm