summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2024-04-24 19:02:15 (GMT)
committerBrad King <brad.king@kitware.com>2024-04-24 20:41:15 (GMT)
commitd909ea2ed8e37bda69a8e33931992e35b9b75895 (patch)
tree484c1f0c61dc938d2f26d6a3f11e712dbd108f1d
parent7df3a4c437cc0e133c26a1a691cc46ecb3921431 (diff)
downloadCMake-d909ea2ed8e37bda69a8e33931992e35b9b75895.zip
CMake-d909ea2ed8e37bda69a8e33931992e35b9b75895.tar.gz
CMake-d909ea2ed8e37bda69a8e33931992e35b9b75895.tar.bz2
ci: Add an image for ROCm 5 HIP packages on Fedora 39
The ROCm 6 HIP packages on Fedora 40 do not seem to fully work for our test suite in CI jobs. Add a dedicated image to run our HIP tests on Fedora 39. Issue: #25932
-rw-r--r--.gitlab/ci/docker/fedora39-hip/Dockerfile27
-rw-r--r--.gitlab/ci/docker/fedora39-hip/deps_packages.lst15
-rwxr-xr-x.gitlab/ci/docker/fedora39-hip/install_deps.sh10
3 files changed, 52 insertions, 0 deletions
diff --git a/.gitlab/ci/docker/fedora39-hip/Dockerfile b/.gitlab/ci/docker/fedora39-hip/Dockerfile
new file mode 100644
index 0000000..0347cc4
--- /dev/null
+++ b/.gitlab/ci/docker/fedora39-hip/Dockerfile
@@ -0,0 +1,27 @@
+# syntax=docker/dockerfile:1
+
+ARG BASE_IMAGE=fedora:39
+
+FROM ${BASE_IMAGE} AS dnf-cache
+# Populate DNF cache w/ the fresh metadata and prefetch packages.
+RUN --mount=type=bind,source=deps_packages.lst,target=/root/deps_packages.lst \
+ --mount=type=tmpfs,target=/var/log \
+ --mount=type=tmpfs,target=/tmp \
+ dnf install \
+ --setopt=install_weak_deps=False \
+ --setopt=fastestmirror=True \
+ --setopt=max_parallel_downloads=10 \
+ --downloadonly \
+ -y \
+ $(grep -h '^[^#]\+$' /root/*.lst)
+
+FROM ${BASE_IMAGE}
+LABEL maintainer="Brad King <brad.king@kitware.com>"
+
+RUN --mount=type=bind,source=install_deps.sh,target=/root/install_deps.sh \
+ --mount=type=bind,source=deps_packages.lst,target=/root/deps_packages.lst \
+ --mount=type=cache,from=dnf-cache,source=/var/cache/dnf,target=/var/cache/dnf,sharing=private \
+ --mount=type=cache,target=/var/cache/pip \
+ --mount=type=tmpfs,target=/var/log \
+ --mount=type=tmpfs,target=/tmp \
+ sh /root/install_deps.sh
diff --git a/.gitlab/ci/docker/fedora39-hip/deps_packages.lst b/.gitlab/ci/docker/fedora39-hip/deps_packages.lst
new file mode 100644
index 0000000..70b114c
--- /dev/null
+++ b/.gitlab/ci/docker/fedora39-hip/deps_packages.lst
@@ -0,0 +1,15 @@
+# Install development tools.
+clang
+clang-tools-extra
+compiler-rt
+gcc-c++
+git-core
+make
+
+# Install HIP language toolchain.
+hsakmt-devel
+lld
+llvm
+rocm-comgr-devel
+rocm-hip-devel
+rocm-runtime-devel
diff --git a/.gitlab/ci/docker/fedora39-hip/install_deps.sh b/.gitlab/ci/docker/fedora39-hip/install_deps.sh
new file mode 100755
index 0000000..eedff9c
--- /dev/null
+++ b/.gitlab/ci/docker/fedora39-hip/install_deps.sh
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+set -e
+
+dnf install \
+ --setopt=install_weak_deps=False \
+ --setopt=fastestmirror=True \
+ --setopt=max_parallel_downloads=10 \
+ -y \
+ $(grep '^[^#]\+$' /root/deps_packages.lst)