-
Notifications
You must be signed in to change notification settings - Fork 308
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(ci): try to make base image more stable (#6144)
Seeing weird caching behaviour with the base image that uses FROM DOCKERFILE --------- Co-authored-by: Charlie Lye <[email protected]>
- Loading branch information
1 parent
4719ff1
commit 979a22d
Showing
1 changed file
with
77 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,80 @@ | ||
VERSION 0.8 | ||
|
||
# TODO(AD): This is a kludge. There seem to be caching issues with FROM DOCKERFILE | ||
# This needs to be investigated with a better workaround, but, until then, this prevents CI from being unstable. | ||
# See Dockerfile for comments. | ||
|
||
wasi-sdk: | ||
FROM aztecprotocol/wasi-sdk:22.0 | ||
SAVE ARTIFACT /opt/wasi-sdk | ||
|
||
osxcross: | ||
FROM aztecprotocol/osxcross:14.0 | ||
SAVE ARTIFACT /opt/osxcross | ||
|
||
foundry: | ||
FROM aztecprotocol/foundry:de33b6af53005037b463318d2628b5cfcaf39916 | ||
SAVE ARTIFACT /opt/foundry | ||
|
||
build: | ||
FROM DOCKERFILE --target build . | ||
SAVE ARTIFACT /opt/foundry/bin/anvil | ||
FROM ubuntu:noble | ||
RUN apt update && \ | ||
apt install -y \ | ||
# Utils | ||
curl \ | ||
git \ | ||
curl \ | ||
wget \ | ||
jq \ | ||
gawk \ | ||
unzip \ | ||
netcat-openbsd \ | ||
parallel \ | ||
# C++ (clang=18, which we will move to. 16 is for current build.) | ||
build-essential \ | ||
cmake \ | ||
ninja-build \ | ||
clang \ | ||
clang-16 \ | ||
clang-format-16 \ | ||
libc++-dev \ | ||
libomp-dev \ | ||
doxygen \ | ||
# Node (18.19.1) | ||
nodejs \ | ||
npm \ | ||
# Python (clang bindings for wasm bindgen.) | ||
python3 \ | ||
python3-clang && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* | ||
|
||
# Install wasi-sdk. | ||
COPY +wasi-sdk/wasi-sdk /opt/wasi-sdk | ||
|
||
# Install osxcross. Requires developer to mount SDK from their mac host. | ||
COPY +osxcross/osxcross /opt/osxcross | ||
ENV PATH="/opt/osxcross/bin:$PATH" | ||
ENV LD_LIBRARY_PATH="/opt/osxcross/lib:$LD_LIBRARY_PATH" | ||
|
||
# Install foundry. | ||
COPY +foundry/foundry /opt/foundry | ||
ENV PATH="/opt/foundry/bin:$PATH" | ||
|
||
# Install rust and cross-compilers. Noir specifically uses 1.74.1. | ||
# We add everyone write ownership so downstream boxes can write. | ||
ENV RUSTUP_HOME=/opt/rust/rustup | ||
ENV CARGO_HOME=/opt/rust/cargo | ||
ENV PATH="/opt/rust/cargo/bin:$PATH" | ||
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain 1.74.1 && \ | ||
rustup target add wasm32-unknown-unknown wasm32-wasi aarch64-apple-darwin && \ | ||
chmod -R a+w /opt/rust | ||
|
||
# Install yq | ||
RUN curl -L https://github.com/mikefarah/yq/releases/download/v4.42.1/yq_linux_$(dpkg --print-architecture) \ | ||
-o /usr/local/bin/yq && chmod +x /usr/local/bin/yq | ||
|
||
# Install yarn | ||
RUN npm install --global yarn | ||
|
||
# Install solhint | ||
RUN npm install --global solhint | ||
SAVE ARTIFACT /opt/foundry/bin/anvil |