From 8abe514b4ced4766044ba54561176b5c5f89053e Mon Sep 17 00:00:00 2001 From: Everett Hildenbrandt Date: Thu, 5 Oct 2023 12:03:36 -0600 Subject: [PATCH] Use prebuilt z3 images (#3694) This uses the prebuilt Z3 images from: https://github.com/runtimeverification/z3-images This should speed up CI process. Note that the debian packagaes are not changed in Z3 image used, just the normal CI. So we are still testing with version 4.8.15 as well in the packaging process. We could also change that to 4.12.1, but then we wouldn't be testing the minimum recommended version. Co-authored-by: Freeman <105403280+F-WRunTime@users.noreply.github.com> --- .github/actions/with-docker/action.yml | 9 +-------- .github/workflows/Dockerfile | 3 ++- .github/workflows/Dockerfile.z3 | 24 ------------------------ deps/z3 | 1 + 4 files changed, 4 insertions(+), 33 deletions(-) delete mode 100644 .github/workflows/Dockerfile.z3 create mode 100644 deps/z3 diff --git a/.github/actions/with-docker/action.yml b/.github/actions/with-docker/action.yml index 106f8de707e..9dfe5840555 100644 --- a/.github/actions/with-docker/action.yml +++ b/.github/actions/with-docker/action.yml @@ -42,20 +42,13 @@ runs: run: | set -euxo pipefail - Z3_VERSION=4.8.15 + Z3_VERSION=$(cat deps/z3) K_VERSION=$(cat ${SUBDIR}package/version) USER=$(id -un) USER_ID=$(id -u) GROUP=$(id -gn) GROUP_ID=$(id -g) - docker build ${SUBDIR} \ - --build-arg USER=${USER} --build-arg USER_ID=${USER_ID} \ - --build-arg GROUP=${GROUP} --build-arg GROUP_ID=${GROUP_ID} \ - --build-arg BASE_OS=${BASE_OS} \ - --build-arg BASE_DISTRO=${BASE_DISTRO} \ - --tag z3:${BASE_DISTRO}-${Z3_VERSION} \ - --file ${SUBDIR}${DOCKERFILE}.z3 docker build ${SUBDIR} \ --build-arg USER=${USER} --build-arg USER_ID=${USER_ID} \ --build-arg GROUP=${GROUP} --build-arg GROUP_ID=${GROUP_ID} \ diff --git a/.github/workflows/Dockerfile b/.github/workflows/Dockerfile index 1e60083f4ef..d250f1c033d 100644 --- a/.github/workflows/Dockerfile +++ b/.github/workflows/Dockerfile @@ -1,8 +1,9 @@ ARG BASE_OS ARG BASE_DISTRO ARG K_VERSION + ARG Z3_VERSION -FROM z3:${BASE_DISTRO}-${Z3_VERSION} as Z3 +FROM runtimeverificationinc/${BASE_OS}-${BASE_DISTRO}-z3:${Z3_VERSION} as Z3 ARG BASE_OS ARG BASE_DISTRO diff --git a/.github/workflows/Dockerfile.z3 b/.github/workflows/Dockerfile.z3 deleted file mode 100644 index c2ec54df25c..00000000000 --- a/.github/workflows/Dockerfile.z3 +++ /dev/null @@ -1,24 +0,0 @@ -ARG BASE_DISTRO -ARG BASE_OS -FROM ${BASE_OS}:${BASE_DISTRO} - -ENV TZ=America/Chicago -RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone - -RUN apt-get update \ - && apt-get upgrade --yes \ - && apt-get install --yes \ - clang \ - cmake \ - git \ - python3 - -ARG Z3_VERSION=4.8.15 -RUN git clone 'https://github.com/z3prover/z3' --branch=z3-${Z3_VERSION} \ - && cd z3 \ - && python3 scripts/mk_make.py \ - && cd build \ - && make -j8 \ - && make install \ - && cd ../.. \ - && rm -rf z3 diff --git a/deps/z3 b/deps/z3 new file mode 100644 index 00000000000..53cf85e173b --- /dev/null +++ b/deps/z3 @@ -0,0 +1 @@ +4.12.1