From eece0a48a4507dda0292615c7679d0ee8acf2604 Mon Sep 17 00:00:00 2001 From: Uilian Ries Date: Fri, 22 May 2020 16:41:03 -0300 Subject: [PATCH 01/21] Add CCI images Signed-off-by: Uilian Ries --- clang-cci/.dockerignore | 7 +++ clang-cci/Dockerfile | 100 ++++++++++++++++++++++++++++++++++ docker-compose.yml | 117 ++++++++++++++++++++++++++++++++++++++++ gcc-cci/.dockerignore | 7 +++ gcc-cci/Dockerfile | 110 +++++++++++++++++++++++++++++++++++++ 5 files changed, 341 insertions(+) create mode 100644 clang-cci/.dockerignore create mode 100644 clang-cci/Dockerfile create mode 100644 gcc-cci/.dockerignore create mode 100644 gcc-cci/Dockerfile diff --git a/clang-cci/.dockerignore b/clang-cci/.dockerignore new file mode 100644 index 000000000..5bf906c7d --- /dev/null +++ b/clang-cci/.dockerignore @@ -0,0 +1,7 @@ +.git/ +.idea/ + +*.md +*.py +*.yml +**/*.sh diff --git a/clang-cci/Dockerfile b/clang-cci/Dockerfile new file mode 100644 index 000000000..b2b7b19ec --- /dev/null +++ b/clang-cci/Dockerfile @@ -0,0 +1,100 @@ +FROM ubuntu:xenial + +LABEL maintainer="Conan.io " + +ARG COMPILER_VERSION + +ENV LLVM_VERSION=$COMPILER_VERSION \ + CC=clang \ + CXX=clang++ \ + CMAKE_C_COMPILER=clang \ + CMAKE_CXX_COMPILER=clang++ \ + PYENV_ROOT=/opt/pyenv \ + PYTHON_VERSION=3.8.2 \ + PATH=/opt/pyenv/shims:${PATH} \ + CMAKE_VERSION=3.16.6 + +RUN dpkg --add-architecture i386 \ + && apt-get -qq update \ + # Install basics + && apt-get install -y --no-install-recommends \ + sudo \ + wget \ + git \ + subversion \ + make \ + gnupg \ + ca-certificates \ + dh-autoreconf \ + apt-transport-https + # Install compiler toolset +RUN apt-get install -y --no-install-recommends \ + lsb-release \ + software-properties-common \ + && wget https://apt.llvm.org/llvm.sh \ + && chmod +x llvm.sh \ + && sudo ./llvm.sh ${LLVM_VERSION} \ + && rm llvm.sh + + # Further LLVM packages not installed by the llvm.sh script +RUN apt-get install -y --no-install-recommends \ + libc++-${LLVM_VERSION}-dev \ + libc++abi-${LLVM_VERSION}-dev \ + && apt-get remove -y lsb-release software-properties-common + + # Install dependencies of Python +RUN apt-get install -y --no-install-recommends \ + libreadline-dev \ + libsqlite3-dev \ + libffi-dev \ + libssl-dev \ + zlib1g-dev \ + libbz2-dev \ + xz-utils \ + curl \ + libncurses5-dev \ + libncursesw5-dev \ + liblzma-dev \ + && apt-get autoremove -y \ + && apt-get clean all + + # Update default compiler +RUN update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-${LLVM_VERSION} 100 \ + && update-alternatives --install /usr/bin/clang clang /usr/bin/clang-${LLVM_VERSION} 100 \ + && update-alternatives --install /usr/bin/cc cc /usr/bin/clang-${LLVM_VERSION} 100 \ + && update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++-${LLVM_VERSION} 100 \ + && update-alternatives --install /usr/bin/cpp cpp /usr/bin/clang++-${LLVM_VERSION} 100 \ + && rm -rf /var/lib/apt/lists/* \ + && groupadd 1001 -g 1001 \ + && groupadd 1000 -g 1000 \ + && groupadd 2000 -g 2000 \ + && groupadd 999 -g 999 \ + && useradd -ms /bin/bash conan -g 1001 -G 1000,2000,999 \ + && printf "conan:conan" | chpasswd \ + && adduser conan sudo \ + && printf "conan ALL= NOPASSWD: ALL\\n" >> /etc/sudoers + +RUN wget --no-check-certificate --quiet -O /tmp/pyenv-installer https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer \ + && chmod +x /tmp/pyenv-installer \ + && /tmp/pyenv-installer \ + && rm /tmp/pyenv-installer \ + && update-alternatives --install /usr/bin/pyenv pyenv /opt/pyenv/bin/pyenv 100 \ + && PYTHON_CONFIGURE_OPTS="--enable-shared" pyenv install ${PYTHON_VERSION} \ + && pyenv global ${PYTHON_VERSION} \ + && pip install -q --upgrade --no-cache-dir pip \ + && pip install -q --no-cache-dir conan conan-package-tools cmake==${CMAKE_VERSION} \ + && chown -R conan:1001 /opt/pyenv + + # remove all __pycache__ directories created by pyenv +RUN find /opt/pyenv -iname __pycache__ -print0 | xargs -0 rm -rf \ + && update-alternatives --install /usr/bin/python python /opt/pyenv/shims/python 100 \ + && update-alternatives --install /usr/bin/python3 python3 /opt/pyenv/shims/python3 100 \ + && update-alternatives --install /usr/bin/pip pip /opt/pyenv/shims/pip 100 \ + && update-alternatives --install /usr/bin/pip3 pip3 /opt/pyenv/shims/pip3 100 + +USER conan +WORKDIR /home/conan + +RUN mkdir -p /home/conan/.conan \ + && printf 'eval "$(pyenv init -)"\n' >> ~/.bashrc \ + && printf 'eval "$(pyenv virtualenv-init -)"\n' >> ~/.bashrc diff --git a/docker-compose.yml b/docker-compose.yml index 26969b53b..28a0245aa 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -778,3 +778,120 @@ services: image: "${DOCKER_USERNAME}/conantestazure:${DOCKER_BUILD_TAG}" container_name: conan-test-azure tty: true + gcc10-cci: + build: + context: gcc-cci + dockerfile: Dockerfile + args: + COMPILER_VERSION: 10.1.0 + image: "${DOCKER_USERNAME}/gcc10-cci:${DOCKER_BUILD_TAG}" + container_name: gcc10-cci + tty: true + gcc9-cci: + build: + context: gcc-cci + dockerfile: Dockerfile + args: + COMPILER_VERSION: 9.3.0 + image: "${DOCKER_USERNAME}/gcc9-cci:${DOCKER_BUILD_TAG}" + container_name: gcc9-cci + tty: true + gcc8-cci: + build: + context: gcc-cci + dockerfile: Dockerfile + args: + COMPILER_VERSION: 8.4.0 + image: "${DOCKER_USERNAME}/gcc8-cci:${DOCKER_BUILD_TAG}" + container_name: gcc8-cci + tty: true + gcc7-cci: + build: + context: gcc-cci + dockerfile: Dockerfile + args: + COMPILER_VERSION: 7.5.0 + image: "${DOCKER_USERNAME}/gcc7-cci:${DOCKER_BUILD_TAG}" + container_name: gcc7-cci + tty: true + gcc6-cci: + build: + context: gcc-cci + dockerfile: Dockerfile + args: + COMPILER_VERSION: 6.5.0 + image: "${DOCKER_USERNAME}/gcc6-cci:${DOCKER_BUILD_TAG}" + container_name: gcc6-cci + tty: true + clang10-cci: + build: + context: clang-cci + dockerfile: Dockerfile + args: + COMPILER_VERSION: 10 + image: "${DOCKER_USERNAME}/clang10-cci:${DOCKER_BUILD_TAG}" + container_name: clang10-cci + tty: true +# clang9-cci: +# build: +# context: clang-cci +# dockerfile: Dockerfile +# args: +# COMPILER_VERSION: 9.0.1 +# image: "${DOCKER_USERNAME}/clang9-cci:${DOCKER_BUILD_TAG}" +# container_name: clang9-cci +# tty: true + clang8-cci: + build: + context: clang-cci + dockerfile: Dockerfile + args: + COMPILER_VERSION: 8 + image: "${DOCKER_USERNAME}/clang8-cci:${DOCKER_BUILD_TAG}" + container_name: clang8-cci + tty: true +# clang7-cci: +# build: +# context: clang-cci +# dockerfile: Dockerfile +# args: +# COMPILER_VERSION: 7 +# image: "${DOCKER_USERNAME}/clang7-cci:${DOCKER_BUILD_TAG}" +# container_name: clang7-cci +# tty: true + clang6-cci: + build: + context: clang-cci + dockerfile: Dockerfile + args: + COMPILER_VERSION: 6.0 + image: "${DOCKER_USERNAME}/clang6-cci:${DOCKER_BUILD_TAG}" + container_name: clang6-cci + tty: true + clang5-cci: + build: + context: clang-cci + dockerfile: Dockerfile + args: + COMPILER_VERSION: 5.0 + image: "${DOCKER_USERNAME}/clang5-cci:${DOCKER_BUILD_TAG}" + container_name: clang5-cci + tty: true + clang4-cci: + build: + context: clang-cci + dockerfile: Dockerfile + args: + COMPILER_VERSION: 4.0 + image: "${DOCKER_USERNAME}/clang4-cci:${DOCKER_BUILD_TAG}" + container_name: clang4-cci + tty: true + clang39-cci: + build: + context: clang-cci + dockerfile: Dockerfile + args: + COMPILER_VERSION: 3.9 + image: "${DOCKER_USERNAME}/clang39-cci:${DOCKER_BUILD_TAG}" + container_name: clang39-cci + tty: true diff --git a/gcc-cci/.dockerignore b/gcc-cci/.dockerignore new file mode 100644 index 000000000..5bf906c7d --- /dev/null +++ b/gcc-cci/.dockerignore @@ -0,0 +1,7 @@ +.git/ +.idea/ + +*.md +*.py +*.yml +**/*.sh diff --git a/gcc-cci/Dockerfile b/gcc-cci/Dockerfile new file mode 100644 index 000000000..c01259c24 --- /dev/null +++ b/gcc-cci/Dockerfile @@ -0,0 +1,110 @@ +FROM ubuntu:xenial + +LABEL maintainer="Conan.io " + +ARG COMPILER_VERSION + +ENV PYENV_ROOT=/opt/pyenv \ + PATH=/opt/pyenv/shims:/usr/local/bin:${PATH} \ + CXX=/usr/bin/g++ \ + CC=/usr/bin/gcc \ + PYTHON_VERSION=3.8.2 \ + CMAKE_VERSION=3.16.4 \ + GCC_VERSION=$COMPILER_VERSION + +RUN apt-get -qq update \ + && apt-get -qq install -y --no-install-recommends \ + sudo \ + build-essential \ + wget \ + git \ + libc6-dev \ + gcc \ + libgmp-dev \ + libmpfr-dev \ + libmpc-dev \ + nasm \ + dh-autoreconf \ + libffi-dev \ + libssl-dev \ + pkg-config \ + subversion \ + zlib1g-dev \ + libbz2-dev \ + libsqlite3-dev \ + libreadline-dev \ + xz-utils \ + curl \ + libncurses5-dev \ + libncursesw5-dev \ + liblzma-dev \ + ca-certificates \ + autoconf-archive \ + flex \ + && rm -rf /var/lib/apt/lists/* + +RUN wget --no-check-certificate --quiet -O /opt/gcc-${GCC_VERSION}.tar.gz https://github.com/gcc-mirror/gcc/archive/releases/gcc-${GCC_VERSION}.tar.gz \ + && tar zxf /opt/gcc-${GCC_VERSION}.tar.gz -C /opt \ + && cd /opt/gcc-releases-gcc-${GCC_VERSION} \ + && ./configure --prefix=/usr/local \ + --enable-languages=c,c++ \ + --disable-bootstrap \ + --with-system-zlib \ + --enable-multiarch \ + --disable-multilib \ + --enable-shared \ + --enable-threads=posix \ + --build=x86_64-linux-gnu \ + --host=x86_64-linux-gnu \ + --target=x86_64-linux-gnu \ + --without-included-gettext \ + --with-tune=generic \ + --with-gmp=/usr/local/lib \ + --with-mpc=/usr/lib \ + --with-mpfr=/usr/lib \ + --disable-checking \ + && make -j "$(nproc)" \ + && make install-strip \ + && cd - \ + && rm -rf /opt/gcc* \ + && apt-get remove -y gcc gcc-5 \ + && update-alternatives --install /usr/bin/gcc gcc /usr/local/bin/gcc 100 \ + && update-alternatives --install /usr/bin/cc cc /usr/local/bin/gcc 100 \ + && update-alternatives --install /usr/bin/g++ g++ /usr/local/bin/g++ 100 \ + && update-alternatives --install /usr/bin/c++ c++ /usr/local/bin/g++ 100 \ + && update-alternatives --install /usr/bin/cpp cpp /usr/local/bin/g++ 100 \ + && printf "/usr/local/lib64" > /etc/ld.so.conf.d/local-lib64.conf \ + && ldconfig -v + +RUN groupadd 1001 -g 1001 \ + && groupadd 1000 -g 1000 \ + && groupadd 2000 -g 2000 \ + && groupadd 999 -g 999 \ + && useradd -ms /bin/bash conan -g 1001 -G 1000,2000,999 \ + && printf "conan:conan" | chpasswd \ + && adduser conan sudo \ + && printf "conan ALL= NOPASSWD: ALL\\n" >> /etc/sudoers + +RUN wget --no-check-certificate --quiet -O /tmp/pyenv-installer https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer \ + && chmod +x /tmp/pyenv-installer \ + && /tmp/pyenv-installer \ + && rm /tmp/pyenv-installer \ + && update-alternatives --install /usr/bin/pyenv pyenv /opt/pyenv/bin/pyenv 100 \ + && PYTHON_CONFIGURE_OPTS="--enable-shared" pyenv install ${PYTHON_VERSION} \ + && pyenv global ${PYTHON_VERSION} \ + && pip install -q --upgrade --no-cache-dir pip \ + && pip install -q --no-cache-dir conan conan-package-tools cmake==${CMAKE_VERSION} \ + && chown -R conan:1001 /opt/pyenv \ + # remove all __pycache__ directories created by pyenv + && find /opt/pyenv -iname __pycache__ -print0 | xargs -0 rm -rf \ + && update-alternatives --install /usr/bin/python python /opt/pyenv/shims/python 100 \ + && update-alternatives --install /usr/bin/python3 python3 /opt/pyenv/shims/python3 100 \ + && update-alternatives --install /usr/bin/pip pip /opt/pyenv/shims/pip 100 \ + && update-alternatives --install /usr/bin/pip3 pip3 /opt/pyenv/shims/pip3 100 + +USER conan +WORKDIR /home/conan + +RUN mkdir -p /home/conan/.conan \ + && printf 'eval "$(pyenv init -)"\n' >> ~/.bashrc \ + && printf 'eval "$(pyenv virtualenv-init -)"\n' >> ~/.bashrc From 1fcdb2702861e51bd2b5f0d437934974f4d76915 Mon Sep 17 00:00:00 2001 From: Uilian Ries Date: Fri, 22 May 2020 16:58:41 -0300 Subject: [PATCH 02/21] Build CCI images on CI Signed-off-by: Uilian Ries --- azure-pipelines.yml | 37 +++++++++++++++++++++++++++++++++++++ build.py | 9 +++++++-- 2 files changed, 44 insertions(+), 2 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 28799a598..c22f0e595 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -15,6 +15,43 @@ jobs: DOCKER_PASSWORD: $(DOCKER_PASSWORD) strategy: matrix: + Ubuntu GCC 10 CCI: + GCC_VERSIONS: "10" + BUILD_CONAN_CCI: 1 + Ubuntu GCC 9 CCI: + GCC_VERSIONS: "9" + BUILD_CONAN_CCI: 1 + Ubuntu GCC 8 CCI: + GCC_VERSIONS: "8" + BUILD_CONAN_CCI: 1 + Ubuntu GCC 7 CCI: + GCC_VERSIONS: "7" + BUILD_CONAN_CCI: 1 + Ubuntu GCC 6 CCI: + GCC_VERSIONS: "6" + BUILD_CONAN_CCI: 1 + Ubuntu Clang 10 CCI: + CLANG_VERSIONS: "10" + BUILD_CONAN_CCI: 1 + Ubuntu Clang 8 CCI: + CLANG_VERSIONS: "8" + BUILD_CONAN_CCI: 1 + Ubuntu Clang 8 CCI: + CLANG_VERSIONS: "8" + BUILD_CONAN_CCI: 1 + Ubuntu Clang 6 CCI: + CLANG_VERSIONS: "6" + BUILD_CONAN_CCI: 1 + Ubuntu Clang 5 CCI: + CLANG_VERSIONS: "5" + BUILD_CONAN_CCI: 1 + Ubuntu Clang 4 CCI: + CLANG_VERSIONS: "4" + BUILD_CONAN_CCI: 1 + Ubuntu Clang 3.9 CCI: + CLANG_VERSIONS: "3.9" + BUILD_CONAN_CCI: 1 + CentOS 6 GCC 7 x86_64: GCC_VERSIONS: "7" DOCKER_ARCHS: "x86_64" diff --git a/build.py b/build.py index 58026cd3b..ed6102a3f 100644 --- a/build.py +++ b/build.py @@ -50,6 +50,7 @@ def _get_variables(self): build_server = self._get_boolean_var("BUILD_CONAN_SERVER_IMAGE") build_tests = self._get_boolean_var("BUILD_CONAN_TESTS") build_test_azure = self._get_boolean_var("BUILD_CONAN_TEST_AZURE") + build_cci = self._get_boolean_var("BUILD_CONAN_CCI") docker_password = os.getenv("DOCKER_PASSWORD", "").replace('"', '\\"') docker_username = os.getenv("DOCKER_USERNAME", "conanio") docker_login_username = os.getenv("DOCKER_LOGIN_USERNAME", "lasote") @@ -77,11 +78,12 @@ def _get_variables(self): "clang_versions, visual_versions, build_server, " "docker_build_tag, docker_archs, sudo_command, " "docker_upload_only_when_stable, docker_cross, docker_cache, " - "build_tests, build_test_azure docker_upload_retry") + "build_tests, build_test_azure docker_upload_retry, build_cci") return Variables(docker_upload, docker_password, docker_username, docker_login_username, gcc_versions, docker_distro, clang_versions, visual_versions, build_server, docker_build_tag, docker_archs, sudo_command, docker_upload_only_when_stable, - docker_cross, docker_cache, build_tests, build_test_azure, docker_upload_retry) + docker_cross, docker_cache, build_tests, build_test_azure, docker_upload_retry, + build_cci) def _get_boolean_var(self, var, default="false"): """ Parse environment variable as boolean type @@ -420,6 +422,9 @@ def process_regular_images(self): tag_arch = "" if arch == "x86_64" else "-%s" % arch service = "%s%s%s%s" % (cross, compiler.name, version.replace(".", ""), tag_arch) build_dir = "%s%s_%s%s" % (cross, compiler.name, version, tag_arch) + if self.variables.build_cci: + service = "%s%s-cci" % (compiler.name, version.replace(".", "")) + build_dir = "%s-cci" % (compiler.name) self.service = service self.login() From 41ed72a79236a7e8802f6cbc1195aabff234713f Mon Sep 17 00:00:00 2001 From: Uilian Ries Date: Fri, 22 May 2020 17:03:04 -0300 Subject: [PATCH 03/21] Remove duplicated job Signed-off-by: Uilian Ries --- azure-pipelines.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index c22f0e595..294d5ff05 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -36,9 +36,6 @@ jobs: Ubuntu Clang 8 CCI: CLANG_VERSIONS: "8" BUILD_CONAN_CCI: 1 - Ubuntu Clang 8 CCI: - CLANG_VERSIONS: "8" - BUILD_CONAN_CCI: 1 Ubuntu Clang 6 CCI: CLANG_VERSIONS: "6" BUILD_CONAN_CCI: 1 From 709875a68868ecf823ad877e6293abcd502a0150 Mon Sep 17 00:00:00 2001 From: Uilian Ries Date: Fri, 22 May 2020 17:05:08 -0300 Subject: [PATCH 04/21] Build only CCI images Signed-off-by: Uilian Ries --- azure-pipelines.yml | 153 -------------------------------------------- 1 file changed, 153 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 294d5ff05..b39f6601d 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -48,156 +48,3 @@ jobs: Ubuntu Clang 3.9 CCI: CLANG_VERSIONS: "3.9" BUILD_CONAN_CCI: 1 - - CentOS 6 GCC 7 x86_64: - GCC_VERSIONS: "7" - DOCKER_ARCHS: "x86_64" - DOCKER_DISTRO: "centos6,jnlp-slave-centos6" - CentOS 6 GCC 7 x86: - GCC_VERSIONS: "7" - DOCKER_ARCHS: "x86" - DOCKER_DISTRO: "centos6,jnlp-slave-centos6" - Ubuntu MinGW GCC 7 x86_64: - GCC_VERSIONS: "7" - DOCKER_ARCHS: "x86_64" - DOCKER_DISTRO: "mingw" - - Ubuntu GCC 4.6: - GCC_VERSIONS: "4.6" - DOCKER_DISTRO: "jnlp-slave" - Ubuntu GCC 4.8: - GCC_VERSIONS: "4.8" - DOCKER_DISTRO: "jnlp-slave" - Ubuntu GCC 4.8 x86: - GCC_VERSIONS: "4.8" - DOCKER_ARCHS: "x86" - DOCKER_DISTRO: "jnlp-slave" - Ubuntu GCC 4.9: - GCC_VERSIONS: "4.9" - DOCKER_ARCHS: "x86_64,armv7,armv7hf" - DOCKER_DISTRO: "jnlp-slave" - Ubuntu GCC 4.9 x86: - GCC_VERSIONS: "4.9" - DOCKER_ARCHS: "x86" - DOCKER_DISTRO: "jnlp-slave" - Ubuntu GCC 5: - GCC_VERSIONS: "5" - DOCKER_ARCHS: "x86_64,armv7,armv7hf,armv8" - DOCKER_DISTRO: "jnlp-slave" - Ubuntu GCC 5 x86: - GCC_VERSIONS: "5" - DOCKER_ARCHS: "x86" - DOCKER_DISTRO: "jnlp-slave" - Ubuntu GCC 5.2 x86_64: - GCC_VERSIONS: "5.2" - Ubuntu GCC 5.3 x86_64: - GCC_VERSIONS: "5.3" - Ubuntu GCC 6: - GCC_VERSIONS: "6" - DOCKER_ARCHS: "x86_64,armv7,armv7hf,armv8" - DOCKER_DISTRO: "jnlp-slave" - Ubuntu GCC 6 x86: - GCC_VERSIONS: "6" - DOCKER_ARCHS: "x86" - DOCKER_DISTRO: "jnlp-slave" - Ubuntu GCC 6.3 x86_64: - GCC_VERSIONS: "6.3" - Ubuntu GCC 6.4 x86_64: - GCC_VERSIONS: "6.4" - Ubuntu GCC 7: - GCC_VERSIONS: "7" - DOCKER_ARCHS: "x86_64,armv7,armv7hf,armv8" - DOCKER_DISTRO: "jnlp-slave" - Ubuntu GCC 7 x86: - GCC_VERSIONS: "7" - DOCKER_ARCHS: "x86" - DOCKER_DISTRO: "jnlp-slave" - Ubuntu GCC 7.2 x86_64: - GCC_VERSIONS: "7.2" - Ubuntu GCC 8: - GCC_VERSIONS: "8" - DOCKER_ARCHS: "x86_64,armv7,armv7hf,armv8" - DOCKER_DISTRO: "jnlp-slave" - Ubuntu GCC 8 x86: - GCC_VERSIONS: "8" - DOCKER_ARCHS: "x86" - DOCKER_DISTRO: "jnlp-slave" - Ubuntu GCC 9: - GCC_VERSIONS: "9" - DOCKER_ARCHS: "x86_64,armv7,armv7hf,armv8" - DOCKER_DISTRO: "jnlp-slave" - Ubuntu GCC 9 x86: - GCC_VERSIONS: "9" - DOCKER_ARCHS: "x86" - DOCKER_DISTRO: "jnlp-slave" - Ubuntu GCC 10: - GCC_VERSIONS: "10" - DOCKER_ARCHS: "x86_64,armv7,armv7hf" - DOCKER_DISTRO: "jnlp-slave" - - Ubuntu Clang 3.8 x86_64: - CLANG_VERSIONS: "3.8" - Ubuntu Clang 3.9 x86_64: - CLANG_VERSIONS: "3.9" - DOCKER_DISTRO: "jnlp-slave" - Ubuntu Clang 3.9 x86: - CLANG_VERSIONS: "3.9" - DOCKER_ARCHS: "x86" - DOCKER_DISTRO: "jnlp-slave" - Ubuntu Clang 4.0 x86_64: - CLANG_VERSIONS: "4.0" - DOCKER_DISTRO: "jnlp-slave" - Ubuntu Clang 4.0 x86: - CLANG_VERSIONS: "4.0" - DOCKER_ARCHS: "x86" - DOCKER_DISTRO: "jnlp-slave" - Ubuntu Clang 5.0 x86_64: - CLANG_VERSIONS: "5.0" - DOCKER_DISTRO: "jnlp-slave" - Ubuntu Clang 5.0 x86: - CLANG_VERSIONS: "5.0" - DOCKER_ARCHS: "x86" - DOCKER_DISTRO: "jnlp-slave" - Ubuntu Clang 6.0 x86_64: - CLANG_VERSIONS: "6.0" - DOCKER_DISTRO: "jnlp-slave" - Ubuntu Clang 6.0 x86: - CLANG_VERSIONS: "6.0" - DOCKER_ARCHS: "x86" - DOCKER_DISTRO: "jnlp-slave" - Ubuntu Clang 7 x86_64: - CLANG_VERSIONS: "7" - DOCKER_DISTRO: "jnlp-slave" - Ubuntu Clang 7 x86: - CLANG_VERSIONS: "7" - DOCKER_ARCHS: "x86" - DOCKER_DISTRO: "jnlp-slave" - Ubuntu Clang 8 x86_64: - CLANG_VERSIONS: "8" - DOCKER_DISTRO: "jnlp-slave" - Ubuntu Clang 8 x86: - CLANG_VERSIONS: "8" - DOCKER_ARCHS: "x86" - DOCKER_DISTRO: "jnlp-slave" - Ubuntu Clang 9 x86_64: - CLANG_VERSIONS: "9" - DOCKER_DISTRO: "jnlp-slave" - Ubuntu Clang 9 x86: - CLANG_VERSIONS: "9" - DOCKER_ARCHS: "x86" - DOCKER_DISTRO: "jnlp-slave" - Ubuntu Clang 10 x86_64: - CLANG_VERSIONS: "10" - DOCKER_DISTRO: "jnlp-slave" - - Android Clang 8: - DOCKER_CROSS: "android" - CLANG_VERSIONS: "8" - DOCKER_ARCHS: "x86_64,x86,armv7,armv8" - - Conan Server: - BUILD_CONAN_SERVER_IMAGE: 1 - - Conan Tests: - BUILD_CONAN_TESTS: 1 - BUILD_CONAN_TEST_AZURE: 1 From e70e1b4cac619b7f810906587a6086e59473500f Mon Sep 17 00:00:00 2001 From: Uilian Ries Date: Fri, 22 May 2020 17:34:44 -0300 Subject: [PATCH 05/21] Fix pip command Signed-off-by: Uilian Ries --- clang-cci/Dockerfile | 2 +- gcc-cci/Dockerfile | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/clang-cci/Dockerfile b/clang-cci/Dockerfile index b2b7b19ec..15695afda 100644 --- a/clang-cci/Dockerfile +++ b/clang-cci/Dockerfile @@ -12,7 +12,7 @@ ENV LLVM_VERSION=$COMPILER_VERSION \ PYENV_ROOT=/opt/pyenv \ PYTHON_VERSION=3.8.2 \ PATH=/opt/pyenv/shims:${PATH} \ - CMAKE_VERSION=3.16.6 + CMAKE_VERSION=3.17.2 RUN dpkg --add-architecture i386 \ && apt-get -qq update \ diff --git a/gcc-cci/Dockerfile b/gcc-cci/Dockerfile index c01259c24..f62c53c60 100644 --- a/gcc-cci/Dockerfile +++ b/gcc-cci/Dockerfile @@ -9,7 +9,7 @@ ENV PYENV_ROOT=/opt/pyenv \ CXX=/usr/bin/g++ \ CC=/usr/bin/gcc \ PYTHON_VERSION=3.8.2 \ - CMAKE_VERSION=3.16.4 \ + CMAKE_VERSION=3.17.2 \ GCC_VERSION=$COMPILER_VERSION RUN apt-get -qq update \ @@ -92,8 +92,9 @@ RUN wget --no-check-certificate --quiet -O /tmp/pyenv-installer https://github.c && update-alternatives --install /usr/bin/pyenv pyenv /opt/pyenv/bin/pyenv 100 \ && PYTHON_CONFIGURE_OPTS="--enable-shared" pyenv install ${PYTHON_VERSION} \ && pyenv global ${PYTHON_VERSION} \ - && pip install -q --upgrade --no-cache-dir pip \ - && pip install -q --no-cache-dir conan conan-package-tools cmake==${CMAKE_VERSION} \ + && pip install -q --upgrade --no-cache-dir pip + +RUN pip install -q --no-cache-dir conan conan-package-tools cmake==${CMAKE_VERSION} \ && chown -R conan:1001 /opt/pyenv \ # remove all __pycache__ directories created by pyenv && find /opt/pyenv -iname __pycache__ -print0 | xargs -0 rm -rf \ From cba9aab88dc47ce4efc776e8b80f774abfafc2af Mon Sep 17 00:00:00 2001 From: Uilian Ries Date: Fri, 22 May 2020 17:57:48 -0300 Subject: [PATCH 06/21] Install clang Signed-off-by: Uilian Ries --- azure-pipelines.yml | 7 +++++++ clang-cci/Dockerfile | 13 +++++++------ docker-compose.yml | 36 ++++++++++++++++++------------------ 3 files changed, 32 insertions(+), 24 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index b39f6601d..18a6604c5 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -30,12 +30,19 @@ jobs: Ubuntu GCC 6 CCI: GCC_VERSIONS: "6" BUILD_CONAN_CCI: 1 + Ubuntu Clang 10 CCI: CLANG_VERSIONS: "10" BUILD_CONAN_CCI: 1 + Ubuntu Clang 9 CCI: + CLANG_VERSIONS: "9" + BUILD_CONAN_CCI: 1 Ubuntu Clang 8 CCI: CLANG_VERSIONS: "8" BUILD_CONAN_CCI: 1 + Ubuntu Clang 7 CCI: + CLANG_VERSIONS: "7" + BUILD_CONAN_CCI: 1 Ubuntu Clang 6 CCI: CLANG_VERSIONS: "6" BUILD_CONAN_CCI: 1 diff --git a/clang-cci/Dockerfile b/clang-cci/Dockerfile index 15695afda..76286dd63 100644 --- a/clang-cci/Dockerfile +++ b/clang-cci/Dockerfile @@ -29,15 +29,16 @@ RUN dpkg --add-architecture i386 \ apt-transport-https # Install compiler toolset RUN apt-get install -y --no-install-recommends \ - lsb-release \ software-properties-common \ - && wget https://apt.llvm.org/llvm.sh \ - && chmod +x llvm.sh \ - && sudo ./llvm.sh ${LLVM_VERSION} \ - && rm llvm.sh + && wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add - \ + && add-apt-repository "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-${LLVM_VERSION} main" \ + && apt-get update - # Further LLVM packages not installed by the llvm.sh script RUN apt-get install -y --no-install-recommends \ + clang-${LLVM_VERSION} \ + lldb-${LLVM_VERSION} \ + lld-${LLVM_VERSION} \ + clangd-${LLVM_VERSION} \ libc++-${LLVM_VERSION}-dev \ libc++abi-${LLVM_VERSION}-dev \ && apt-get remove -y lsb-release software-properties-common diff --git a/docker-compose.yml b/docker-compose.yml index 28a0245aa..170723f84 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -832,15 +832,15 @@ services: image: "${DOCKER_USERNAME}/clang10-cci:${DOCKER_BUILD_TAG}" container_name: clang10-cci tty: true -# clang9-cci: -# build: -# context: clang-cci -# dockerfile: Dockerfile -# args: -# COMPILER_VERSION: 9.0.1 -# image: "${DOCKER_USERNAME}/clang9-cci:${DOCKER_BUILD_TAG}" -# container_name: clang9-cci -# tty: true + clang9-cci: + build: + context: clang-cci + dockerfile: Dockerfile + args: + COMPILER_VERSION: 9.0.1 + image: "${DOCKER_USERNAME}/clang9-cci:${DOCKER_BUILD_TAG}" + container_name: clang9-cci + tty: true clang8-cci: build: context: clang-cci @@ -850,15 +850,15 @@ services: image: "${DOCKER_USERNAME}/clang8-cci:${DOCKER_BUILD_TAG}" container_name: clang8-cci tty: true -# clang7-cci: -# build: -# context: clang-cci -# dockerfile: Dockerfile -# args: -# COMPILER_VERSION: 7 -# image: "${DOCKER_USERNAME}/clang7-cci:${DOCKER_BUILD_TAG}" -# container_name: clang7-cci -# tty: true + clang7-cci: + build: + context: clang-cci + dockerfile: Dockerfile + args: + COMPILER_VERSION: 7 + image: "${DOCKER_USERNAME}/clang7-cci:${DOCKER_BUILD_TAG}" + container_name: clang7-cci + tty: true clang6-cci: build: context: clang-cci From 3d6dd6a0fe3142c404a8cdb99020d086c542b300 Mon Sep 17 00:00:00 2001 From: Uilian Ries Date: Fri, 22 May 2020 18:24:13 -0300 Subject: [PATCH 07/21] Build old clang version Signed-off-by: Uilian Ries --- clang-cci/Dockerfile | 1 - clang-cci/Dockerfile.old | 99 ++++++++++++++++++++++++++++++++++++++++ docker-compose.yml | 8 ++-- 3 files changed, 103 insertions(+), 5 deletions(-) create mode 100644 clang-cci/Dockerfile.old diff --git a/clang-cci/Dockerfile b/clang-cci/Dockerfile index 76286dd63..b1cef6c7b 100644 --- a/clang-cci/Dockerfile +++ b/clang-cci/Dockerfile @@ -38,7 +38,6 @@ RUN apt-get install -y --no-install-recommends \ clang-${LLVM_VERSION} \ lldb-${LLVM_VERSION} \ lld-${LLVM_VERSION} \ - clangd-${LLVM_VERSION} \ libc++-${LLVM_VERSION}-dev \ libc++abi-${LLVM_VERSION}-dev \ && apt-get remove -y lsb-release software-properties-common diff --git a/clang-cci/Dockerfile.old b/clang-cci/Dockerfile.old new file mode 100644 index 000000000..06b90ffa2 --- /dev/null +++ b/clang-cci/Dockerfile.old @@ -0,0 +1,99 @@ +FROM ubuntu:xenial + +LABEL maintainer="Conan.io " + +ARG COMPILER_VERSION + +ENV LLVM_VERSION=$COMPILER_VERSION \ + CC=clang \ + CXX=clang++ \ + CMAKE_C_COMPILER=clang \ + CMAKE_CXX_COMPILER=clang++ \ + PYENV_ROOT=/opt/pyenv \ + PYTHON_VERSION=3.8.2 \ + PATH=/opt/pyenv/shims:${PATH} \ + CMAKE_VERSION=3.17.2 + +RUN dpkg --add-architecture i386 \ + && apt-get -qq update \ + # Install basics + && apt-get install -y --no-install-recommends \ + sudo \ + wget \ + git \ + subversion \ + make \ + gnupg \ + ca-certificates \ + dh-autoreconf \ + apt-transport-https + # Install compiler toolset +RUN apt-get install -y --no-install-recommends \ + software-properties-common \ + && wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add - \ + && add-apt-repository "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-${LLVM_VERSION} main" \ + && apt-get update + +RUN apt-get install -y --no-install-recommends \ + clang-${LLVM_VERSION} \ + lldb-${LLVM_VERSION} \ + lld-${LLVM_VERSION} \ + libc++-dev \ + && apt-get remove -y lsb-release software-properties-common + + # Install dependencies of Python +RUN apt-get install -y --no-install-recommends \ + libreadline-dev \ + libsqlite3-dev \ + libffi-dev \ + libssl-dev \ + zlib1g-dev \ + libbz2-dev \ + xz-utils \ + curl \ + libncurses5-dev \ + libncursesw5-dev \ + liblzma-dev \ + && apt-get autoremove -y \ + && apt-get clean all + + # Update default compiler +RUN update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-${LLVM_VERSION} 100 \ + && update-alternatives --install /usr/bin/clang clang /usr/bin/clang-${LLVM_VERSION} 100 \ + && update-alternatives --install /usr/bin/cc cc /usr/bin/clang-${LLVM_VERSION} 100 \ + && update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++-${LLVM_VERSION} 100 \ + && update-alternatives --install /usr/bin/cpp cpp /usr/bin/clang++-${LLVM_VERSION} 100 \ + && rm -rf /var/lib/apt/lists/* \ + && groupadd 1001 -g 1001 \ + && groupadd 1000 -g 1000 \ + && groupadd 2000 -g 2000 \ + && groupadd 999 -g 999 \ + && useradd -ms /bin/bash conan -g 1001 -G 1000,2000,999 \ + && printf "conan:conan" | chpasswd \ + && adduser conan sudo \ + && printf "conan ALL= NOPASSWD: ALL\\n" >> /etc/sudoers + +RUN wget --no-check-certificate --quiet -O /tmp/pyenv-installer https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer \ + && chmod +x /tmp/pyenv-installer \ + && /tmp/pyenv-installer \ + && rm /tmp/pyenv-installer \ + && update-alternatives --install /usr/bin/pyenv pyenv /opt/pyenv/bin/pyenv 100 \ + && PYTHON_CONFIGURE_OPTS="--enable-shared" pyenv install ${PYTHON_VERSION} \ + && pyenv global ${PYTHON_VERSION} \ + && pip install -q --upgrade --no-cache-dir pip \ + && pip install -q --no-cache-dir conan conan-package-tools cmake==${CMAKE_VERSION} \ + && chown -R conan:1001 /opt/pyenv + + # remove all __pycache__ directories created by pyenv +RUN find /opt/pyenv -iname __pycache__ -print0 | xargs -0 rm -rf \ + && update-alternatives --install /usr/bin/python python /opt/pyenv/shims/python 100 \ + && update-alternatives --install /usr/bin/python3 python3 /opt/pyenv/shims/python3 100 \ + && update-alternatives --install /usr/bin/pip pip /opt/pyenv/shims/pip 100 \ + && update-alternatives --install /usr/bin/pip3 pip3 /opt/pyenv/shims/pip3 100 + +USER conan +WORKDIR /home/conan + +RUN mkdir -p /home/conan/.conan \ + && printf 'eval "$(pyenv init -)"\n' >> ~/.bashrc \ + && printf 'eval "$(pyenv virtualenv-init -)"\n' >> ~/.bashrc diff --git a/docker-compose.yml b/docker-compose.yml index 170723f84..484a6750b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -862,7 +862,7 @@ services: clang6-cci: build: context: clang-cci - dockerfile: Dockerfile + dockerfile: Dockerfile.old args: COMPILER_VERSION: 6.0 image: "${DOCKER_USERNAME}/clang6-cci:${DOCKER_BUILD_TAG}" @@ -871,7 +871,7 @@ services: clang5-cci: build: context: clang-cci - dockerfile: Dockerfile + dockerfile: Dockerfile.old args: COMPILER_VERSION: 5.0 image: "${DOCKER_USERNAME}/clang5-cci:${DOCKER_BUILD_TAG}" @@ -880,7 +880,7 @@ services: clang4-cci: build: context: clang-cci - dockerfile: Dockerfile + dockerfile: Dockerfile.old args: COMPILER_VERSION: 4.0 image: "${DOCKER_USERNAME}/clang4-cci:${DOCKER_BUILD_TAG}" @@ -889,7 +889,7 @@ services: clang39-cci: build: context: clang-cci - dockerfile: Dockerfile + dockerfile: Dockerfile.old args: COMPILER_VERSION: 3.9 image: "${DOCKER_USERNAME}/clang39-cci:${DOCKER_BUILD_TAG}" From a7d4d8773b29c080941f2bb5ee55d05c7e6ce5b9 Mon Sep 17 00:00:00 2001 From: Uilian Ries Date: Fri, 22 May 2020 18:33:02 -0300 Subject: [PATCH 08/21] Fix clang versions Signed-off-by: Uilian Ries --- azure-pipelines.yml | 6 +++--- docker-compose.yml | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 18a6604c5..a375d438d 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -44,13 +44,13 @@ jobs: CLANG_VERSIONS: "7" BUILD_CONAN_CCI: 1 Ubuntu Clang 6 CCI: - CLANG_VERSIONS: "6" + CLANG_VERSIONS: "6.0" BUILD_CONAN_CCI: 1 Ubuntu Clang 5 CCI: - CLANG_VERSIONS: "5" + CLANG_VERSIONS: "5.0" BUILD_CONAN_CCI: 1 Ubuntu Clang 4 CCI: - CLANG_VERSIONS: "4" + CLANG_VERSIONS: "4.0" BUILD_CONAN_CCI: 1 Ubuntu Clang 3.9 CCI: CLANG_VERSIONS: "3.9" diff --git a/docker-compose.yml b/docker-compose.yml index 484a6750b..0b94db48a 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -859,7 +859,7 @@ services: image: "${DOCKER_USERNAME}/clang7-cci:${DOCKER_BUILD_TAG}" container_name: clang7-cci tty: true - clang6-cci: + clang60-cci: build: context: clang-cci dockerfile: Dockerfile.old @@ -868,7 +868,7 @@ services: image: "${DOCKER_USERNAME}/clang6-cci:${DOCKER_BUILD_TAG}" container_name: clang6-cci tty: true - clang5-cci: + clang50-cci: build: context: clang-cci dockerfile: Dockerfile.old @@ -877,7 +877,7 @@ services: image: "${DOCKER_USERNAME}/clang5-cci:${DOCKER_BUILD_TAG}" container_name: clang5-cci tty: true - clang4-cci: + clang40-cci: build: context: clang-cci dockerfile: Dockerfile.old From 97849a8cbcfb8f7e393f10522edb7a189a06f8e8 Mon Sep 17 00:00:00 2001 From: Uilian Ries Date: Fri, 22 May 2020 18:47:52 -0300 Subject: [PATCH 09/21] Fix clang versions Signed-off-by: Uilian Ries --- docker-compose.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 0b94db48a..e48375136 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -865,7 +865,7 @@ services: dockerfile: Dockerfile.old args: COMPILER_VERSION: 6.0 - image: "${DOCKER_USERNAME}/clang6-cci:${DOCKER_BUILD_TAG}" + image: "${DOCKER_USERNAME}/clang60-cci:${DOCKER_BUILD_TAG}" container_name: clang6-cci tty: true clang50-cci: @@ -874,7 +874,7 @@ services: dockerfile: Dockerfile.old args: COMPILER_VERSION: 5.0 - image: "${DOCKER_USERNAME}/clang5-cci:${DOCKER_BUILD_TAG}" + image: "${DOCKER_USERNAME}/clang50-cci:${DOCKER_BUILD_TAG}" container_name: clang5-cci tty: true clang40-cci: @@ -883,7 +883,7 @@ services: dockerfile: Dockerfile.old args: COMPILER_VERSION: 4.0 - image: "${DOCKER_USERNAME}/clang4-cci:${DOCKER_BUILD_TAG}" + image: "${DOCKER_USERNAME}/clang40-cci:${DOCKER_BUILD_TAG}" container_name: clang4-cci tty: true clang39-cci: From b9ead40cc503a14b859023e66569058b757da6a8 Mon Sep 17 00:00:00 2001 From: Uilian Ries Date: Fri, 22 May 2020 18:54:17 -0300 Subject: [PATCH 10/21] Fix clang versions Signed-off-by: Uilian Ries --- docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index e48375136..72cc873a9 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -837,7 +837,7 @@ services: context: clang-cci dockerfile: Dockerfile args: - COMPILER_VERSION: 9.0.1 + COMPILER_VERSION: 9 image: "${DOCKER_USERNAME}/clang9-cci:${DOCKER_BUILD_TAG}" container_name: clang9-cci tty: true From 3ba4f67cc09ca879de5fbed1ef6b91032466123f Mon Sep 17 00:00:00 2001 From: Uilian Ries Date: Fri, 22 May 2020 18:57:06 -0300 Subject: [PATCH 11/21] Fix clang libs Signed-off-by: Uilian Ries --- clang-cci/Dockerfile.old | 1 + 1 file changed, 1 insertion(+) diff --git a/clang-cci/Dockerfile.old b/clang-cci/Dockerfile.old index 06b90ffa2..b98fbec5b 100644 --- a/clang-cci/Dockerfile.old +++ b/clang-cci/Dockerfile.old @@ -39,6 +39,7 @@ RUN apt-get install -y --no-install-recommends \ lldb-${LLVM_VERSION} \ lld-${LLVM_VERSION} \ libc++-dev \ + libc++abi1 \ && apt-get remove -y lsb-release software-properties-common # Install dependencies of Python From 247ca6cc71e8a9374210d4d59f16191a2294b287 Mon Sep 17 00:00:00 2001 From: Uilian Ries Date: Fri, 22 May 2020 20:59:36 -0300 Subject: [PATCH 12/21] Get pre-built libc++ Signed-off-by: Uilian Ries --- clang-cci/Dockerfile.old | 15 +++++++++++---- docker-compose.yml | 4 ++++ 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/clang-cci/Dockerfile.old b/clang-cci/Dockerfile.old index b98fbec5b..495ddbd78 100644 --- a/clang-cci/Dockerfile.old +++ b/clang-cci/Dockerfile.old @@ -3,8 +3,10 @@ FROM ubuntu:xenial LABEL maintainer="Conan.io " ARG COMPILER_VERSION +ARG LIBRARY_VERSION ENV LLVM_VERSION=$COMPILER_VERSION \ + LIBCXX_VERSION=$LIBRARY_VERSION \ CC=clang \ CXX=clang++ \ CMAKE_C_COMPILER=clang \ @@ -26,8 +28,15 @@ RUN dpkg --add-architecture i386 \ gnupg \ ca-certificates \ dh-autoreconf \ - apt-transport-https + apt-transport-https \ + xz-utils # Install compiler toolset + +RUN wget --no-check-certificate --quiet https://releases.llvm.org/${LIBCXX_VERSION}/clang+llvm-${LIBCXX_VERSION}-x86_64-linux-gnu-ubuntu-16.04.tar.xz \ + && tar Jxf clang+llvm-${LIBCXX_VERSION}-x86_64-linux-gnu-ubuntu-16.04.tar.xz \ + && find clang+llvm-${LIBCXX_VERSION}-x86_64-linux-gnu-ubuntu-16.04/ -type f -name "libc++*" | xargs -i cp {} /usr/lib/x86_64-linux-gnu \ + && rm -rf clang* + RUN apt-get install -y --no-install-recommends \ software-properties-common \ && wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add - \ @@ -38,10 +47,9 @@ RUN apt-get install -y --no-install-recommends \ clang-${LLVM_VERSION} \ lldb-${LLVM_VERSION} \ lld-${LLVM_VERSION} \ - libc++-dev \ - libc++abi1 \ && apt-get remove -y lsb-release software-properties-common + # Install dependencies of Python RUN apt-get install -y --no-install-recommends \ libreadline-dev \ @@ -50,7 +58,6 @@ RUN apt-get install -y --no-install-recommends \ libssl-dev \ zlib1g-dev \ libbz2-dev \ - xz-utils \ curl \ libncurses5-dev \ libncursesw5-dev \ diff --git a/docker-compose.yml b/docker-compose.yml index 72cc873a9..b5a4a056f 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -865,6 +865,7 @@ services: dockerfile: Dockerfile.old args: COMPILER_VERSION: 6.0 + LIBRARY_VERSION: 6.0.1 image: "${DOCKER_USERNAME}/clang60-cci:${DOCKER_BUILD_TAG}" container_name: clang6-cci tty: true @@ -874,6 +875,7 @@ services: dockerfile: Dockerfile.old args: COMPILER_VERSION: 5.0 + LIBRARY_VERSION: 5.0.2 image: "${DOCKER_USERNAME}/clang50-cci:${DOCKER_BUILD_TAG}" container_name: clang5-cci tty: true @@ -883,6 +885,7 @@ services: dockerfile: Dockerfile.old args: COMPILER_VERSION: 4.0 + LIBRARY_VERSION: 4.0.1 image: "${DOCKER_USERNAME}/clang40-cci:${DOCKER_BUILD_TAG}" container_name: clang4-cci tty: true @@ -892,6 +895,7 @@ services: dockerfile: Dockerfile.old args: COMPILER_VERSION: 3.9 + LIBRARY_VERSION: 3.9.1 image: "${DOCKER_USERNAME}/clang39-cci:${DOCKER_BUILD_TAG}" container_name: clang39-cci tty: true From 4ebdb6fa40decd7e154c67f8573206817c23af6e Mon Sep 17 00:00:00 2001 From: Uilian Ries Date: Fri, 22 May 2020 21:15:11 -0300 Subject: [PATCH 13/21] Get pre-built libc++ Signed-off-by: Uilian Ries --- clang-cci/Dockerfile.old | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/clang-cci/Dockerfile.old b/clang-cci/Dockerfile.old index 495ddbd78..8d1147f8f 100644 --- a/clang-cci/Dockerfile.old +++ b/clang-cci/Dockerfile.old @@ -32,10 +32,10 @@ RUN dpkg --add-architecture i386 \ xz-utils # Install compiler toolset -RUN wget --no-check-certificate --quiet https://releases.llvm.org/${LIBCXX_VERSION}/clang+llvm-${LIBCXX_VERSION}-x86_64-linux-gnu-ubuntu-16.04.tar.xz \ - && tar Jxf clang+llvm-${LIBCXX_VERSION}-x86_64-linux-gnu-ubuntu-16.04.tar.xz \ - && find clang+llvm-${LIBCXX_VERSION}-x86_64-linux-gnu-ubuntu-16.04/ -type f -name "libc++*" | xargs -i cp {} /usr/lib/x86_64-linux-gnu \ - && rm -rf clang* +#RUN wget --no-check-certificate --quiet https://releases.llvm.org/${LIBCXX_VERSION}/clang+llvm-${LIBCXX_VERSION}-x86_64-linux-gnu-ubuntu-16.04.tar.xz \ +# && tar Jxf clang+llvm-${LIBCXX_VERSION}-x86_64-linux-gnu-ubuntu-16.04.tar.xz \ +# && find clang+llvm-${LIBCXX_VERSION}-x86_64-linux-gnu-ubuntu-16.04/ -type f -name "libc++*" | xargs -i cp {} /usr/lib/x86_64-linux-gnu \ +# && rm -rf clang* RUN apt-get install -y --no-install-recommends \ software-properties-common \ @@ -47,6 +47,8 @@ RUN apt-get install -y --no-install-recommends \ clang-${LLVM_VERSION} \ lldb-${LLVM_VERSION} \ lld-${LLVM_VERSION} \ + libc++-8-dev \ + libc++abi-8-dev \ && apt-get remove -y lsb-release software-properties-common From 6a016a28512b48074ee4524ddd98a36c709295f9 Mon Sep 17 00:00:00 2001 From: Uilian Ries Date: Wed, 27 May 2020 18:58:03 -0300 Subject: [PATCH 14/21] build libcxx Signed-off-by: Uilian Ries --- clang-cci/Dockerfile.old | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/clang-cci/Dockerfile.old b/clang-cci/Dockerfile.old index 8d1147f8f..f7f26ad25 100644 --- a/clang-cci/Dockerfile.old +++ b/clang-cci/Dockerfile.old @@ -47,8 +47,6 @@ RUN apt-get install -y --no-install-recommends \ clang-${LLVM_VERSION} \ lldb-${LLVM_VERSION} \ lld-${LLVM_VERSION} \ - libc++-8-dev \ - libc++abi-8-dev \ && apt-get remove -y lsb-release software-properties-common @@ -99,7 +97,31 @@ RUN find /opt/pyenv -iname __pycache__ -print0 | xargs -0 rm -rf \ && update-alternatives --install /usr/bin/python python /opt/pyenv/shims/python 100 \ && update-alternatives --install /usr/bin/python3 python3 /opt/pyenv/shims/python3 100 \ && update-alternatives --install /usr/bin/pip pip /opt/pyenv/shims/pip 100 \ - && update-alternatives --install /usr/bin/pip3 pip3 /opt/pyenv/shims/pip3 100 + && update-alternatives --install /usr/bin/pip3 pip3 /opt/pyenv/shims/pip3 100 \ + && update-alternatives --install /usr/bin/cmake cmake /opt/pyenv/shims/cmake 100 + +RUN wget --no-check-certificate --quiet https://releases.llvm.org/${LIBCXX_VERSION}/libcxx-${LIBCXX_VERSION}.src.tar.xz \ + && tar Jxf libcxx-${LIBCXX_VERSION}.src.tar.xz \ + && cd libcxx-${LIBCXX_VERSION}.src \ + && mkdir build \ + && cd build \ + && cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr -DLLVM_CONFIG_PATH=/usr/bin/llvm-config-${LLVM_VERSION} \ + && cmake --build . \ + && cmake --build . --target install \ + && cd \ + && rm -rf libcxx-* + +RUN wget --no-check-certificate --quiet https://releases.llvm.org/${LIBCXX_VERSION}/libcxxabi-${LIBCXX_VERSION}.src.tar.xz \ + && tar Jxf libcxxabi-${LIBCXX_VERSION}.src.tar.xz \ + && cd libcxxabi-${LIBCXX_VERSION}.src \ + && cp include/* /usr/include \ + && mkdir build \ + && cd build \ + && cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr -DLLVM_CONFIG_PATH=/usr/bin/llvm-config-${LLVM_VERSION} -DLIBCXXABI_LIBCXX_INCLUDES=/usr/include/c++/v1 \ + && cmake --build . \ + && cmake --build . --target install \ + && cd \ + && rm -rf libcxxabi-* USER conan WORKDIR /home/conan From 6633fc8fc0a0bc943a0bf45af332adb7c9779570 Mon Sep 17 00:00:00 2001 From: Uilian Ries Date: Wed, 27 May 2020 19:30:12 -0300 Subject: [PATCH 15/21] Fix clang 7 test Signed-off-by: Uilian Ries --- build.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/build.py b/build.py index ed6102a3f..0b75559bc 100644 --- a/build.py +++ b/build.py @@ -266,7 +266,9 @@ def test_linux(self, arch, compiler_name, compiler_version, distro): subprocess.check_call("docker exec %s conan user" % self.service, shell=True) if compiler_name == "clang" and compiler_version == "7": - compiler_version = "7.0" # FIXME: Remove this when fixed in conan + compiler_version = "7.0" + if "cci" in self.service: + compiler_version = "7.1" subprocess.check_call( "docker exec %s conan install lz4/1.9.2@ -s " @@ -369,6 +371,12 @@ def tag(self): self.tagged_image_name.replace("clang7", "clang70")), shell=True) subprocess.check_call("docker tag %s/clang7 %s/clang70" % (self.variables.docker_username, self.variables.docker_username), shell=True) + elif if self.service == "clang7-cci": + logging.info("Clang 7 CCI will produce the alias Clang 7.1") + subprocess.check_call("docker tag %s %s" % (self.created_image_name, + self.tagged_image_name.replace("clang7-cci", "clang71-cci")), shell=True) + subprocess.check_call("docker tag %s/clang7-cci %s/clang71-cci" % + (self.variables.docker_username, self.variables.docker_username), shell=True) def info(self): """Show Docker image info From f39dc0f8aec783cfdb014152c7b43430de9738fe Mon Sep 17 00:00:00 2001 From: Uilian Ries Date: Wed, 27 May 2020 19:32:06 -0300 Subject: [PATCH 16/21] ignore ldd install error Signed-off-by: Uilian Ries --- clang-cci/Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/clang-cci/Dockerfile b/clang-cci/Dockerfile index b1cef6c7b..a5146add3 100644 --- a/clang-cci/Dockerfile +++ b/clang-cci/Dockerfile @@ -37,11 +37,12 @@ RUN apt-get install -y --no-install-recommends \ RUN apt-get install -y --no-install-recommends \ clang-${LLVM_VERSION} \ lldb-${LLVM_VERSION} \ - lld-${LLVM_VERSION} \ libc++-${LLVM_VERSION}-dev \ libc++abi-${LLVM_VERSION}-dev \ && apt-get remove -y lsb-release software-properties-common +RUN apt-get install -y --no-install-recommends lld-${LLVM_VERSION} | true + # Install dependencies of Python RUN apt-get install -y --no-install-recommends \ libreadline-dev \ From ef7bf6346247e8342121218aeccadbedb1696786 Mon Sep 17 00:00:00 2001 From: Uilian Ries Date: Wed, 27 May 2020 19:41:13 -0300 Subject: [PATCH 17/21] Fix clang 7 test Signed-off-by: Uilian Ries --- build.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.py b/build.py index 0b75559bc..c4ec1a82b 100644 --- a/build.py +++ b/build.py @@ -371,7 +371,7 @@ def tag(self): self.tagged_image_name.replace("clang7", "clang70")), shell=True) subprocess.check_call("docker tag %s/clang7 %s/clang70" % (self.variables.docker_username, self.variables.docker_username), shell=True) - elif if self.service == "clang7-cci": + elif self.service == "clang7-cci": logging.info("Clang 7 CCI will produce the alias Clang 7.1") subprocess.check_call("docker tag %s %s" % (self.created_image_name, self.tagged_image_name.replace("clang7-cci", "clang71-cci")), shell=True) From 0fdecf6d9ad5ef7a1ed7b043ba7a2189f4497f75 Mon Sep 17 00:00:00 2001 From: Uilian Ries Date: Wed, 27 May 2020 20:40:21 -0300 Subject: [PATCH 18/21] Fix clang 3.9 Signed-off-by: Uilian Ries --- clang-cci/Dockerfile | 2 -- clang-cci/Dockerfile.old | 8 +++++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/clang-cci/Dockerfile b/clang-cci/Dockerfile index a5146add3..f1f306de3 100644 --- a/clang-cci/Dockerfile +++ b/clang-cci/Dockerfile @@ -41,8 +41,6 @@ RUN apt-get install -y --no-install-recommends \ libc++abi-${LLVM_VERSION}-dev \ && apt-get remove -y lsb-release software-properties-common -RUN apt-get install -y --no-install-recommends lld-${LLVM_VERSION} | true - # Install dependencies of Python RUN apt-get install -y --no-install-recommends \ libreadline-dev \ diff --git a/clang-cci/Dockerfile.old b/clang-cci/Dockerfile.old index f7f26ad25..d36d77c45 100644 --- a/clang-cci/Dockerfile.old +++ b/clang-cci/Dockerfile.old @@ -46,9 +46,10 @@ RUN apt-get install -y --no-install-recommends \ RUN apt-get install -y --no-install-recommends \ clang-${LLVM_VERSION} \ lldb-${LLVM_VERSION} \ - lld-${LLVM_VERSION} \ +# lld-${LLVM_VERSION} \ && apt-get remove -y lsb-release software-properties-common +RUN apt-get install -y --no-install-recommends lld-${LLVM_VERSION} | true # Install dependencies of Python RUN apt-get install -y --no-install-recommends \ @@ -71,6 +72,7 @@ RUN update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-${LL && update-alternatives --install /usr/bin/cc cc /usr/bin/clang-${LLVM_VERSION} 100 \ && update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++-${LLVM_VERSION} 100 \ && update-alternatives --install /usr/bin/cpp cpp /usr/bin/clang++-${LLVM_VERSION} 100 \ + && update-alternatives --install /usr/bin/llvm-config llvm-config /usr/bin/llvm-config-${LLVM_VERSION} 100 \ && rm -rf /var/lib/apt/lists/* \ && groupadd 1001 -g 1001 \ && groupadd 1000 -g 1000 \ @@ -105,7 +107,7 @@ RUN wget --no-check-certificate --quiet https://releases.llvm.org/${LIBCXX_VERSI && cd libcxx-${LIBCXX_VERSION}.src \ && mkdir build \ && cd build \ - && cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr -DLLVM_CONFIG_PATH=/usr/bin/llvm-config-${LLVM_VERSION} \ + && cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr \ && cmake --build . \ && cmake --build . --target install \ && cd \ @@ -117,7 +119,7 @@ RUN wget --no-check-certificate --quiet https://releases.llvm.org/${LIBCXX_VERSI && cp include/* /usr/include \ && mkdir build \ && cd build \ - && cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr -DLLVM_CONFIG_PATH=/usr/bin/llvm-config-${LLVM_VERSION} -DLIBCXXABI_LIBCXX_INCLUDES=/usr/include/c++/v1 \ + && cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr -DLIBCXXABI_LIBCXX_INCLUDES=/usr/include/c++/v1 \ && cmake --build . \ && cmake --build . --target install \ && cd \ From c8c5b7b29f23932d6a640dd84a93b848d8653998 Mon Sep 17 00:00:00 2001 From: Uilian Ries Date: Fri, 29 May 2020 18:35:40 -0300 Subject: [PATCH 19/21] Use cache Signed-off-by: Uilian Ries --- azure-pipelines.yml | 1 + clang-cci/Dockerfile | 6 +++++- clang-cci/Dockerfile.old | 6 +++++- docker-compose.yml | 41 +++++++++++++++++++++++++++++++++++++++- gcc-cci/Dockerfile | 7 ++++++- 5 files changed, 57 insertions(+), 4 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index a375d438d..0bd4f6596 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -13,6 +13,7 @@ jobs: python build.py env: DOCKER_PASSWORD: $(DOCKER_PASSWORD) + DOCKER_CACHE: True strategy: matrix: Ubuntu GCC 10 CCI: diff --git a/clang-cci/Dockerfile b/clang-cci/Dockerfile index f1f306de3..1458bf327 100644 --- a/clang-cci/Dockerfile +++ b/clang-cci/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:xenial +FROM ubuntu:xenial as base LABEL maintainer="Conan.io " @@ -97,3 +97,7 @@ WORKDIR /home/conan RUN mkdir -p /home/conan/.conan \ && printf 'eval "$(pyenv init -)"\n' >> ~/.bashrc \ && printf 'eval "$(pyenv virtualenv-init -)"\n' >> ~/.bashrc + +FROM base as release + +RUN pip install -U conan conan-package-tools diff --git a/clang-cci/Dockerfile.old b/clang-cci/Dockerfile.old index d36d77c45..b2a37c6b7 100644 --- a/clang-cci/Dockerfile.old +++ b/clang-cci/Dockerfile.old @@ -1,4 +1,4 @@ -FROM ubuntu:xenial +FROM ubuntu:xenial as base LABEL maintainer="Conan.io " @@ -131,3 +131,7 @@ WORKDIR /home/conan RUN mkdir -p /home/conan/.conan \ && printf 'eval "$(pyenv init -)"\n' >> ~/.bashrc \ && printf 'eval "$(pyenv virtualenv-init -)"\n' >> ~/.bashrc + +FROM base as release + +RUN pip install -U conan conan-package-tools diff --git a/docker-compose.yml b/docker-compose.yml index b5a4a056f..fd9dad916 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,4 +1,4 @@ -version: '3' +version: '3.4' services: gcc46: build: @@ -784,6 +784,9 @@ services: dockerfile: Dockerfile args: COMPILER_VERSION: 10.1.0 + target: release + cache_from: + - ${DOCKER_USERNAME}/gcc10-cci:${DOCKER_BUILD_TAG} image: "${DOCKER_USERNAME}/gcc10-cci:${DOCKER_BUILD_TAG}" container_name: gcc10-cci tty: true @@ -793,6 +796,9 @@ services: dockerfile: Dockerfile args: COMPILER_VERSION: 9.3.0 + target: release + cache_from: + - ${DOCKER_USERNAME}/gcc9-cci:${DOCKER_BUILD_TAG} image: "${DOCKER_USERNAME}/gcc9-cci:${DOCKER_BUILD_TAG}" container_name: gcc9-cci tty: true @@ -802,6 +808,9 @@ services: dockerfile: Dockerfile args: COMPILER_VERSION: 8.4.0 + target: release + cache_from: + - ${DOCKER_USERNAME}/gcc8-cci:${DOCKER_BUILD_TAG} image: "${DOCKER_USERNAME}/gcc8-cci:${DOCKER_BUILD_TAG}" container_name: gcc8-cci tty: true @@ -811,6 +820,9 @@ services: dockerfile: Dockerfile args: COMPILER_VERSION: 7.5.0 + target: release + cache_from: + - ${DOCKER_USERNAME}/gcc7-cci:${DOCKER_BUILD_TAG} image: "${DOCKER_USERNAME}/gcc7-cci:${DOCKER_BUILD_TAG}" container_name: gcc7-cci tty: true @@ -820,6 +832,9 @@ services: dockerfile: Dockerfile args: COMPILER_VERSION: 6.5.0 + target: release + cache_from: + - ${DOCKER_USERNAME}/gcc6-cci:${DOCKER_BUILD_TAG} image: "${DOCKER_USERNAME}/gcc6-cci:${DOCKER_BUILD_TAG}" container_name: gcc6-cci tty: true @@ -829,6 +844,9 @@ services: dockerfile: Dockerfile args: COMPILER_VERSION: 10 + target: release + cache_from: + - ${DOCKER_USERNAME}/clang10-cci:${DOCKER_BUILD_TAG} image: "${DOCKER_USERNAME}/clang10-cci:${DOCKER_BUILD_TAG}" container_name: clang10-cci tty: true @@ -838,6 +856,9 @@ services: dockerfile: Dockerfile args: COMPILER_VERSION: 9 + target: release + cache_from: + - ${DOCKER_USERNAME}/clang9-cci:${DOCKER_BUILD_TAG} image: "${DOCKER_USERNAME}/clang9-cci:${DOCKER_BUILD_TAG}" container_name: clang9-cci tty: true @@ -847,6 +868,9 @@ services: dockerfile: Dockerfile args: COMPILER_VERSION: 8 + target: release + cache_from: + - ${DOCKER_USERNAME}/clang8-cci:${DOCKER_BUILD_TAG} image: "${DOCKER_USERNAME}/clang8-cci:${DOCKER_BUILD_TAG}" container_name: clang8-cci tty: true @@ -856,6 +880,9 @@ services: dockerfile: Dockerfile args: COMPILER_VERSION: 7 + target: release + cache_from: + - ${DOCKER_USERNAME}/clang7-cci:${DOCKER_BUILD_TAG} image: "${DOCKER_USERNAME}/clang7-cci:${DOCKER_BUILD_TAG}" container_name: clang7-cci tty: true @@ -866,6 +893,9 @@ services: args: COMPILER_VERSION: 6.0 LIBRARY_VERSION: 6.0.1 + target: release + cache_from: + - ${DOCKER_USERNAME}/clang60-cci:${DOCKER_BUILD_TAG} image: "${DOCKER_USERNAME}/clang60-cci:${DOCKER_BUILD_TAG}" container_name: clang6-cci tty: true @@ -876,6 +906,9 @@ services: args: COMPILER_VERSION: 5.0 LIBRARY_VERSION: 5.0.2 + target: release + cache_from: + - ${DOCKER_USERNAME}/clang50-cci:${DOCKER_BUILD_TAG} image: "${DOCKER_USERNAME}/clang50-cci:${DOCKER_BUILD_TAG}" container_name: clang5-cci tty: true @@ -886,6 +919,9 @@ services: args: COMPILER_VERSION: 4.0 LIBRARY_VERSION: 4.0.1 + target: release + cache_from: + - ${DOCKER_USERNAME}/clang40-cci:${DOCKER_BUILD_TAG} image: "${DOCKER_USERNAME}/clang40-cci:${DOCKER_BUILD_TAG}" container_name: clang4-cci tty: true @@ -896,6 +932,9 @@ services: args: COMPILER_VERSION: 3.9 LIBRARY_VERSION: 3.9.1 + target: release + cache_from: + - ${DOCKER_USERNAME}/clang39-cci:${DOCKER_BUILD_TAG} image: "${DOCKER_USERNAME}/clang39-cci:${DOCKER_BUILD_TAG}" container_name: clang39-cci tty: true diff --git a/gcc-cci/Dockerfile b/gcc-cci/Dockerfile index f62c53c60..afa4dd0c8 100644 --- a/gcc-cci/Dockerfile +++ b/gcc-cci/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:xenial +FROM ubuntu:xenial as base LABEL maintainer="Conan.io " @@ -109,3 +109,8 @@ WORKDIR /home/conan RUN mkdir -p /home/conan/.conan \ && printf 'eval "$(pyenv init -)"\n' >> ~/.bashrc \ && printf 'eval "$(pyenv virtualenv-init -)"\n' >> ~/.bashrc + + +FROM base as release + +RUN pip install -U conan conan-package-tools \ No newline at end of file From a1e362f7fb5f04edfeb40769e4b2b88a5fd9a79a Mon Sep 17 00:00:00 2001 From: Uilian Ries Date: Fri, 29 May 2020 18:37:29 -0300 Subject: [PATCH 20/21] pull cache image Signed-off-by: Uilian Ries --- build.py | 1 + 1 file changed, 1 insertion(+) diff --git a/build.py b/build.py index c4ec1a82b..f3bd837bb 100644 --- a/build.py +++ b/build.py @@ -150,6 +150,7 @@ def build(self): """ logging.info("Starting build for service %s." % self.service) no_cache = "" if self.variables.docker_cache else "--no-cache" + subprocess.call("docker pull %s" % self.tagged_image_name, shell=True) subprocess.check_call("docker-compose build %s %s" % (no_cache, self.service), shell=True) output = subprocess.check_output("docker image inspect %s --format '{{.Size}}'" From f27bc85000c017ee939768256f162723e0edb61e Mon Sep 17 00:00:00 2001 From: Uilian Ries Date: Fri, 29 May 2020 18:45:37 -0300 Subject: [PATCH 21/21] latest version as cache Signed-off-by: Uilian Ries --- build.py | 3 ++- docker-compose.yml | 26 +++++++++++++------------- 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/build.py b/build.py index f3bd837bb..5a9b45a0e 100644 --- a/build.py +++ b/build.py @@ -150,7 +150,8 @@ def build(self): """ logging.info("Starting build for service %s." % self.service) no_cache = "" if self.variables.docker_cache else "--no-cache" - subprocess.call("docker pull %s" % self.tagged_image_name, shell=True) + subprocess.call("docker pull %s" % self.tagged_image_name.replace( + self.variables.docker_build_tag, "latest"), shell=True) subprocess.check_call("docker-compose build %s %s" % (no_cache, self.service), shell=True) output = subprocess.check_output("docker image inspect %s --format '{{.Size}}'" diff --git a/docker-compose.yml b/docker-compose.yml index fd9dad916..78a99f991 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -786,7 +786,7 @@ services: COMPILER_VERSION: 10.1.0 target: release cache_from: - - ${DOCKER_USERNAME}/gcc10-cci:${DOCKER_BUILD_TAG} + - ${DOCKER_USERNAME}/gcc10-cci:latest image: "${DOCKER_USERNAME}/gcc10-cci:${DOCKER_BUILD_TAG}" container_name: gcc10-cci tty: true @@ -798,7 +798,7 @@ services: COMPILER_VERSION: 9.3.0 target: release cache_from: - - ${DOCKER_USERNAME}/gcc9-cci:${DOCKER_BUILD_TAG} + - ${DOCKER_USERNAME}/gcc9-cci:latest image: "${DOCKER_USERNAME}/gcc9-cci:${DOCKER_BUILD_TAG}" container_name: gcc9-cci tty: true @@ -810,7 +810,7 @@ services: COMPILER_VERSION: 8.4.0 target: release cache_from: - - ${DOCKER_USERNAME}/gcc8-cci:${DOCKER_BUILD_TAG} + - ${DOCKER_USERNAME}/gcc8-cci:latest image: "${DOCKER_USERNAME}/gcc8-cci:${DOCKER_BUILD_TAG}" container_name: gcc8-cci tty: true @@ -822,7 +822,7 @@ services: COMPILER_VERSION: 7.5.0 target: release cache_from: - - ${DOCKER_USERNAME}/gcc7-cci:${DOCKER_BUILD_TAG} + - ${DOCKER_USERNAME}/gcc7-cci:latest image: "${DOCKER_USERNAME}/gcc7-cci:${DOCKER_BUILD_TAG}" container_name: gcc7-cci tty: true @@ -834,7 +834,7 @@ services: COMPILER_VERSION: 6.5.0 target: release cache_from: - - ${DOCKER_USERNAME}/gcc6-cci:${DOCKER_BUILD_TAG} + - ${DOCKER_USERNAME}/gcc6-cci:latest image: "${DOCKER_USERNAME}/gcc6-cci:${DOCKER_BUILD_TAG}" container_name: gcc6-cci tty: true @@ -846,7 +846,7 @@ services: COMPILER_VERSION: 10 target: release cache_from: - - ${DOCKER_USERNAME}/clang10-cci:${DOCKER_BUILD_TAG} + - ${DOCKER_USERNAME}/clang10-cci:latest image: "${DOCKER_USERNAME}/clang10-cci:${DOCKER_BUILD_TAG}" container_name: clang10-cci tty: true @@ -858,7 +858,7 @@ services: COMPILER_VERSION: 9 target: release cache_from: - - ${DOCKER_USERNAME}/clang9-cci:${DOCKER_BUILD_TAG} + - ${DOCKER_USERNAME}/clang9-cci:latest image: "${DOCKER_USERNAME}/clang9-cci:${DOCKER_BUILD_TAG}" container_name: clang9-cci tty: true @@ -870,7 +870,7 @@ services: COMPILER_VERSION: 8 target: release cache_from: - - ${DOCKER_USERNAME}/clang8-cci:${DOCKER_BUILD_TAG} + - ${DOCKER_USERNAME}/clang8-cci:latest image: "${DOCKER_USERNAME}/clang8-cci:${DOCKER_BUILD_TAG}" container_name: clang8-cci tty: true @@ -882,7 +882,7 @@ services: COMPILER_VERSION: 7 target: release cache_from: - - ${DOCKER_USERNAME}/clang7-cci:${DOCKER_BUILD_TAG} + - ${DOCKER_USERNAME}/clang7-cci:latest image: "${DOCKER_USERNAME}/clang7-cci:${DOCKER_BUILD_TAG}" container_name: clang7-cci tty: true @@ -895,7 +895,7 @@ services: LIBRARY_VERSION: 6.0.1 target: release cache_from: - - ${DOCKER_USERNAME}/clang60-cci:${DOCKER_BUILD_TAG} + - ${DOCKER_USERNAME}/clang60-cci:latest image: "${DOCKER_USERNAME}/clang60-cci:${DOCKER_BUILD_TAG}" container_name: clang6-cci tty: true @@ -908,7 +908,7 @@ services: LIBRARY_VERSION: 5.0.2 target: release cache_from: - - ${DOCKER_USERNAME}/clang50-cci:${DOCKER_BUILD_TAG} + - ${DOCKER_USERNAME}/clang50-cci:latest image: "${DOCKER_USERNAME}/clang50-cci:${DOCKER_BUILD_TAG}" container_name: clang5-cci tty: true @@ -921,7 +921,7 @@ services: LIBRARY_VERSION: 4.0.1 target: release cache_from: - - ${DOCKER_USERNAME}/clang40-cci:${DOCKER_BUILD_TAG} + - ${DOCKER_USERNAME}/clang40-cci:latest image: "${DOCKER_USERNAME}/clang40-cci:${DOCKER_BUILD_TAG}" container_name: clang4-cci tty: true @@ -934,7 +934,7 @@ services: LIBRARY_VERSION: 3.9.1 target: release cache_from: - - ${DOCKER_USERNAME}/clang39-cci:${DOCKER_BUILD_TAG} + - ${DOCKER_USERNAME}/clang39-cci:latest image: "${DOCKER_USERNAME}/clang39-cci:${DOCKER_BUILD_TAG}" container_name: clang39-cci tty: true