Skip to content

feat: use checked arithmetic in vesting contract #45

feat: use checked arithmetic in vesting contract

feat: use checked arithmetic in vesting contract #45

Workflow file for this run

name: continuous-integration/examples
on:
push:
branches:
- main
tags:
- v*
paths-ignore:
- 'README.md'
- '.gitlab-ci.yml'
pull_request:
branches:
- main
jobs:
check:
name: examples
strategy:
matrix:
platform:
- ubuntu_20_64_core
- macos-latest
toolchain:
- stable
job:
- contract build
- test
runs-on: ${{ matrix.platform }}
env:
MULTI_CONTRACT_CALLER_SUBCONTRACTS: "accumulator adder subber"
RUST_BACKTRACE: full
steps:
- name: Checkout sources & submodules
uses: actions/checkout@v3
with:
fetch-depth: 1
submodules: recursive
- name: Install toolchain
id: toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.toolchain }}
components: rust-src
override: true
- name: Rust Cache
uses: Swatinem/[email protected]
- name: Install `cargo-contract` `main`
uses: actions-rs/cargo@v1
with:
command: install
args: --git https://github.com/paritytech/cargo-contract.git
- name: Install cargo-dylint
uses: baptiste0928/cargo-install@bf6758885262d0e6f61089a9d8c8790d3ac3368f # v1.3.0
with:
crate: cargo-dylint
version: 1
- name: Install dylint-link
uses: baptiste0928/cargo-install@bf6758885262d0e6f61089a9d8c8790d3ac3368f # v1.3.0
with:
crate: dylint-link
version: 1
- name: Download and run latest `substrate-contracts-node` binary
if: runner.os == 'Linux'
run: |
curl -L -o substrate-contracts-node.zip 'https://gitlab.parity.io/parity/mirrors/substrate-contracts-node/-/jobs/artifacts/main/download?job=build-linux' && \
unzip substrate-contracts-node.zip && \
chmod +x artifacts/substrate-contracts-node-linux/substrate-contracts-node &&
./artifacts/substrate-contracts-node-linux/substrate-contracts-node -linfo,runtime::contracts=debug 2>&1 | tee /tmp/contracts-node.log &
- name: Download and run latest `substrate-contracts-node` binary
if: runner.os == 'macOS'
run: |
curl -L -o substrate-contracts-node.zip 'https://gitlab.parity.io/parity/mirrors/substrate-contracts-node/-/jobs/artifacts/main/download?job=build-mac' && \
unzip substrate-contracts-node.zip && \
chmod +x artifacts/substrate-contracts-node-mac/substrate-contracts-node &&
./artifacts/substrate-contracts-node-mac/substrate-contracts-node -linfo,runtime::contracts=debug 2>&1 | tee /tmp/contracts-node.log &
- name: Install and run latest `substrate-contracts-node` binary
if: runner.os == 'Windows'
run: |
cargo install contracts-node --git https://github.com/paritytech/substrate-contracts-node.git --force --locked && \
substrate-contracts-node -lruntime::contracts=debug 2>&1 | tee /tmp/contracts-node.log &
- name: Output versions
run: |
cargo -vV
cargo contract --version
- name: ${{ matrix.job }} examples on ${{ matrix.platform }}-${{ matrix.toolchain }}
if: runner.os == 'Windows'
run: |
$multi_contract_caller_subcontracts = "accumulator","adder","subber"
foreach ($contract in $multi_contract_caller_subcontracts) {
echo "Processing multi-contract-caller contract: $contract";
cargo ${{ matrix.job }} --verbose --manifest-path multi-contract-caller/${contract}/Cargo.toml;
}
cargo ${{ matrix.job }} --verbose --manifest-path set-code-hash/updated-incrementer/Cargo.toml;
cargo ${{ matrix.job }} --verbose --manifest-path conditional-compilation/Cargo.toml --features foo;
cargo ${{ matrix.job }} --verbose --manifest-path conditional-compilation/Cargo.toml --features bar;
cargo ${{ matrix.job }} --verbose --manifest-path conditional-compilation/Cargo.toml --features "foo, bar";
foreach ($example in Get-ChildItem -Directory "\*") {
if ($example -Match 'artifacts') { continue }
echo "Processing example: $example";
cargo ${{ matrix.job }} --verbose --manifest-path=$example/Cargo.toml;
cargo clean --manifest-path=$example/Cargo.toml;
}
- name: ${{ matrix.job }} examples on ${{ matrix.platform }}-${{ matrix.toolchain }}
if: runner.os != 'Windows'
run: |
for contract in ${MULTI_CONTRACT_CALLER_SUBCONTRACTS}; do
echo "Processing multi-contract-caller contract: $contract";
cargo ${{ matrix.job }} --verbose --manifest-path multi-contract-caller/${contract}/Cargo.toml;
done
cargo ${{ matrix.job }} --verbose --manifest-path=set-code-hash/updated-incrementer/Cargo.toml;
cargo ${{ matrix.job }} --verbose --manifest-path=conditional-compilation/Cargo.toml --features=foo;
cargo ${{ matrix.job }} --verbose --manifest-path=conditional-compilation/Cargo.toml --features=bar;
cargo ${{ matrix.job }} --verbose --manifest-path=conditional-compilation/Cargo.toml --features="foo, bar";
for example in ./*/; do
if [ "$example" = "./artifacts/" ]; then continue; fi;
echo "Processing example: $example";
cargo ${{ matrix.job }} --verbose --manifest-path=$example/Cargo.toml;
done