This repository has been archived by the owner on Jan 13, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* ci: remove unnecessary args from docker-run.sh * ci: remove cargo uninstall from buildkite post checkout * ci: reorg docker images * ci: add mscgen for docs
- Loading branch information
Showing
4 changed files
with
121 additions
and
86 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,21 @@ | ||
FROM solanalabs/rust:1.73.0 | ||
|
||
ARG date | ||
ARG GRCOV_VERSION=v0.8.18 | ||
|
||
RUN set -x \ | ||
&& rustup install nightly-$date \ | ||
&& rustup component add clippy --toolchain=nightly-$date \ | ||
&& rustup component add rustfmt --toolchain=nightly-$date \ | ||
&& rustup show \ | ||
&& rustc --version \ | ||
&& cargo --version \ | ||
&& cargo install grcov \ | ||
&& rustc +nightly-$date --version \ | ||
&& cargo +nightly-$date --version \ | ||
# codecov | ||
&& curl -Os https://uploader.codecov.io/latest/linux/codecov \ | ||
&& chmod +x codecov \ | ||
&& mv codecov /usr/bin | ||
RUN \ | ||
rustup install nightly-$date && \ | ||
rustup component add clippy --toolchain=nightly-$date && \ | ||
rustup component add rustfmt --toolchain=nightly-$date && \ | ||
rustup show && \ | ||
rustc --version && \ | ||
cargo --version && \ | ||
# grcov | ||
curl -LOsS "https://github.com/mozilla/grcov/releases/download/$GRCOV_VERSION/grcov-x86_64-unknown-linux-musl.tar.bz2" && \ | ||
tar -xf grcov-x86_64-unknown-linux-musl.tar.bz2 && \ | ||
mv ./grcov $CARGO_HOME/bin && \ | ||
rm grcov-x86_64-unknown-linux-musl.tar.bz2 && \ | ||
# codecov | ||
curl -Os https://uploader.codecov.io/latest/linux/codecov && \ | ||
chmod +x codecov && \ | ||
mv codecov /usr/bin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,55 +1,105 @@ | ||
# Note: when the rust version is changed also modify | ||
# ci/rust-version.sh to pick up the new image tag | ||
FROM rust:1.73.0-bullseye | ||
FROM ubuntu:20.04 | ||
|
||
ARG NODE_MAJOR=18 | ||
ARG \ | ||
RUST_VERSION=1.73.0 \ | ||
GOLANG_VERSION=1.21.3 \ | ||
NODE_MAJOR=18 \ | ||
SCCACHE_VERSION=v0.5.4 | ||
|
||
RUN set -x \ | ||
&& apt update \ | ||
&& apt-get install apt-transport-https \ | ||
&& echo deb https://apt.buildkite.com/buildkite-agent stable main > /etc/apt/sources.list.d/buildkite-agent.list \ | ||
&& apt-key adv --no-tty --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 32A37959C2FA5C3C99EFBC32A79206696452D198 \ | ||
&& apt update \ | ||
&& apt install -y \ | ||
buildkite-agent \ | ||
clang \ | ||
cmake \ | ||
jq \ | ||
lcov \ | ||
libudev-dev \ | ||
mscgen \ | ||
nodejs \ | ||
net-tools \ | ||
rsync \ | ||
sudo \ | ||
golang \ | ||
unzip \ | ||
lld \ | ||
protobuf-compiler \ | ||
\ | ||
&& apt remove -y libcurl4-openssl-dev \ | ||
# node | ||
&& sudo apt-get update \ | ||
&& sudo apt-get install -y ca-certificates curl gnupg \ | ||
&& sudo mkdir -p /etc/apt/keyrings \ | ||
&& curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg \ | ||
&& echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | sudo tee /etc/apt/sources.list.d/nodesource.list \ | ||
&& sudo apt-get update \ | ||
&& sudo apt-get install nodejs -y \ | ||
&& node --version \ | ||
&& npm --version \ | ||
# rust | ||
&& rustup component add rustfmt \ | ||
&& rustup component add clippy \ | ||
&& rustup target add wasm32-unknown-unknown \ | ||
&& cargo install cargo-audit \ | ||
&& cargo install cargo-hack \ | ||
&& cargo install cargo-sort \ | ||
&& cargo install mdbook \ | ||
&& cargo install mdbook-linkcheck \ | ||
&& cargo install svgbob_cli \ | ||
&& cargo install wasm-pack \ | ||
&& cargo install sccache \ | ||
&& rustc --version \ | ||
&& cargo --version \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
SHELL ["/bin/bash", "-o", "pipefail", "-c"] | ||
|
||
ENV \ | ||
DEBIAN_FRONTEND=noninteractive \ | ||
TZ=UTC | ||
|
||
# golang | ||
ENV PATH="/usr/local/go/bin:$PATH" | ||
|
||
# rust | ||
ENV \ | ||
RUSTUP_HOME=/usr/local/rustup \ | ||
CARGO_HOME=/usr/local/cargo \ | ||
PATH="$PATH:/usr/local/cargo/bin" | ||
|
||
RUN apt-get update && \ | ||
apt-get install --no-install-recommends -y \ | ||
# basic | ||
tzdata \ | ||
apt-transport-https \ | ||
sudo \ | ||
build-essential \ | ||
git \ | ||
vim \ | ||
jq \ | ||
ca-certificates \ | ||
curl \ | ||
gnupg \ | ||
lld \ | ||
cmake \ | ||
# docs | ||
mscgen \ | ||
# solana compiling | ||
libssl-dev \ | ||
libudev-dev \ | ||
pkg-config \ | ||
zlib1g-dev \ | ||
llvm \ | ||
clang \ | ||
cmake \ | ||
make \ | ||
libprotobuf-dev \ | ||
protobuf-compiler \ | ||
&& \ | ||
# buildkite | ||
curl -fsSL https://keys.openpgp.org/vks/v1/by-fingerprint/32A37959C2FA5C3C99EFBC32A79206696452D198 | gpg --dearmor -o /usr/share/keyrings/buildkite-agent-archive-keyring.gpg && \ | ||
echo "deb [signed-by=/usr/share/keyrings/buildkite-agent-archive-keyring.gpg] https://apt.buildkite.com/buildkite-agent stable main" | tee /etc/apt/sources.list.d/buildkite-agent.list && \ | ||
apt-get update && \ | ||
apt-get install -y buildkite-agent && \ | ||
# gh | ||
curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg && \ | ||
sudo chmod go+r /usr/share/keyrings/githubcli-archive-keyring.gpg && \ | ||
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | tee /etc/apt/sources.list.d/github-cli.list > /dev/null && \ | ||
apt-get update && \ | ||
apt-get install -y gh && \ | ||
# rust | ||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs/ | sh -s -- --no-modify-path --profile minimal --default-toolchain $RUST_VERSION -y && \ | ||
rustup component add rustfmt && \ | ||
rustup component add clippy && \ | ||
rustup target add wasm32-unknown-unknown && \ | ||
cargo install cargo-audit && \ | ||
cargo install cargo-hack && \ | ||
cargo install cargo-sort && \ | ||
cargo install mdbook && \ | ||
cargo install mdbook-linkcheck && \ | ||
cargo install svgbob_cli && \ | ||
cargo install wasm-pack && \ | ||
cargo install rustfilt && \ | ||
chmod -R a+w $CARGO_HOME $RUSTUP_HOME && \ | ||
rm -rf $CARGO_HOME/registry && \ | ||
# sccache | ||
curl -LOsS "https://github.com/mozilla/sccache/releases/download/$SCCACHE_VERSION/sccache-$SCCACHE_VERSION-x86_64-unknown-linux-musl.tar.gz" && \ | ||
tar -xzf "sccache-$SCCACHE_VERSION-x86_64-unknown-linux-musl.tar.gz" && \ | ||
mv "sccache-$SCCACHE_VERSION-x86_64-unknown-linux-musl"/sccache "$CARGO_HOME/bin/" && \ | ||
rm "sccache-$SCCACHE_VERSION-x86_64-unknown-linux-musl.tar.gz" && \ | ||
rm -rf "sccache-$SCCACHE_VERSION-x86_64-unknown-linux-musl" && \ | ||
# nextest | ||
curl -LsSf https://get.nexte.st/latest/linux | tar zxf - -C "$CARGO_HOME/bin" && \ | ||
# golang | ||
curl -LOsS "https://golang.org/dl/go$GOLANG_VERSION.linux-amd64.tar.gz" && \ | ||
tar -C /usr/local -xzf "go$GOLANG_VERSION.linux-amd64.tar.gz" && \ | ||
rm "go$GOLANG_VERSION.linux-amd64.tar.gz" && \ | ||
# nodejs | ||
sudo mkdir -p /etc/apt/keyrings && \ | ||
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \ | ||
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | sudo tee /etc/apt/sources.list.d/nodesource.list && \ | ||
sudo apt-get update && \ | ||
sudo apt-get install -y nodejs && \ | ||
# setup path | ||
mkdir /.cache && \ | ||
chmod -R a+w /.cache && \ | ||
mkdir /.config && \ | ||
chmod -R a+w /.config && \ | ||
mkdir /.npm && \ | ||
chmod -R a+w /.npm && \ | ||
# clean lists | ||
rm -rf /var/lib/apt/lists/* |