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

Commit 9057a55

Browse files
authored
Update solang and canvas-node in contracts CI image (#237)
* change (dockerfile): remove solang from contracts image * change (dockerfile): remove canvas-node since it fails to compile now * change (dockerfile): add gpg key for llvm * change (dockerfile): update metadata * change (CI): add canvas-node bin, new solang version * change (CI): return zlib1g-dev * change (dockerfile): adddefault shell * image: add python3 and update solang * image: downgrade solang
1 parent d0f2b55 commit 9057a55

File tree

3 files changed

+24
-8
lines changed

3 files changed

+24
-8
lines changed

dockerfiles/contracts-ci-linux/Dockerfile

+21-7
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,21 @@ LABEL io.parity.image.authors="[email protected]" \
99
io.parity.image.vendor="Parity Technologies" \
1010
io.parity.image.title="${REGISTRY_PATH}/contracts-ci-linux" \
1111
io.parity.image.description="Inherits from base-ci-linux:latest. \
12-
llvm-8-dev, clang-8, zlib1g-dev, npm, yarn, wabt, unzip. \
13-
rust nightly, rustfmt, rust-src" \
12+
llvm-8-dev, clang-8, python3, zlib1g-dev, npm, yarn, wabt. \
13+
rust nightly, rustfmt, rust-src, solang, canvas-node" \
1414
io.parity.image.source="https://github.com/paritytech/scripts/blob/${VCS_REF}/\
1515
dockerfiles/contracts-ci-linux/Dockerfile" \
1616
io.parity.image.documentation="https://github.com/paritytech/scripts/blob/${VCS_REF}/\
1717
dockerfiles/contracts-ci-linux/README.md" \
1818
io.parity.image.revision="${VCS_REF}" \
1919
io.parity.image.created="${BUILD_DATE}"
2020

21+
WORKDIR /builds
22+
23+
ENV SHELL /bin/bash
24+
25+
ENV CXX="/usr/bin/clang++-8"
26+
2127
# copy llvm and yarn repo key
2228
COPY utility/debian-llvm-clang.key /etc/apt/trusted.gpg.d/debian-archive-llvm.gpg
2329
COPY utility/yarn.key /etc/apt/trusted.gpg.d/debian-yarn.gpg
@@ -33,24 +39,32 @@ RUN set -eux; \
3339
apt-get -y update; \
3440
apt-get remove -y --purge clang; \
3541
apt-get install -y --no-install-recommends \
36-
llvm-8-dev clang-8 zlib1g-dev npm yarn wabt unzip; \
37-
# set a link to clang-8
42+
zlib1g-dev llvm-8-dev clang-8 python3 npm yarn wabt; \
43+
# set links to clang-8 and python3
44+
update-alternatives --install /usr/bin/python python /usr/bin/python3 100; \
3845
update-alternatives --install /usr/bin/clang clang /usr/bin/clang-8 100; \
3946
update-alternatives --install /usr/bin/cc cc /usr/bin/clang-8 100; \
47+
update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++-8 100; \
4048
# Installs the latest common nightly for the listed components,
4149
# adds those components, wasm target and sets the profile to minimal
4250
rustup toolchain install nightly --target wasm32-unknown-unknown \
43-
--profile minimal --component rustfmt rust-src; \
51+
--profile minimal --component rustfmt rust-src; \
4452
rustup default nightly; \
4553
cargo install pwasm-utils-cli --bin wasm-prune; \
4654
cargo install cargo-contract; \
47-
cargo install --git https://github.com/hyperledger-labs/solang --tag m7; \
48-
cargo install --git https://github.com/paritytech/canvas-node --tag v0.1.2; \
55+
# tried v0.1.5 and the latest master - both fail with https://github.com/hyperledger-labs/solang/issues/314
56+
cargo install --git https://github.com/hyperledger-labs/solang --tag v0.1.2; \
57+
# download the latest canvas-node binary
58+
curl -L "https://gitlab.parity.io/parity/canvas-node/-/jobs/artifacts/master/raw/artifacts/canvas/canvas?job=build" \
59+
-o /usr/local/cargo/bin/canvas; \
60+
chmod +x /usr/local/cargo/bin/canvas; \
4961
# versions
5062
yarn --version; \
5163
rustup show; \
5264
cargo --version; \
5365
solang --version; \
66+
canvas --version; \
67+
python --version; \
5468
# cargo clean up
5569
# removes compilation artifacts cargo install creates (>250M)
5670
rm -rf "${CARGO_HOME}/registry" "${CARGO_HOME}/git" /root/.cache/sccache; \

dockerfiles/contracts-ci-linux/README.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ Used to build and test contracts!.
99
- `llvm-8-dev`
1010
- `clang-8`
1111
- `zlib1g-dev`
12+
- `python3`
1213
- `npm`
1314
- `yarn`
1415
- `wabt`
15-
- `unzip`
1616

1717
**Inherited from `<base-ci-linux:latest>`:**
1818

@@ -40,6 +40,7 @@ We always try to use the [latest possible](https://rust-lang.github.io/rustup-co
4040
- `cargo-contract`
4141
- `pwasm-utils-cli`
4242
- `solang`
43+
- `canvas-node`
4344
- `wasm32-unknown-unknown`: The toolchain to compile Rust codebases for Wasm.
4445

4546
[Click here](https://hub.docker.com/repository/docker/paritytech/contracts-ci-linux) for the registry.

dockerfiles/ink-ci-linux/Dockerfile

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ dockerfiles/ink-ci-linux/README.md" \
1818
io.parity.image.created="${BUILD_DATE}"
1919

2020
WORKDIR /builds
21+
2122
ENV SHELL /bin/bash
2223

2324
RUN set -eux; \

0 commit comments

Comments
 (0)