Skip to content
This repository has been archived by the owner on May 16, 2024. It is now read-only.

DDC Bucket v1.0.0

DDC Bucket v1.0.0 #281

Workflow file for this run

name: Build and save DDC SC binaries
on: [push, release]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install compatible nightly toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: nightly-2023-02-07
target: x86_64-unknown-linux-gnu
components: rustfmt, clippy
- name: Install dependencies
run: |
rustup target add wasm32-unknown-unknown --toolchain nightly-2023-02-07
rustup component add rust-src --toolchain nightly-2023-02-07-unknown-linux-gnu
sudo apt-get install binaryen
cargo install cargo-dylint
cargo install dylint-link
cargo install cargo-contract --version 1.5.0 --force --locked
- name: Run tests
run: |
RUSTFLAGS=-Awarnings cargo +nightly-2023-02-07 test
- name: Build contract
run: |
cargo +nightly-2023-02-07 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