-
Notifications
You must be signed in to change notification settings - Fork 106
74 lines (63 loc) · 2.05 KB
/
check_artifacts.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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
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.11.0
with:
access_token: ${{ github.token }}
- name: Checkout sources
uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: |
~/.cargo/bin
~/.cargo/git/checkouts
~/.cargo/git/db
~/.cargo/registry/cache
~/.cargo/registry/index
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Build Artifacts
run: |
docker run \
-v "$GITHUB_WORKSPACE":/code \
-v ~/.cargo/registry:/usr/local/cargo/registry \
-v ~/.cargo/git:/usr/local/cargo/git \
ghcr.io/astroport-fi/rust-optimizer:v0.15.1-astroport
- name: Save artifacts cache
uses: actions/cache/save@v3
with:
path: artifacts
key: ${{ runner.os }}-artifacts-${{ hashFiles('**/Cargo.lock') }}
- name: Check Artifacts Size
run: |
$GITHUB_WORKSPACE/scripts/check_artifacts_size.sh
cosmwasm-check:
runs-on: ubuntu-latest
name: Cosmwasm check
needs: check-artifacts-size
steps:
# We need this only to get Cargo.lock
- name: Checkout sources
uses: actions/checkout@v3
- name: Restore cached artifacts
uses: actions/cache/restore@v3
with:
path: artifacts
key: ${{ runner.os }}-artifacts-${{ hashFiles('**/Cargo.lock') }}
fail-on-cache-miss: true
- name: Install cosmwasm-check
# Uses --debug for compilation speed
run: cargo install --debug --version 1.4.0 cosmwasm-check
- name: Cosmwasm check
run: |
cosmwasm-check $GITHUB_WORKSPACE/artifacts/*.wasm --available-capabilities staking,cosmwasm_1_1,injective,neutron,iterator,stargate