-
Notifications
You must be signed in to change notification settings - Fork 600
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
697 changed files
with
30,674 additions
and
5,259 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 |
---|---|---|
|
@@ -4,7 +4,6 @@ docs/ | |
networks/ | ||
proto/ | ||
scripts/ | ||
tests/ | ||
tools/ | ||
.github/ | ||
.git/ | ||
|
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 |
---|---|---|
|
@@ -12,15 +12,15 @@ on: | |
|
||
jobs: | ||
test: | ||
name: Test Suite | ||
name: Test Cosmwasm Contracts | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
contract: [{workdir: ./x/ibc-rate-limit/, output: testdata/rate_limiter.wasm, build: artifacts/rate_limiter-x86_64.wasm, name: rate_limiter}] | ||
contract: [{workdir: ./x/ibc-rate-limit/, output: bytecode/rate_limiter.wasm, build: artifacts/rate_limiter.wasm, name: rate_limiter}] | ||
|
||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v2 | ||
uses: actions/checkout@v3 | ||
- uses: technote-space/[email protected] | ||
with: | ||
PATTERNS: | | ||
|
@@ -29,51 +29,47 @@ jobs: | |
go.mod | ||
**/**cargo.toml | ||
- name: Install toolchain | ||
uses: actions-rs/toolchain@v1 | ||
uses: dtolnay/rust-toolchain@1.65.0 | ||
with: | ||
toolchain: nightly | ||
target: wasm32-unknown-unknown | ||
|
||
- name: Add the wasm target | ||
working-directory: ${{ matrix.contract.workdir }} | ||
run: > | ||
rustup target add wasm32-unknown-unknown; | ||
- name: Build | ||
working-directory: ${{ matrix.contract.workdir }} | ||
run: > | ||
cargo build --release --target wasm32-unknown-unknown | ||
- name: Test | ||
working-directory: ${{ matrix.contract.workdir }} | ||
run: > | ||
cargo test | ||
- name: Set latest cw-optimizoor version | ||
run: > | ||
echo "CW_OPTIMIZOOR_VERSION=`cargo search cw-optimizoor -q | cut -d '"' -f 2`" >> $GITHUB_ENV | ||
- name: Cache cw-optimizoor | ||
id: cache-cw-optimizoor | ||
uses: actions/cache@v3 | ||
env: | ||
cache-name: cache-cw-optimizoor | ||
with: | ||
# cargo bin files are stored in `~/.cargo/bin/` on Linux/macOS | ||
path: ~/.cargo/bin/cargo-cw-optimizoor | ||
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ env.CW_OPTIMIZOOR_VERSION }} | ||
|
||
- if: ${{ steps.cache-cw-optimizoor.outputs.cache-hit != 'true' }} | ||
name: Install cw-optimizoor | ||
continue-on-error: true | ||
run: > | ||
cargo install cw-optimizoor | ||
# - name: Set latest cw-optimizoor version | ||
# run: > | ||
# echo "CW_OPTIMIZOOR_VERSION=0.8.0" >> $GITHUB_ENV | ||
# | ||
# - name: Cache cw-optimizoor | ||
# id: cache-cw-optimizoor | ||
# uses: actions/cache@v3 | ||
# env: | ||
# cache-name: cache-cw-optimizoor | ||
# with: | ||
# # cargo bin files are stored in `~/.cargo/bin/` on Linux/macOS | ||
# path: ~/.cargo/bin/cargo-cw-optimizoor | ||
# key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ env.CW_OPTIMIZOOR_VERSION }} | ||
# | ||
# - if: ${{ steps.cache-cw-optimizoor.outputs.cache-hit != 'true' }} | ||
# name: Install cw-optimizoor | ||
# continue-on-error: true | ||
# run: > | ||
# cargo install cw-optimizoor | ||
|
||
- name: Optimize | ||
working-directory: ${{ matrix.contract.workdir }} | ||
run: > | ||
cargo cw-optimizoor | ||
docker run --rm -v "$(pwd)":/code \ | ||
--mount type=volume,source="$(basename "$(pwd)")_cache",target=/code/target \ | ||
--mount type=volume,source=registry_cache,target=/usr/local/cargo/registry \ | ||
cosmwasm/workspace-optimizer:0.12.10 | ||
- name: 'Upload optimized contract artifact' | ||
uses: actions/upload-artifact@v3 | ||
|
@@ -82,6 +78,13 @@ jobs: | |
path: ${{ matrix.contract.workdir }}${{ matrix.contract.build }} | ||
retention-days: 1 | ||
|
||
- name: 'Upload Cargo.lock artifact' | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: Cargo.lock | ||
path: ${{ matrix.contract.workdir }}Cargo.lock | ||
retention-days: 1 | ||
|
||
- name: Check Test Data | ||
working-directory: ${{ matrix.contract.workdir }} | ||
if: ${{ matrix.contract.output != null }} | ||
|
@@ -98,17 +101,14 @@ jobs: | |
|
||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v2 | ||
uses: actions/checkout@v3 | ||
- uses: technote-space/[email protected] | ||
with: | ||
PATTERNS: | | ||
**/**.rs | ||
- name: Install toolchain | ||
uses: actions-rs/toolchain@v1 | ||
uses: dtolnay/rust-toolchain@1.65.0 | ||
with: | ||
profile: minimal | ||
toolchain: stable | ||
override: true | ||
components: rustfmt, clippy | ||
|
||
- name: Format | ||
|
Oops, something went wrong.