diff options
Diffstat (limited to '.gitlab')
-rw-r--r-- | .gitlab/ci/docker/fedora36/Dockerfile | 9 | ||||
-rwxr-xr-x | .gitlab/ci/docker/fedora36/install_clang_tidy_headers.sh | 18 | ||||
-rw-r--r-- | .gitlab/os-linux.yml | 2 |
3 files changed, 28 insertions, 1 deletions
diff --git a/.gitlab/ci/docker/fedora36/Dockerfile b/.gitlab/ci/docker/fedora36/Dockerfile index 26f8e3e..299d48a 100644 --- a/.gitlab/ci/docker/fedora36/Dockerfile +++ b/.gitlab/ci/docker/fedora36/Dockerfile @@ -4,6 +4,12 @@ MAINTAINER Ben Boeckel <ben.boeckel@kitware.com> COPY install_rvm.sh /root/install_rvm.sh RUN sh /root/install_rvm.sh +FROM fedora:36 AS clang-tidy-headers +MAINTAINER Kyle Edwards <kyle.edwards@kitware.com> + +COPY install_clang_tidy_headers.sh /root/install_clang_tidy_headers.sh +RUN sh /root/install_clang_tidy_headers.sh + FROM fedora:36 MAINTAINER Ben Boeckel <ben.boeckel@kitware.com> @@ -13,3 +19,6 @@ RUN sh /root/install_deps.sh COPY --from=rvm-build /root/rvm.tar /root/rvm.tar RUN tar -C /usr/local -xf /root/rvm.tar \ && rm /root/rvm.tar +COPY --from=clang-tidy-headers /root/clang-tidy-headers.tar /root/clang-tidy-headers.tar +RUN tar -C /usr/include -xf /root/clang-tidy-headers.tar \ + && rm /root/clang-tidy-headers.tar diff --git a/.gitlab/ci/docker/fedora36/install_clang_tidy_headers.sh b/.gitlab/ci/docker/fedora36/install_clang_tidy_headers.sh new file mode 100755 index 0000000..b9883f4 --- /dev/null +++ b/.gitlab/ci/docker/fedora36/install_clang_tidy_headers.sh @@ -0,0 +1,18 @@ +#!/bin/sh + +set -e + +# Packages for building the clang-tidy plugin. +# TODO: Upstream this as a proper Fedora package. +dnf install --setopt=install_weak_deps=False -y \ + 'dnf-command(download)' \ + rpm-build \ + python3-devel \ + clang-tools-extra +clang_source_rpm=$(rpm -q --queryformat '%{SOURCERPM}' clang-tools-extra) +clang_version=$(rpm -q --queryformat '%{VERSION}' clang-tools-extra) +dnf download --source -y clang +rpm -i "$clang_source_rpm" +rpmbuild -bp /root/rpmbuild/SPECS/clang.spec +cd "/root/rpmbuild/BUILD/clang-tools-extra-$clang_version.src" +find clang-tidy -name '*.h' | tar -cf /root/clang-tidy-headers.tar -T - diff --git a/.gitlab/os-linux.yml b/.gitlab/os-linux.yml index 74af444..a46ec22 100644 --- a/.gitlab/os-linux.yml +++ b/.gitlab/os-linux.yml @@ -69,7 +69,7 @@ ### Fedora .fedora36: - image: "kitware/cmake:ci-fedora36-x86_64-2022-08-30" + image: "kitware/cmake:ci-fedora36-x86_64-2022-08-31" variables: GIT_CLONE_PATH: "$CI_BUILDS_DIR/cmake ci/long file name for testing purposes" |