-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Fix: workspace dir * List optimized artifacts * Use bash for metacharacters expansion * Use relative path for upload artifact * Remove failing push to S3 job * Disable on pull for performance
- Loading branch information
Showing
2 changed files
with
11 additions
and
28 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 |
---|---|---|
@@ -1,46 +1,27 @@ | ||
name: babylonchain/babylon-contract/wasm-tests-WIP | ||
name: babylonchain/babylon-contract/wasm-tests | ||
on: | ||
push: | ||
branches: [ "disabled" ] | ||
pull_request: | ||
branches: [ "disabled" ] | ||
branches: [ "main" ] | ||
env: | ||
CARGO_TERM_COLOR: always | ||
AWS_ACCESS_KEY_ID: xxxxYKF5 | ||
AWS_REGION: xxxxst-1 | ||
AWS_SECRET_ACCESS_KEY: xxxxmvcn | ||
S3_BUCKET_PREFIX: xxxxract | ||
WORKSPACE: "/home/runner/work/babylon-contract/babylon-contract" | ||
jobs: | ||
wasm-build-check-integration: | ||
runs-on: ubuntu-latest | ||
container: | ||
image: rust:1.78.0 | ||
steps: | ||
- uses: actions/[email protected] | ||
- name: Build optimised Wasm binaries | ||
run: "./scripts/build-optimizer-ci.sh" | ||
- name: List optimised Wasm binaries | ||
run: bash -c "ls $WORKSPACE/artifacts/*.wasm" | ||
- name: Install cosmwasm-check | ||
run: cargo install --locked --debug --version ^2.0 cosmwasm-check | ||
- name: Check the Wasm binaries' validity | ||
run: cosmwasm-check /__w/babylon-contract/babylon-contract/artifacts/*.wasm | ||
run: bash -c "cosmwasm-check $WORKSPACE/artifacts/*.wasm" | ||
- name: Integration tests based on CosmWasm | ||
run: cargo test --test integration | ||
- uses: actions/[email protected] | ||
with: | ||
path: |- | ||
./artifacts/babylon_contract.wasm | ||
./artifacts/btc_staking.wasm | ||
push-to-s3: | ||
runs-on: ubuntu-latest | ||
needs: | ||
- wasm-build-check-integration | ||
steps: | ||
- uses: actions/[email protected] | ||
with: | ||
path: "/tmp" | ||
- uses: aws-actions/[email protected] | ||
with: | ||
aws-region: "${{ env.AWS_REGION }}" | ||
aws-access-key-id: "${{ secrets.AWS_ACCESS_KEY_ID }}" | ||
aws-secret-access-key: "${{ secrets.AWS_SECRET_ACCESS_KEY }}" | ||
- run: aws s3 cp /tmp/babylon_contract.wasm $S3_BUCKET_PREFIX/${{ github.repository }}-${{ github.sha }}.wasm | ||
artifacts/babylon_contract.wasm | ||
artifacts/btc_staking.wasm |
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