Fix rust-analyzer warnings (#3974) #127
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
name: ci-contracts-upload-binaries | |
on: | |
workflow_dispatch: | |
push: | |
paths: | |
- 'common/**' | |
- 'contracts/**' | |
pull_request: | |
paths: | |
- 'common/**' | |
- 'contracts/**' | |
env: | |
NETWORK: mainnet | |
jobs: | |
publish-nym-contracts: | |
strategy: | |
fail-fast: false | |
matrix: | |
platform: [ubuntu-20.04] | |
runs-on: ${{ matrix.platform }} | |
env: | |
CARGO_TERM_COLOR: always | |
# a push event from the origin repo, or a PR from external repo | |
if: ${{ github.event_name == 'push' || github.event.pull_request.head.repo.full_name != 'nymtech/nym' }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Prepare build output directory | |
shell: bash | |
env: | |
OUTPUT_DIR: ci-contract-builds/${{ github.ref_name }} | |
run: | | |
rm -rf ci-contract-builds || true | |
mkdir -p $OUTPUT_DIR | |
echo $OUTPUT_DIR | |
- name: Install Dependencies (Linux) | |
run: sudo apt-get update && sudo apt-get -y install libwebkit2gtk-4.0-dev build-essential curl wget libssl-dev libgtk-3-dev libudev-dev squashfs-tools protobuf-compiler | |
continue-on-error: true | |
- name: Install Rust stable | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: 1.69.0 | |
target: wasm32-unknown-unknown | |
override: true | |
- name: Install wasm-opt | |
run: cargo install --version 0.112.0 wasm-opt | |
- name: Build release contracts | |
run: make contracts | |
- name: Prepare build output | |
shell: bash | |
env: | |
OUTPUT_DIR: ci-contract-builds/${{ github.ref_name }} | |
run: | | |
cp contracts/target/wasm32-unknown-unknown/release/mixnet_contract.wasm $OUTPUT_DIR | |
cp contracts/target/wasm32-unknown-unknown/release/vesting_contract.wasm $OUTPUT_DIR | |
cp contracts/target/wasm32-unknown-unknown/release/nym_coconut_bandwidth.wasm $OUTPUT_DIR | |
cp contracts/target/wasm32-unknown-unknown/release/nym_coconut_dkg.wasm $OUTPUT_DIR | |
cp contracts/target/wasm32-unknown-unknown/release/cw3_flex_multisig.wasm $OUTPUT_DIR | |
cp contracts/target/wasm32-unknown-unknown/release/cw4_group.wasm $OUTPUT_DIR | |
cp contracts/target/wasm32-unknown-unknown/release/nym_service_provider_directory.wasm $OUTPUT_DIR | |
cp contracts/target/wasm32-unknown-unknown/release/nym_name_service.wasm $OUTPUT_DIR | |
cp contracts/target/wasm32-unknown-unknown/release/nym_ephemera.wasm $OUTPUT_DIR | |
- name: Deploy branch to CI www | |
continue-on-error: true | |
uses: easingthemes/ssh-deploy@main | |
env: | |
SSH_PRIVATE_KEY: ${{ secrets.CI_WWW_SSH_PRIVATE_KEY }} | |
ARGS: "-avzr" | |
SOURCE: "ci-contract-builds/" | |
REMOTE_HOST: ${{ secrets.CI_WWW_REMOTE_HOST }} | |
REMOTE_USER: ${{ secrets.CI_WWW_REMOTE_USER }} | |
TARGET: ${{ secrets.CI_WWW_REMOTE_TARGET }}/builds/ | |
EXCLUDE: "/dist/, /node_modules/" |