Skip to content

Commit

Permalink
build cw-contract on ci
Browse files Browse the repository at this point in the history
  • Loading branch information
rnbguy committed Jul 29, 2024
1 parent d2fe97d commit 496eef0
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Rust
on:
pull_request:
paths:
- .github/workflows/rust.yaml
- contracts/**
- light-client/**
- "**/Cargo.toml"
- "**/Cargo.lock"
- justfile
- README.md

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' }}

env:
CARGO_INCREMENTAL: 0
CARGO_PROFILE_DEV_DEBUG: 1
CARGO_PROFILE_RELEASE_DEBUG: 1
CARGO_NET_RETRY: 10
RUSTUP_MAX_RETRIES: 10

jobs:
build-cw-contract:
name: Build CosmWasm Light Client Contract
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@v4
- name: Install Rust toolchains
uses: actions-rust-lang/setup-rust-toolchain@v1
- name: Install Just
uses: extractions/setup-just@v1
- name: Build CosmWasm light client contract
run: just build-cw-contract
3 changes: 3 additions & 0 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ install-tools:
rustup component add rustfmt --toolchain nightly
cargo install typos-cli taplo-cli

build-cw-contract:
cd ./light-client/cw-contract && cargo build --target wasm32-unknown-unknown

# Runs formatter and clippy for all the cargo and scarb packages
lint:
@cargo +nightly fmt --all -- --check && \
Expand Down

0 comments on commit 496eef0

Please sign in to comment.