mirror of
https://github.com/Kitware/CMake.git
synced 2025-12-31 02:39:48 -06:00
ci: add clang-tidy development headers to Fedora base image
Prepare to build our own clang-tidy plugin in CI.
This commit is contained in:
@@ -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
|
||||
|
||||
18
.gitlab/ci/docker/fedora36/install_clang_tidy_headers.sh
Executable file
18
.gitlab/ci/docker/fedora36/install_clang_tidy_headers.sh
Executable file
@@ -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 -
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user