Skip to content

Commit 2bf49ea

Browse files
Revert "chore: install clang20, upgrade wasi-sdk to 27 (#16414)"
This reverts commit 15d3b08.
1 parent 164eacb commit 2bf49ea

File tree

5 files changed

+46
-39
lines changed

5 files changed

+46
-39
lines changed

bootstrap.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,11 +73,11 @@ function check_toolchains {
7373
echo -e "${bold}${yellow}WARN: Rust ${rust_version} is not installed. Performance will be degraded.${reset}"
7474
fi
7575
# Check wasi-sdk version.
76-
if ! cat /opt/wasi-sdk/VERSION 2> /dev/null | grep 27.0 > /dev/null; then
76+
if ! cat /opt/wasi-sdk/VERSION 2> /dev/null | grep 22.0 > /dev/null; then
7777
encourage_dev_container
78-
echo "wasi-sdk-27 not found at /opt/wasi-sdk."
78+
echo "wasi-sdk-22 not found at /opt/wasi-sdk."
7979
echo "Use dev container, build from source, or you can install linux x86 version with:"
80-
echo " curl -s -L https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-27/wasi-sdk-27.0-x86_64-linux.tar.gz | tar zxf - && sudo mv wasi-sdk-27.0-x86_64-linux /opt/wasi-sdk"
80+
echo " curl -s -L https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-22/wasi-sdk-22.0-linux.tar.gz | tar zxf - && sudo mv wasi-sdk-22.0 /opt/wasi-sdk"
8181
exit 1
8282
fi
8383
# Check foundry version.

build-images/bootstrap.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@ function build_ec2 {
6161
git remote add origin https://github.com/aztecprotocol/aztec-packages
6262
git fetch --depth 1 origin $current_commit
6363
git checkout FETCH_HEAD
64-
./build-images/bootstrap.sh
65-
./build-images/bootstrap.sh push-images
64+
./build-images/bootstrap.sh || bash
65+
./build-images/bootstrap.sh push-images || bash
6666
"
6767
}
6868

build-images/src/Dockerfile

Lines changed: 39 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,23 @@ RUN export DEBIAN_FRONTEND="noninteractive" \
2121
&& apt-get clean \
2222
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
2323

24-
# Install rust and cross-compilers. Noir specifically uses 1.85.0.
25-
# We give everyone write ownership so downstream boxes can write.
26-
ENV RUSTUP_HOME=/opt/rust/rustup
27-
ENV CARGO_HOME=/opt/rust/cargo
28-
ENV PATH="/opt/rust/cargo/bin:$PATH"
29-
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain 1.85.0 && \
30-
rustup target add wasm32-unknown-unknown wasm32-wasip1 aarch64-apple-darwin && \
31-
chmod -R a+w /opt/rust
24+
25+
########################################################################################################################
26+
# Build wasi-sdk.
27+
FROM base-build AS wasi-sdk
28+
RUN apt update && apt install cargo -y
29+
RUN git clone --depth 1 --recursive --branch wasi-sdk-22 https://github.com/WebAssembly/wasi-sdk.git \
30+
&& mkdir -p /wasi-sdk/build/install/opt/wasi-sdk \
31+
&& cd /wasi-sdk \
32+
&& export MAKEFLAGS="-j$(nproc)" \
33+
&& make build/llvm.BUILT \
34+
&& make build/wasi-libc.BUILT \
35+
&& make build/compiler-rt.BUILT \
36+
&& make build/libcxx.BUILT \
37+
&& make build/config.BUILT \
38+
&& make build/version.BUILT \
39+
&& mv build/install/opt/wasi-sdk /opt/wasi-sdk \
40+
&& cd / && rm -rf /wasi-sdk
3241

3342

3443
########################################################################################################################
@@ -72,6 +81,7 @@ ENV RUSTUP_HOME=/opt/rust/rustup
7281
ENV CARGO_HOME=/opt/rust/cargo
7382
ENV PATH="/opt/rust/cargo/bin:$PATH"
7483
ENV RUSTFLAGS="-C target-cpu=generic"
84+
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
7585
RUN curl -L https://foundry.paradigm.xyz | bash \
7686
&& $FOUNDRY_BIN_DIR/foundryup -i $FOUNDRY_VERSION \
7787
&& mkdir -p /opt/foundry/bin \
@@ -93,7 +103,7 @@ RUN curl -L https://foundry.paradigm.xyz | bash \
93103
# We use this image for test isolation.
94104
FROM base-build AS build
95105

96-
# APT repo for node (22.16.0)
106+
# APT repo for node (22.15.0)
97107
RUN curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
98108
ENV NODE_MAJOR=22
99109
RUN echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list
@@ -114,22 +124,22 @@ RUN apt update && \
114124
lsof \
115125
xxd \
116126
zstd \
117-
# C++
118-
lsb-release \
119-
gnupg \
120-
software-properties-common \
127+
# C++ (clang=18, which we will move to. 16 is for current build.)
121128
build-essential \
129+
cmake \
130+
ninja-build \
122131
clang \
123132
clang-16 \
124133
clang-format-16 \
125-
cmake \
126-
ninja-build \
127134
libc++-dev \
128135
libomp-dev \
136+
clang-18 \
137+
clang-format-18 \
138+
libc++-18-dev \
139+
libomp-18-dev \
140+
libclang-rt-18-dev \
129141
doxygen \
130-
# Node
131-
# WARNING: Need to downgrade to this version in the basebox below as well.
132-
nodejs=22.16.0-1nodesource1 \
142+
nodejs \
133143
# Python (clang bindings for wasm bindgen.)
134144
python3 \
135145
python3-clang \
@@ -139,23 +149,22 @@ RUN apt update && \
139149
&& apt-get clean \
140150
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
141151

142-
# Install clang 18/20.
143-
RUN wget https://apt.llvm.org/llvm.sh && \
144-
chmod +x llvm.sh && \
145-
./llvm.sh 18 all && \
146-
./llvm.sh 20 all && \
147-
rm llvm.sh
148-
149152
# Install wasi-sdk.
150-
RUN wget https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-27/wasi-sdk-27.0-x86_64-linux.tar.gz && \
151-
tar xvf wasi-sdk-27.0-x86_64-linux.tar.gz && \
152-
mv wasi-sdk-27.0-x86_64-linux /opt/wasi-sdk && \
153-
rm wasi-sdk-27.0-x86_64-linux.tar.gz
153+
COPY --from=wasi-sdk /opt/wasi-sdk /opt/wasi-sdk
154154

155155
# Install foundry.
156156
COPY --from=foundry /opt/foundry /opt/foundry
157157
ENV PATH="/opt/foundry/bin:$PATH"
158158

159+
# Install rust and cross-compilers. Noir specifically uses 1.85.0.
160+
# We give everyone write ownership so downstream boxes can write.
161+
ENV RUSTUP_HOME=/opt/rust/rustup
162+
ENV CARGO_HOME=/opt/rust/cargo
163+
ENV PATH="/opt/rust/cargo/bin:$PATH"
164+
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain 1.85.0 && \
165+
rustup target add wasm32-unknown-unknown wasm32-wasip1 aarch64-apple-darwin && \
166+
chmod -R a+w /opt/rust
167+
159168
# Install corepack and yarn.
160169
RUN npm install --global corepack && corepack enable && corepack install --global [email protected]
161170

@@ -202,7 +211,7 @@ RUN yes | unminimize
202211

203212
# Install stuff devs need.
204213
RUN apt update && \
205-
apt install -y --allow-downgrades \
214+
apt install -y \
206215
cgroup-tools \
207216
clangd-16 \
208217
clangd-18 \
@@ -231,8 +240,6 @@ RUN apt update && \
231240
vim \
232241
zsh \
233242
inotify-tools \
234-
# Annoyingly unminimize upgrades nodejs.
235-
nodejs=22.16.0-1nodesource1 \
236243
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
237244

238245
# Install osxcross. Requires developer to mount SDK from their mac host.

ci3/aws/ami_id_amd64

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
ami-01c2ab656d55fe60a
1+
ami-0d32666897f9356ec

ci3/aws/ami_id_arm64

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
ami-056bc8eabcf0de893
1+
ami-04865b68b1f59d324

0 commit comments

Comments
 (0)