From 5c1b360eaad9c2cf238e84ae11c4014a7736e045 Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Thu, 9 Mar 2023 20:35:10 -0500 Subject: [PATCH] ci: Add clang-format to the amd64 container We need clang-format available in order to check for formatting errors later. Add it to the amd64 container only (this requires some shenigans to avoid multi-arch conflicts). Signed-off-by: Alyssa Rosenzweig Reviewed-by: Eric Engestrom Reviewed-by: Emma Anholt Part-of: --- .gitlab-ci/container/cross_build.sh | 5 +++++ .gitlab-ci/container/debian/x86_build-base.sh | 1 + .gitlab-ci/image-tags.yml | 2 +- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci/container/cross_build.sh b/.gitlab-ci/container/cross_build.sh index 68783a82676..7180d4fa80e 100644 --- a/.gitlab-ci/container/cross_build.sh +++ b/.gitlab-ci/container/cross_build.sh @@ -47,6 +47,11 @@ if [[ $arch != "armhf" ]]; then LLVM=11 fi + # We don't need clang-format for the crossbuilds, but the installed amd64 + # package will conflict with libclang. Uninstall clang-format (and its + # problematic dependency) to fix. + apt-get remove -y clang-format-13 libclang-cpp13 + # llvm-*-tools:$arch conflicts with python3:amd64. Install dependencies only # with apt-get, then force-install llvm-*-{dev,tools}:$arch with dpkg to get # around this. diff --git a/.gitlab-ci/container/debian/x86_build-base.sh b/.gitlab-ci/container/debian/x86_build-base.sh index 2332323fe1a..8fb49b5a572 100644 --- a/.gitlab-ci/container/debian/x86_build-base.sh +++ b/.gitlab-ci/container/debian/x86_build-base.sh @@ -28,6 +28,7 @@ apt-get install -y --no-remove \ bison \ ccache \ curl \ + clang-format-13 \ dpkg-cross \ findutils \ flex \ diff --git a/.gitlab-ci/image-tags.yml b/.gitlab-ci/image-tags.yml index 753dc8fce25..6122d83469c 100644 --- a/.gitlab-ci/image-tags.yml +++ b/.gitlab-ci/image-tags.yml @@ -1,6 +1,6 @@ variables: DEBIAN_X86_BUILD_BASE_IMAGE: "debian/x86_build-base" - DEBIAN_BASE_TAG: "2023-03-13-virglrenderer-crosvm" + DEBIAN_BASE_TAG: "2023-03-16-clang-format" DEBIAN_X86_BUILD_IMAGE_PATH: "debian/x86_build" DEBIAN_BUILD_TAG: "2023-02-14-pip"