mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #13424 from ethereum/update-emscripten-dockerfile
Update emscripten Dockerfile to 3.1.19
This commit is contained in:
commit
c4d9cdf643
@ -40,7 +40,8 @@ else
|
|||||||
BUILD_DIR="$1"
|
BUILD_DIR="$1"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
apt-get update && apt-get install lz4
|
apt-get update
|
||||||
|
apt-get install lz4 --no-install-recommends
|
||||||
|
|
||||||
WORKSPACE=/root/project
|
WORKSPACE=/root/project
|
||||||
|
|
||||||
@ -61,12 +62,20 @@ then
|
|||||||
echo -n "$CIRCLE_SHA1" >commit_hash.txt
|
echo -n "$CIRCLE_SHA1" >commit_hash.txt
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Disable warnings for unqualified "move()" calls, introduced and enabled by
|
||||||
|
# default in clang-16 which is what the emscripten docker image uses.
|
||||||
|
# Additionally, disable the warning for unknown warnings here, as this script is
|
||||||
|
# also used with earlier clang versions.
|
||||||
|
CMAKE_CXX_FLAGS="-Wno-unqualified-std-cast-call -Wno-unknown-warning-option"
|
||||||
|
|
||||||
|
|
||||||
mkdir -p "$BUILD_DIR"
|
mkdir -p "$BUILD_DIR"
|
||||||
cd "$BUILD_DIR"
|
cd "$BUILD_DIR"
|
||||||
emcmake cmake \
|
emcmake cmake \
|
||||||
-DCMAKE_BUILD_TYPE=Release \
|
-DCMAKE_BUILD_TYPE=Release \
|
||||||
-DBoost_USE_STATIC_LIBS=1 \
|
-DBoost_USE_STATIC_LIBS=1 \
|
||||||
-DBoost_USE_STATIC_RUNTIME=1 \
|
-DBoost_USE_STATIC_RUNTIME=1 \
|
||||||
|
-DCMAKE_CXX_FLAGS="${CMAKE_CXX_FLAGS}" \
|
||||||
-DTESTS=0 \
|
-DTESTS=0 \
|
||||||
..
|
..
|
||||||
make soljson
|
make soljson
|
||||||
|
@ -32,16 +32,20 @@
|
|||||||
# apparently this currently breaks due to conflicting compatibility headers.
|
# apparently this currently breaks due to conflicting compatibility headers.
|
||||||
# Using $(em-config CACHE)/sysroot/usr seems to work, though, and still has cmake find the
|
# Using $(em-config CACHE)/sysroot/usr seems to work, though, and still has cmake find the
|
||||||
# dependencies automatically.
|
# dependencies automatically.
|
||||||
FROM emscripten/emsdk:2.0.33 AS base
|
FROM emscripten/emsdk:3.1.19 AS base
|
||||||
LABEL version="11"
|
LABEL version="12"
|
||||||
|
|
||||||
ADD emscripten.jam /usr/src
|
ADD emscripten.jam /usr/src
|
||||||
RUN set -ex; \
|
RUN set -ex && \
|
||||||
cd /usr/src; \
|
\
|
||||||
git clone https://github.com/Z3Prover/z3.git -b z3-4.8.17 --depth 1 ; \
|
apt-get update && \
|
||||||
cd z3; \
|
apt-get install lz4 --no-install-recommends && \
|
||||||
mkdir build; \
|
\
|
||||||
cd build; \
|
cd /usr/src && \
|
||||||
|
git clone https://github.com/Z3Prover/z3.git -b z3-4.8.17 --depth 1 && \
|
||||||
|
cd z3 && \
|
||||||
|
mkdir build && \
|
||||||
|
cd build && \
|
||||||
emcmake cmake \
|
emcmake cmake \
|
||||||
-DCMAKE_INSTALL_PREFIX=$(em-config CACHE)/sysroot/usr \
|
-DCMAKE_INSTALL_PREFIX=$(em-config CACHE)/sysroot/usr \
|
||||||
-DCMAKE_BUILD_TYPE=MinSizeRel \
|
-DCMAKE_BUILD_TYPE=MinSizeRel \
|
||||||
@ -51,21 +55,22 @@ RUN set -ex; \
|
|||||||
-DZ3_BUILD_EXECUTABLE=OFF \
|
-DZ3_BUILD_EXECUTABLE=OFF \
|
||||||
-DZ3_SINGLE_THREADED=ON \
|
-DZ3_SINGLE_THREADED=ON \
|
||||||
-DCMAKE_CXX_FLAGS="-s DISABLE_EXCEPTION_CATCHING=0" \
|
-DCMAKE_CXX_FLAGS="-s DISABLE_EXCEPTION_CATCHING=0" \
|
||||||
..; \
|
.. && \
|
||||||
make ; make install; \
|
make && \
|
||||||
rm -r /usr/src/z3; \
|
make install && \
|
||||||
cd /usr/src; \
|
rm -r /usr/src/z3 && \
|
||||||
|
cd /usr/src && \
|
||||||
wget -q 'https://boostorg.jfrog.io/artifactory/main/release/1.75.0/source/boost_1_75_0.tar.bz2' -O boost.tar.bz2; \
|
\
|
||||||
test "$(sha256sum boost.tar.bz2)" = "953db31e016db7bb207f11432bef7df100516eeb746843fa0486a222e3fd49cb boost.tar.bz2"; \
|
wget -q 'https://boostorg.jfrog.io/artifactory/main/release/1.75.0/source/boost_1_75_0.tar.bz2' -O boost.tar.bz2 && \
|
||||||
tar -xf boost.tar.bz2; \
|
test "$(sha256sum boost.tar.bz2)" = "953db31e016db7bb207f11432bef7df100516eeb746843fa0486a222e3fd49cb boost.tar.bz2" && \
|
||||||
rm boost.tar.bz2; \
|
tar -xf boost.tar.bz2 && \
|
||||||
cd boost_1_75_0; \
|
rm boost.tar.bz2 && \
|
||||||
mv ../emscripten.jam .; \
|
cd boost_1_75_0 && \
|
||||||
./bootstrap.sh; \
|
mv ../emscripten.jam . && \
|
||||||
echo "using emscripten : : em++ ;" >> project-config.jam ; \
|
./bootstrap.sh && \
|
||||||
|
echo "using emscripten : : em++ ;" >> project-config.jam && \
|
||||||
./b2 toolset=emscripten link=static variant=release threading=single runtime-link=static \
|
./b2 toolset=emscripten link=static variant=release threading=single runtime-link=static \
|
||||||
--with-system --with-filesystem --with-test --with-program_options \
|
--with-system --with-filesystem --with-test --with-program_options \
|
||||||
cxxflags="-s DISABLE_EXCEPTION_CATCHING=0 -Wno-unused-local-typedef -Wno-variadic-macros -Wno-c99-extensions -Wno-all" \
|
cxxflags="-s DISABLE_EXCEPTION_CATCHING=0 -Wno-unused-local-typedef -Wno-variadic-macros -Wno-c99-extensions -Wno-all" \
|
||||||
--prefix=$(em-config CACHE)/sysroot/usr install; \
|
--prefix=$(em-config CACHE)/sysroot/usr install && \
|
||||||
rm -r /usr/src/boost_1_75_0
|
rm -r /usr/src/boost_1_75_0
|
||||||
|
@ -18,18 +18,20 @@ located in `develop`.
|
|||||||
### Build, Test & Push
|
### Build, Test & Push
|
||||||
|
|
||||||
Note that the whole workflow - including all defined strategies (image variants) - will be triggered,
|
Note that the whole workflow - including all defined strategies (image variants) - will be triggered,
|
||||||
even if only a single Dockerfile was change. The full workflow will only gets executed, if the corresponding
|
even if only a single Dockerfile was changed. The full workflow will only get executed, if the corresponding
|
||||||
Dockerfile was changed. The execution of workflows of unchanged Dockerfiles will not continue and just return success.
|
Dockerfile was changed. The execution of workflows of unchanged Dockerfiles will not continue and just return success.
|
||||||
See `scripts/ci/docker_upgrade.sh`.
|
See `scripts/ci/docker_upgrade.sh`.
|
||||||
|
|
||||||
If the version check was successful, the docker image will be built using the Dockerfile located in
|
If the version check was successful, the docker image will be built using the Dockerfile located in
|
||||||
`scripts/docker/buildpack-deps/Dockerfile.*`.
|
`scripts/docker/buildpack-deps/Dockerfile.*`.
|
||||||
|
|
||||||
The resulting docker image will be tested by executing
|
The resulting docker image will be tested by executing the corresponding `scripts/ci/buildpack-deps_test_*` scripts.
|
||||||
the corresponding `scripts/ci/buildpack-deps_test_*` scripts. These scripts are normally symlinked to `scripts/ci/build.sh`,
|
Some of these scripts are symlinked to `scripts/ci/build.sh`, except the following two:
|
||||||
except for the `buildpack-deps-ubuntu1604.clang.ossfuzz` docker image, that is symlinked to `scripts/ci/build_ossfuzz.sh`.
|
* `buildpack-deps-ubuntu1604.clang.ossfuzz` => `scripts/ci/build_ossfuzz.sh`
|
||||||
|
* `buildpack-deps_test_emscripten.sh` => `scripts/ci/build_emscripten.sh`
|
||||||
|
|
||||||
These scripts `scripts/ci/build.sh` and `scripts/ci/build_ossfuzz.sh` are also used by CircleCI, see `.circleci/config.yml`.
|
These scripts `scripts/ci/build.sh` and `scripts/ci/build_ossfuzz.sh` are also used by CircleCI, see `.circleci/config.yml`.
|
||||||
|
|
||||||
If the tests passed successfully, the docker image will get tagged by the version defined within the corresponding `Dockerfile`.
|
If the tests passed successfully, the docker image will get tagged by the version defined within the corresponding `Dockerfile`.
|
||||||
Finally, a comment will be added to the PR that contains the full repository, version and repository digest
|
Finally, a comment will be added to the PR that contains the full repository, version and repository digest
|
||||||
of the freshly created docker image.
|
of the freshly created docker image.
|
||||||
|
Loading…
Reference in New Issue
Block a user