diff --git a/scripts/ci/build_emscripten.sh b/scripts/ci/build_emscripten.sh index 55d2288c3..6bc1754f3 100755 --- a/scripts/ci/build_emscripten.sh +++ b/scripts/ci/build_emscripten.sh @@ -40,7 +40,8 @@ else BUILD_DIR="$1" fi -apt-get update && apt-get install lz4 +apt-get update +apt-get install lz4 --no-install-recommends WORKSPACE=/root/project @@ -61,12 +62,20 @@ then echo -n "$CIRCLE_SHA1" >commit_hash.txt 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" cd "$BUILD_DIR" emcmake cmake \ -DCMAKE_BUILD_TYPE=Release \ -DBoost_USE_STATIC_LIBS=1 \ -DBoost_USE_STATIC_RUNTIME=1 \ + -DCMAKE_CXX_FLAGS="${CMAKE_CXX_FLAGS}" \ -DTESTS=0 \ .. make soljson diff --git a/scripts/docker/buildpack-deps/Dockerfile.emscripten b/scripts/docker/buildpack-deps/Dockerfile.emscripten index 777d8b2ec..237405c4c 100644 --- a/scripts/docker/buildpack-deps/Dockerfile.emscripten +++ b/scripts/docker/buildpack-deps/Dockerfile.emscripten @@ -32,16 +32,20 @@ # 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 # dependencies automatically. -FROM emscripten/emsdk:2.0.33 AS base -LABEL version="11" +FROM emscripten/emsdk:3.1.19 AS base +LABEL version="12" ADD emscripten.jam /usr/src -RUN set -ex; \ - cd /usr/src; \ - git clone https://github.com/Z3Prover/z3.git -b z3-4.8.17 --depth 1 ; \ - cd z3; \ - mkdir build; \ - cd build; \ +RUN set -ex && \ + \ + apt-get update && \ + apt-get install lz4 --no-install-recommends && \ + \ + 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 \ -DCMAKE_INSTALL_PREFIX=$(em-config CACHE)/sysroot/usr \ -DCMAKE_BUILD_TYPE=MinSizeRel \ @@ -51,21 +55,22 @@ RUN set -ex; \ -DZ3_BUILD_EXECUTABLE=OFF \ -DZ3_SINGLE_THREADED=ON \ -DCMAKE_CXX_FLAGS="-s DISABLE_EXCEPTION_CATCHING=0" \ - ..; \ - make ; make install; \ - 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"; \ - tar -xf boost.tar.bz2; \ - rm boost.tar.bz2; \ - cd boost_1_75_0; \ - mv ../emscripten.jam .; \ - ./bootstrap.sh; \ - echo "using emscripten : : em++ ;" >> project-config.jam ; \ + .. && \ + make && \ + make install && \ + 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" && \ + tar -xf boost.tar.bz2 && \ + rm boost.tar.bz2 && \ + cd boost_1_75_0 && \ + mv ../emscripten.jam . && \ + ./bootstrap.sh && \ + echo "using emscripten : : em++ ;" >> project-config.jam && \ ./b2 toolset=emscripten link=static variant=release threading=single runtime-link=static \ --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" \ - --prefix=$(em-config CACHE)/sysroot/usr install; \ + --prefix=$(em-config CACHE)/sysroot/usr install && \ rm -r /usr/src/boost_1_75_0 diff --git a/scripts/docker/buildpack-deps/README.md b/scripts/docker/buildpack-deps/README.md index 004a89e91..bce45e615 100644 --- a/scripts/docker/buildpack-deps/README.md +++ b/scripts/docker/buildpack-deps/README.md @@ -18,18 +18,20 @@ located in `develop`. ### Build, Test & Push 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. See `scripts/ci/docker_upgrade.sh`. If the version check was successful, the docker image will be built using the Dockerfile located in `scripts/docker/buildpack-deps/Dockerfile.*`. -The resulting docker image will be tested by executing -the corresponding `scripts/ci/buildpack-deps_test_*` scripts. These scripts are normally symlinked to `scripts/ci/build.sh`, -except for the `buildpack-deps-ubuntu1604.clang.ossfuzz` docker image, that is symlinked to `scripts/ci/build_ossfuzz.sh`. +The resulting docker image will be tested by executing the corresponding `scripts/ci/buildpack-deps_test_*` scripts. +Some of these scripts are symlinked to `scripts/ci/build.sh`, except the following two: + * `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`. 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 -of the freshly created docker image. \ No newline at end of file +of the freshly created docker image.