-
Notifications
You must be signed in to change notification settings - Fork 82
62 lines (54 loc) · 1.62 KB
/
cw-check.yaml
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
55
56
57
58
59
60
61
62
name: CosmWasm Compilation Check
on:
pull_request:
paths:
- .github/workflows/cw-check.yaml
- Makefile
- '*.toml'
- Cargo.lock
- ci/cw-check/**
- 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.16.0 ./ci/cw-check
- name: Fix permissions
run: |
sudo chown -R $(id -u):$(id -g) "$(pwd)"/target
sudo chown -R $(id -u):$(id -g) "${HOME}/.cargo/registry"
- name: Install `cosmwasm-check` from crates.io
uses: baptiste0928/cargo-install@v3
with:
crate: cosmwasm-check
- name: Check compiled CosmWasm contract
working-directory: artifacts
run: |
sha256sum -c checksums.txt
cosmwasm-check cw_check.wasm