forked from many-things/cw-hyperlane
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Sync many-things/main --------- Co-authored-by: nambrot <nambrot@googlemail.com> Co-authored-by: ByeongSu Hong <hong@byeongsu.dev>
- Loading branch information
1 parent
94fed0f
commit c4485e0
Showing
8 changed files
with
108 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
name: pr | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- "main" | ||
|
||
jobs: | ||
artifact: | ||
permissions: | ||
contents: write | ||
pull-requests: write | ||
|
||
name: artifact | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Install Rust | ||
run: | | ||
rustup toolchain install 1.72 \ | ||
--profile minimal \ | ||
--target wasm32-unknown-unknown \ | ||
--no-self-update | ||
- name: Cache dependencies | ||
uses: Swatinem/rust-cache@v2 | ||
|
||
- name: Install Deps | ||
run: make install-prod | ||
|
||
- name: Setup Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: Build wasm | ||
run: | | ||
cargo generate-lockfile | ||
make ci-build | ||
- name: Pull request artifacts | ||
uses: gavv/pull-request-artifacts@v2 | ||
with: | ||
commit: ${{ github.event.pull_request.head.sha }} | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
artifacts-branch: artifacts | ||
artifacts: | | ||
wasm_codes.zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,38 @@ | ||
PWD:=$(shell pwd) | ||
BASE:=$(shell basename "$(PWD)") | ||
|
||
clean: | ||
@cargo clean | ||
@rm -rf ./artifacts | ||
|
||
install: | ||
cargo install --force cw-optimizoor cosmwasm-check beaker | ||
install: install-dev | ||
|
||
install-dev: install-prod | ||
cargo install --force cw-optimizoor beaker | ||
|
||
install-prod: | ||
cargo install --force cosmwasm-check | ||
rustup target add wasm32-unknown-unknown | ||
|
||
schema: | ||
ls ./contracts | xargs -n 1 -t beaker wasm ts-gen | ||
|
||
build: | ||
cargo build | ||
cargo wasm | ||
check: | ||
ls -d ./artifacts/*.wasm | xargs -I x cosmwasm-check x | ||
|
||
optimize: | ||
docker run --rm -v "$(PWD)":/code \ | ||
--mount type=volume,source="$(BASE)_cache",target=/code/target \ | ||
--mount type=volume,source=registry_cache,target=/usr/local/cargo/registry \ | ||
cosmwasm/optimizer:0.15.0 | ||
|
||
optimize-fast: | ||
cargo cw-optimizoor | ||
rename --force 's/(.*)-(.*)\.wasm/$$1\.wasm/d' artifacts/* | ||
|
||
check: build | ||
ls -d ./artifacts/*.wasm | xargs -I x cosmwasm-check x | ||
build: optimize-fast check | ||
cargo build | ||
cargo wasm | ||
|
||
ci-build: check | ||
ci-build: optimize check | ||
zip -jr wasm_codes.zip artifacts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,6 @@ pub mod contract; | |
mod error; | ||
mod event; | ||
pub mod execute; | ||
mod proto; | ||
pub mod query; | ||
|
||
#[cfg(test)] | ||
|
This file was deleted.
Oops, something went wrong.