forked from icon-project/IBC-Integration
-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (51 loc) · 1.8 KB
/
deploy-cosmwasm-contracts.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
name: Cosmwasm Contracts Test Deployment
on:
push:
branches:
- main
paths:
- contracts/cosmwasm-vm/**
- libraries/common/rust/**
- .github/workflows/deploy-cosmwasm-contracts.yml
- scripts/optimize-cosmwasm.sh
- scripts/archway/**
jobs:
Build:
name: Build & Deploy Cosmwasm Contracts
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v3
with:
submodules: true
- name: Start local Archway Blockchain
run: |
cp ./scripts/archway/docker_compose_archway.yaml .
docker compose -f docker_compose_archway.yaml up -d
docker logs archway-node-1
docker inspect archway-node-1
- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: 1.69.0
target: wasm32-unknown-unknown
override: true
profile: minimal
- name: Cache Rust dependencies
uses: Swatinem/rust-cache@v2
- name: Compile WASM
run: |
rustup component add rustfmt --toolchain 1.69.0-x86_64-unknown-linux-gnu
rustup component add clippy --toolchain 1.69.0-x86_64-unknown-linux-gnu
sudo chmod -R 777 artifacts
sudo chmod -R 777 scripts
# Build cosmwasm builder image
bash ./scripts/optimize-cosmwasm.sh
- name: Deploy WASM
run: |
container=$(docker ps --format '{{.Names}}')
docker exec $container sh -c "rm /contracts/*_latest.wasm;rm /contracts/cw_common*.wasm"
# cp -r {artifacts,scripts/deploy_cosmwasm.sh} contracts/cosmwasm-vm/archway/contracts
docker ps -a
docker exec $container chmod +x /opt/deploy_cosmwasm.sh
docker exec $container /opt/deploy_cosmwasm.sh