Skip to content

ci: update permission of artifacts directory during build #12

ci: update permission of artifacts directory during build

ci: update permission of artifacts directory during build #12

name: Cosmwasm Contracts Test Deployment
on:
push:
branches:
- "**"
# pull_request:
# branches:
# - main
# paths:
# - contracts/cosmwasm-vm/**
# - libraries/common/rust/**
# - .github/workflows/deploy-cosmwasm-contracts.yml
# - scripts/optimize-cosmwasm.sh
jobs:
Build:
name: Build & Deploy Cosmasm 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
- 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
make optimize-cosmwasm
- name: Deploy WASM
run: |
container=$(docker ps --format '{{.Names}}')
rm -rf artifacts/archway/cw_common.wasm
cp -r {artifacts,scripts/deploy_cosmwasm.sh} contracts/cosmwasm-vm/archway/contracts
docker ps -a
docker exec $container chmod +x /contracts/deploy_cosmwasm.sh
docker exec $container /contracts/deploy_cosmwasm.sh