@@ -106,6 +106,7 @@ RUN sudo apt-get update \
106
106
# RUN apt-get update && apt-get install -y ninja-build python3 python3-distutils python3-psutil git gdb ccache
107
107
# TODO add ninja-build once 1.11 is available in Ubuntu, also remove the manual installation.
108
108
RUN <<EOF
109
+ set -e
109
110
wget -qO /tmp/ninja.gz https://github.com/ninja-build/ninja/releases/latest/download/ninja-linux.zip
110
111
gunzip /tmp/ninja.gz
111
112
chmod a+x /tmp/ninja
115
116
116
117
# These two locales are not enabled by default so generate them
117
118
RUN <<EOF
119
+ set -e
118
120
printf "fr_CA ISO-8859-1\n cs_CZ ISO-8859-2" | sudo tee -a /etc/locale.gen
119
121
sudo mkdir /usr/local/share/i1en/
120
122
printf "fr_CA ISO-8859-1\n cs_CZ ISO-8859-2" | sudo tee -a /usr/local/share/i1en/SUPPORTED
129
131
# 14 release branch CI uses it. The tip-of-trunk CI will never use Clang 12,
130
132
# though.
131
133
RUN <<EOF
134
+ set -e
132
135
sudo apt-get update
133
136
wget https://apt.llvm.org/llvm.sh -O /tmp/llvm.sh
134
137
chmod +x /tmp/llvm.sh
142
145
143
146
# Install the most recent GCC, like clang install the previous version as a transition.
144
147
RUN <<EOF
148
+ set -e
145
149
sudo git clone https://github.com/compiler-explorer/infra.git /tmp/ce-infra
146
150
(cd /tmp/ce-infra && sudo make ce)
147
151
sudo /tmp/ce-infra/bin/ce_install install compilers/c++/x86/gcc $GCC_LATEST_VERSION.1.0
@@ -155,13 +159,14 @@ EOF
155
159
156
160
RUN <<EOF
157
161
# Install a recent CMake
162
+ set -e
158
163
wget https://github.com/Kitware/CMake/releases/download/v3.21.1/cmake-3.21.1-linux-x86_64.sh -O /tmp/install-cmake.sh
159
164
sudo bash /tmp/install-cmake.sh --prefix=/usr --exclude-subdir --skip-license
160
165
rm /tmp/install-cmake.sh
161
166
EOF
162
167
163
168
# ===----------------------------------------------------------------------===##
164
- # Android Buildkite Image
169
+ # Android Builder Base Image
165
170
# ===----------------------------------------------------------------------===##
166
171
167
172
FROM ubuntu:jammy AS android-builder-base
@@ -170,10 +175,11 @@ ARG ANDROID_CLANG_VERSION
170
175
ARG ANDROID_CLANG_PREBUILTS_COMMIT
171
176
ARG ANDROID_SYSROOT_BID
172
177
173
- RUN apt-get update && apt-get install -y curl unzip git
178
+ RUN apt-get update && apt-get install -y curl bzip2 git unzip
174
179
175
180
# Install the Android platform tools (e.g. adb) into /opt/android/sdk.
176
181
RUN <<EOF
182
+ set -e
177
183
mkdir -p /opt/android/sdk
178
184
cd /opt/android/sdk
179
185
curl -LO https://dl.google.com/android/repository/platform-tools-latest-linux.zip
187
193
ENV ANDROID_CLANG_VERSION=$ANDROID_CLANG_VERSION
188
194
ENV ANDROID_CLANG_PREBUILTS_COMMIT=$ANDROID_CLANG_PREBUILTS_COMMIT
189
195
RUN <<EOF
196
+ set -e
190
197
git clone --filter=blob:none --sparse \
191
198
https://android.googlesource.com/platform/prebuilts/clang/host/linux-x86 \
192
199
/opt/android/clang
@@ -206,26 +213,14 @@ EOF
206
213
207
214
ENV ANDROID_SYSROOT_BID=$ANDROID_SYSROOT_BID
208
215
RUN <<EOF
216
+ set -e
209
217
cd /opt/android
210
218
curl -L -o ndk_platform.tar.bz2 \
211
219
https://androidbuildinternal.googleapis.com/android/internal/build/v3/builds/${ANDROID_SYSROOT_BID}/ndk/attempts/latest/artifacts/ndk_platform.tar.bz2/url
212
220
tar xf ndk_platform.tar.bz2
213
221
rm ndk_platform.tar.bz2
214
222
EOF
215
223
216
- # Install Docker
217
- RUN <<EOF
218
- curl -fsSL https://get.docker.com -o /tmp/get-docker.sh
219
- sh /tmp/get-docker.sh
220
- rm /tmp/get-docker.sh
221
-
222
- # Install Docker. Mark the binary setuid so it can be run without prefixing it
223
- # with sudo. Adding the container user to the docker group doesn't work because
224
- # /var/run/docker.sock is owned by the host's docker GID, not the container's
225
- # docker GID.
226
- chmod u+s /usr/bin/docker
227
- EOF
228
-
229
224
# ===----------------------------------------------------------------------===##
230
225
# Buildkite Builder Image
231
226
# ===----------------------------------------------------------------------===##
@@ -243,6 +238,7 @@ WORKDIR /home/libcxx-builder
243
238
# Install the Buildkite agent and dependencies. This must be done as non-root
244
239
# for the Buildkite agent to be installed in a path where we can find it.
245
240
RUN <<EOF
241
+ set -e
246
242
cd /home/libcxx-builder
247
243
curl -sL https://raw.githubusercontent.com/buildkite/agent/main/install.sh -o /tmp/install-agent.sh
248
244
bash /tmp/install-agent.sh
@@ -271,6 +267,22 @@ COPY ./vendor/android/container-setup.sh /opt/android/container-setup.sh
271
267
272
268
ENV PATH="/opt/android/sdk/platform-tools:${PATH}"
273
269
270
+ USER root
271
+
272
+ # Install Docker
273
+ RUN <<EOF
274
+ set -e
275
+ curl -fsSL https://get.docker.com -o /tmp/get-docker.sh
276
+ sh /tmp/get-docker.sh
277
+ rm /tmp/get-docker.sh
278
+
279
+ # Install Docker. Mark the binary setuid so it can be run without prefixing it
280
+ # with sudo. Adding the container user to the docker group doesn't work because
281
+ # /var/run/docker.sock is owned by the host's docker GID, not the container's
282
+ # docker GID.
283
+ chmod u+s /usr/bin/docker
284
+ EOF
285
+
274
286
USER libcxx-builder
275
287
WORKDIR /home/libcxx-builder
276
288
0 commit comments