Unverified Commit b8284168 authored by Michael Müller's avatar Michael Müller Committed by GitHub
Browse files

Build entire `delegator` example in CI (#762)

* Build entire `delegator` example in CI

* Test sub-contracts as well

* Refactor stage

* Fix array

* Fix paths
parent 641fd380
Pipeline #134508 passed with stages
in 43 minutes and 27 seconds
......@@ -23,6 +23,7 @@ variables:
# this var is changed to "-:staging" when the CI image gets rebuilt
# read more https://github.com/paritytech/scripts/pull/244
ALL_CRATES: "${PURELY_STD_CRATES} ${ALSO_WASM_CRATES}"
DELEGATOR_SUBCONTRACTS: "accumulator adder subber"
workflow:
rules:
......@@ -234,6 +235,9 @@ examples-test:
- for example in examples/*/; do
cargo test --verbose --manifest-path ${example}/Cargo.toml;
done
- for contract in ${DELEGATOR_SUBCONTRACTS}; do
cargo test --verbose --manifest-path examples/delegator/${contract}/Cargo.toml;
done
examples-fmt:
stage: examples
......@@ -242,6 +246,9 @@ examples-fmt:
- for example in examples/*/; do
cargo fmt --verbose --manifest-path ${example}/Cargo.toml -- --check;
done
- for contract in ${DELEGATOR_SUBCONTRACTS}; do
cargo fmt --verbose --manifest-path examples/delegator/${contract}/Cargo.toml -- --check;
done
examples-clippy-std:
stage: examples
......@@ -253,6 +260,9 @@ examples-clippy-std:
- for example in examples/*/; do
cargo clippy --verbose --manifest-path ${example}/Cargo.toml -- -D warnings;
done
- for contract in ${DELEGATOR_SUBCONTRACTS}; do
cargo clippy --verbose --manifest-path examples/delegator/${contract}/Cargo.toml -- -D warnings;
done
examples-clippy-wasm:
stage: examples
......@@ -261,6 +271,9 @@ examples-clippy-wasm:
- for example in examples/*/; do
cargo clippy --verbose --manifest-path ${example}/Cargo.toml --no-default-features --target wasm32-unknown-unknown -- -D warnings;
done
- for contract in ${DELEGATOR_SUBCONTRACTS}; do
cargo clippy --verbose --manifest-path examples/delegator/${contract}/Cargo.toml --no-default-features --target wasm32-unknown-unknown -- -D warnings;
done
examples-contract-build:
stage: examples
......@@ -272,6 +285,18 @@ examples-contract-build:
cargo contract build &&
popd;
done
- for contract in ${DELEGATOR_SUBCONTRACTS}; do
pushd examples/delegator/$contract &&
cargo contract build &&
popd;
done
examples-contract-build-delegator:
stage: examples
<<: *docker-env
script:
- cargo contract -V
- cd examples/delegator/ && ./build-all.sh
examples-docs:
stage: examples
......@@ -286,6 +311,9 @@ examples-docs:
- for example in examples/*/; do
cargo doc --manifest-path ${example}/Cargo.toml --document-private-items --verbose --no-deps;
done
- for contract in ${DELEGATOR_SUBCONTRACTS}; do
cargo doc --manifest-path examples/delegator/${contract}/Cargo.toml --document-private-items --verbose --no-deps;
done
#### stage: publish
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment