-
Notifications
You must be signed in to change notification settings - Fork 1
build: optimize dockerfile #4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
rm resolc.tar.gz && \ | ||
chmod +x resolc-x86_64-unknown-linux-musl && \ | ||
mv resolc-x86_64-unknown-linux-musl /usr/local/bin/resolc | ||
if [ "$TARGETARCH" = "amd64" ]; then \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ideally revive should provide an arm64 binary for usage within Docker on apple silicon. Simply ignored on non-amd64 platforms for now, which should only affect ink integration tests when built on a Mac AFAIK.
An issue can be opened on revive to add Linux arm64 builds so that it can be used within containers on a Mac.
aabde27
to
a4b2a16
Compare
Updates the `ci` Dockerfile to: - use the latest stable version of Rust (1.86) - standardise on a single version of nightly - use stable2503 release branch of the Polkadot SDK - allow (mostly) building on ARM platforms - split rustup and cargo install into separate layers for easier disk usage analysis - perform cleanup on each layer - use updated url for cargo-contract - merge the codecov tasks into a single layer
a4b2a16
to
7e33256
Compare
git clone https://github.com/paritytech/polkadot-sdk.git --depth 50 && \ | ||
cargo install --git https://github.com/use-ink/ink-node --branch main --force --locked && \ | ||
cargo install --git https://github.com/use-ink/cargo-contract --locked --branch master && \ | ||
git clone https://github.com/paritytech/polkadot-sdk.git -b ${POLKADOT_SDK_BRANCH} --depth 1 && \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A faster approach is to download from a GitHub source code archive at a specific commit and decompress. As these images are generated rarely, not sure its worth the effort.
cargo install --git https://github.com/paritytech/cargo-contract \ | ||
--locked --branch master && \ | ||
git clone https://github.com/paritytech/polkadot-sdk.git --depth 50 && \ | ||
cargo install --git https://github.com/use-ink/ink-node --branch main --force --locked && \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could be replaced with 'latest' prebuilt ink-node and cargo-contract binaries to speed things up.
Co-authored-by: David Semakula <[email protected]>
Updates the
ci
Dockerfile to:stable
as the default toolchainNote:
Comments have been left as a guide.