This repository has been archived by the owner on May 16, 2024. It is now read-only.
v0.6.5 - ink! 3.4.0 #283
Workflow file for this run
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: Build and save DDC SC binaries | |
on: [push, release] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install latest nightly | |
uses: actions-rust-lang/setup-rust-toolchain@v1 | |
with: | |
toolchain: nightly | |
target: x86_64-unknown-linux-gnu | |
components: rustfmt, clippy | |
- name: Install dependencies | |
run: | | |
rustup target add wasm32-unknown-unknown --toolchain nightly | |
rustup component add rust-src --toolchain nightly-unknown-linux-gnu | |
sudo apt-get install binaryen | |
cargo install cargo-contract --version ^0.14 --force --locked | |
- name: Run tests | |
run: | | |
RUSTFLAGS=-Awarnings cargo test | |
- name: Build contract | |
run: | | |
cargo contract build --release --manifest-path bucket/Cargo.toml | |
- name: Create names linked to commit | |
run: | | |
ddc_contract_name=ddc.${GITHUB_SHA:0:7}.contract | |
echo DDC_CONTRACT_NAME=$ddc_contract_name >> $GITHUB_ENV | |
ddc_wasm_name=ddc.${GITHUB_SHA:0:7}.wasm | |
echo DDC_WASM_NAME=$ddc_wasm_name >> $GITHUB_ENV | |
ddc_metadata_name=ddc.${GITHUB_SHA:0:7}.json | |
echo DDC_METADATA_NAME=$ddc_metadata_name >> $GITHUB_ENV | |
- name: Upload contract artifact | |
uses: actions/[email protected] | |
with: | |
name: ${{ env.DDC_CONTRACT_NAME }} | |
path: ./target/ink/ddc_bucket/ddc_bucket.contract | |
- name: Upload wasm artifact | |
uses: actions/[email protected] | |
with: | |
name: ${{ env.DDC_WASM_NAME }} | |
path: ./target/ink/ddc_bucket/ddc_bucket.wasm | |
- name: Upload metadata artifact | |
uses: actions/[email protected] | |
with: | |
name: ${{ env.DDC_METADATA_NAME }} | |
path: ./target/ink/ddc_bucket/metadata.json |