]> xenbits.xensource.com Git - xen.git/commitdiff
CI: Introduce debian:11/12-riscv64 containers
authorAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 9 Jul 2024 14:10:07 +0000 (15:10 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 12 Jul 2024 14:40:03 +0000 (15:40 +0100)
For starters, they're slightly smaller:

  $ docker image list <snip>
  registry.gitlab.com/xen-project/xen/debian      12-riscv64         772MB
  registry.gitlab.com/xen-project/xen/debian      11-riscv64         422MB
  registry.gitlab.com/xen-project/xen/archlinux   current-riscv64    2.32GB

They also not rolling distros, so will be more predicatable testing for the
stable trees in the future.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Anthony PERARD <anthony.perard@vates.tech>
Reviewed-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
Release-Acked-By: Oleksii Kurochko <oleksii.kurochko@gmail.com>
automation/build/debian/11-riscv64.dockerfile [new file with mode: 0644]
automation/build/debian/12-riscv64.dockerfile [new file with mode: 0644]

diff --git a/automation/build/debian/11-riscv64.dockerfile b/automation/build/debian/11-riscv64.dockerfile
new file mode 100644 (file)
index 0000000..1c99bc8
--- /dev/null
@@ -0,0 +1,33 @@
+# syntax=docker/dockerfile:1
+FROM --platform=linux/amd64 debian:bullseye-slim
+LABEL maintainer.name="The Xen Project"
+LABEL maintainer.email="xen-devel@lists.xenproject.org"
+
+ENV DEBIAN_FRONTEND=noninteractive
+ENV CROSS_COMPILE=riscv64-linux-gnu-
+ENV XEN_TARGET_ARCH=riscv64
+
+RUN <<EOF
+#!/bin/bash
+    set -e
+
+    useradd --create-home user
+
+    apt-get -y update
+
+    DEPS=(
+        # Xen
+        bison
+        build-essential
+        checkpolicy
+        flex
+        gcc-riscv64-linux-gnu
+        python3-minimal
+    )
+
+    apt-get -y --no-install-recommends install "${DEPS[@]}"
+    rm -rf /var/lib/apt/lists/*
+EOF
+
+USER user
+WORKDIR /build
diff --git a/automation/build/debian/12-riscv64.dockerfile b/automation/build/debian/12-riscv64.dockerfile
new file mode 100644 (file)
index 0000000..03fd4b0
--- /dev/null
@@ -0,0 +1,36 @@
+# syntax=docker/dockerfile:1
+FROM --platform=linux/amd64 debian:bookworm-slim
+LABEL maintainer.name="The Xen Project"
+LABEL maintainer.email="xen-devel@lists.xenproject.org"
+
+ENV DEBIAN_FRONTEND=noninteractive
+ENV CROSS_COMPILE=riscv64-linux-gnu-
+ENV XEN_TARGET_ARCH=riscv64
+
+RUN <<EOF
+#!/bin/bash
+    set -e
+
+    useradd --create-home user
+
+    apt-get -y update
+
+    DEPS=(
+        # Xen
+        bison
+        build-essential
+        checkpolicy
+        flex
+        gcc-riscv64-linux-gnu
+        python3-minimal
+
+        # Qemu for test phase
+        qemu-system-riscv64
+    )
+
+    apt-get -y --no-install-recommends install "${DEPS[@]}"
+    rm -rf /var/lib/apt/lists/*
+EOF
+
+USER user
+WORKDIR /build