@@ -18,7 +18,7 @@ ARG SCILLA_VERSION=v0.13.4
1818ARG SCILLA_IMAGE=zilliqa/scilla:${SCILLA_VERSION}
1919
2020# Common dependencies of the builder and runner stages.
21- FROM arm64v8/ ubuntu:22.04 AS base
21+ FROM ubuntu:22.04 AS base
2222# Format guideline: one package per line and keep them alphabetically sorted
2323RUN apt-get update \
2424 && apt-get install -y software-properties-common \
@@ -78,11 +78,12 @@ ENV SCCACHE_DIR="/sccache"
7878ENV RUSTC_WRAPPER="/root/.cargo/bin/sccache"
7979
8080ARG CMAKE_VERSION=3.25.1
81- RUN wget https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/cmake-${CMAKE_VERSION}-Linux-aarch64.sh \
81+ RUN wget https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/cmake-${CMAKE_VERSION}-Linux-x86_64.sh \
82+ && echo "6598da34f0e3a0f763809e25cfdd646aa1d5e4d133c4277821e63ae5cfe09457 cmake-${CMAKE_VERSION}-Linux-x86_64.sh" | sha256sum -c \
8283 && mkdir -p "${HOME}" /.local \
83- && bash ./cmake-${CMAKE_VERSION}-Linux-aarch64 .sh --skip-license --prefix="${HOME}" /.local/ \
84+ && bash ./cmake-${CMAKE_VERSION}-Linux-x86_64 .sh --skip-license --prefix="${HOME}" /.local/ \
8485 && "${HOME}" /.local/bin/cmake --version \
85- && rm cmake-${CMAKE_VERSION}-Linux-aarch64 .sh
86+ && rm cmake-${CMAKE_VERSION}-Linux-x86_64 .sh
8687ENV PATH="/root/.local/bin:${PATH}"
8788
8889# Setup ccache
@@ -97,7 +98,6 @@ ARG VCPKG_ROOT=/vcpkg
9798
9899RUN ccache -p && ccache -z
99100
100- ENV VCPKG_FORCE_SYSTEM_BINARIES=1
101101# If COMMIT_OR_TAG is a branch name or a tag, clone a shallow copy which is
102102# faster; if this fails, just clone the full repo and checkout the commit.
103103RUN git clone https://github.com/microsoft/vcpkg ${VCPKG_ROOT} \
@@ -116,11 +116,9 @@ RUN apt update -y \
116116 && curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key --keyring /usr/share/keyrings/cloud.google.gpg add - \
117117 && apt update -y && apt install -y google-cloud-cli
118118
119- ENV VCPKG_BINARY_SOURCES="default,readwrite;x-gcs,gs://vcpkg/ubuntu/22.04/arm64 -linux-dynamic/${VCPKG_COMMIT_OR_TAG}/,readwrite "
119+ ENV VCPKG_BINARY_SOURCES="default,readwrite;x-gcs,gs://vcpkg/ubuntu/22.04/x64 -linux-dynamic/${VCPKG_COMMIT_OR_TAG}/,read "
120120
121- RUN --mount=type=cache,target=/root/.cache/vcpkg/ \
122- echo "set(VCPKG_TARGET_ARCHITECTURE arm64)\n set(VCPKG_CRT_LINKAGE dynamic)\n set(VCPKG_LIBRARY_LINKAGE dynamic)\n set(VCPKG_CMAKE_SYSTEM_NAME Linux)\n set(VCPKG_FIXUP_ELF_RPATH ON)" >> ${VCPKG_ROOT}/triplets/community/arm64-linux-dynamic.cmake \
123- && ${VCPKG_ROOT}/vcpkg install --triplet=arm64-linux-dynamic
121+ RUN --mount=type=cache,target=/root/.cache/vcpkg/ ${VCPKG_ROOT}/vcpkg install --triplet=x64-linux-dynamic
124122
125123ENV INSTALL_DIR=/usr/local
126124ENV CCACHE_DIR="/ccache"
@@ -130,13 +128,13 @@ WORKDIR /zilliqa
130128COPY src/libPersistence/*.proto src/libPersistence/
131129COPY src/libUtils/*.proto src/libUtils/
132130COPY evm-ds/ evm-ds
133- RUN --mount=type=cache,target=/sccache/ cd evm-ds && PATH=/zilliqa/build/vcpkg_installed/arm64 -linux-dynamic/tools/protobuf:$PATH cargo build --release --package evm-ds && sccache --show-stats
131+ RUN --mount=type=cache,target=/sccache/ cd evm-ds && PATH=/zilliqa/build/vcpkg_installed/x64 -linux-dynamic/tools/protobuf:$PATH cargo build --release --package evm-ds && sccache --show-stats
134132
135133RUN ls -l /zilliqa/evm-ds/target
136134
137- RUN cp /zilliqa/build/vcpkg_installed/arm64 -linux-dynamic/lib/libffi.so /usr/local/lib \
138- && cp /zilliqa/build/vcpkg_installed/arm64 -linux-dynamic/lib/libssl.so* /usr/local/lib \
139- && cp /zilliqa/build/vcpkg_installed/arm64 -linux-dynamic/lib/libcrypto.so* /usr/local/lib
135+ RUN cp /zilliqa/build/vcpkg_installed/x64 -linux-dynamic/lib/libffi.so /usr/local/lib \
136+ && cp /zilliqa/build/vcpkg_installed/x64 -linux-dynamic/lib/libssl.so* /usr/local/lib \
137+ && cp /zilliqa/build/vcpkg_installed/x64 -linux-dynamic/lib/libcrypto.so* /usr/local/lib
140138
141139RUN apt-get install -y patchelf
142140
@@ -193,8 +191,8 @@ RUN mkdir -p /scilla/0/bin2/ && cp -L /scilla/0/bin/* /scilla/0/bin2/ && strip /
193191
194192FROM builder AS test_runner
195193RUN mkdir -p \
196- /scilla/0/bin /scilla/0/src/stdlib /scilla/0/vcpkg_installed/arm64 -linux-dynamic \
197- && ln -s /usr/local/lib /scilla/0/vcpkg_installed/arm64 -linux-dynamic
194+ /scilla/0/bin /scilla/0/src/stdlib /scilla/0/vcpkg_installed/x64 -linux-dynamic \
195+ && ln -s /usr/local/lib /scilla/0/vcpkg_installed/x64 -linux-dynamic
198196# pour in scilla binaries
199197COPY --from=scilla /scilla/0/bin2 /scilla/0/bin
200198# pour in scilla tests
@@ -226,7 +224,7 @@ COPY --from=builder /usr/local/lib/*.so* /usr/local/lib/
226224COPY --from=builder /zilliqa/evm-ds/target/release/evm-ds /usr/local/bin/
227225COPY --from=builder /zilliqa/evm-ds/log4rs.yml /usr/local/etc/
228226
229- ADD https://github.com/krallin/tini/releases/latest/download/tini-arm64 /tini
227+ ADD https://github.com/krallin/tini/releases/latest/download/tini /tini
230228
231229# The above COPY doesn't preserve symlinks which causes gcc/g++/cc/c++
232230# to hang as stand-alone binaries on Ubuntu 22.04.
0 commit comments