Skip to content
This repository was archived by the owner on Nov 4, 2024. It is now read-only.

Commit

Permalink
Integrate rand-extension into ink-waterfall-ci
Browse files Browse the repository at this point in the history
  • Loading branch information
cmichi committed May 17, 2021
1 parent 3d903bd commit b0066f3
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions dockerfiles/ink-waterfall-ci/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,27 @@ RUN set -eux; \
# `--locked` ensures the project's `Cargo.lock` is used.
cargo install --git https://github.com/paritytech/canvas-node.git \
--locked --branch master && \
# We additionally install the `canvas-node` as `canvas-rand-extension`.
# this installation though is a modified `canvas-node`, so that ink!'s
# `rand-extension` chain extension example is included in the runtime.
# This enables us to test in the waterfall that the `rand-extension`
# integration with Substrate still works.
git clone --depth 1 https://github.com/paritytech/canvas-node.git && \
curl -s https://raw.githubusercontent.com/paritytech/ink/master/examples/rand-extension/runtime/chain-extension-example.rs \
>> canvas-node/runtime/src/lib.rs && \
sed -i 's/type ChainExtension = ();/type ChainExtension = FetchRandomExtension;/g' canvas-node/runtime/src/lib.rs && \
sed -i 's/name = "canvas"/name = "canvas-rand-extension"/g' canvas-node/node/Cargo.toml && \
cargo install --locked --path canvas-node/node/ && \
# versions
rustup show && \
cargo --version && \
cargo-contract --version && \
canvas --version && \
canvas-rand-extension --version && \
# Clean up and remove compilation artifacts that a cargo install creates (>250M).
rm -rf "${CARGO_HOME}/registry" "${CARGO_HOME}/git" /root/.cache/sccache && \
# Clean up artifacts of `canvas-rand-extension` installation
rm -rf canvas-node/ && \
# apt clean up
apt-get autoremove -y && \
apt-get clean && \
Expand Down

0 comments on commit b0066f3

Please sign in to comment.