]> xenbits.xensource.com Git - people/royger/xen.git/commitdiff
CI: Add a CentOS 6 container and build jobs
authorAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 26 Mar 2019 14:23:03 +0000 (14:23 +0000)
committerWei Liu <wei.liu2@citrix.com>
Tue, 26 Mar 2019 15:36:19 +0000 (15:36 +0000)
CentOS 6 is probably the most frequently broken build, so adding it to CI
would be a very good move.

One problem is that CentOS 6 comes with Python 2.6, and Qemu requires 2.7.
There appear to be no sensible ways to get Python 2.7 into a CentOS 6
environments, so modify the build script to skip the Qemu upstream build
instead.  Additionally, SeaBIOS requires GCC 4.6 or later, so skip it as well.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
automation/build/centos/6.dockerfile [new file with mode: 0644]
automation/gitlab-ci/build.yaml
automation/scripts/build
automation/scripts/containerize

diff --git a/automation/build/centos/6.dockerfile b/automation/build/centos/6.dockerfile
new file mode 100644 (file)
index 0000000..54d022b
--- /dev/null
@@ -0,0 +1,51 @@
+FROM centos:6
+LABEL maintainer.name="The Xen Project" \
+      maintainer.email="xen-devel@lists.xenproject.org"
+
+RUN mkdir /build
+WORKDIR /build
+
+# work around https://github.com/moby/moby/issues/10180
+# and add EPEL for dev86
+RUN rpm --rebuilddb && \
+    yum -y install \
+        yum-plugin-ovl \
+        epel-release \
+    && yum clean all && \
+    rm -rf /var/cache/yum
+
+# install Xen depends
+RUN yum -y install \
+        gcc \
+        gcc-c++ \
+        ncurses-devel \
+        zlib-devel \
+        openssl-devel \
+        python-devel \
+        libuuid-devel \
+        pciutils-devel \
+        pkgconfig \
+        gettext \
+        flex \
+        bison \
+        libaio-devel \
+        glib2-devel \
+        yajl-devel \
+        pixman-devel \
+        glibc-devel \
+        glibc-devel.i686 \
+        make \
+        binutils \
+        git \
+        wget \
+        acpica-tools \
+        python-markdown \
+        patch \
+        checkpolicy \
+        dev86 \
+        iasl \
+        xz-devel \
+        bzip2 \
+        nasm \
+    && yum clean all && \
+    rm -rf /var/cache/yum
index 48bb039ab4bb23ab5034f917e2906121c5419492..b70797e82de358f9d60f4a890d6d6866b046c537 100644 (file)
@@ -149,6 +149,16 @@ centos-7-gcc-debug:
   variables:
     CONTAINER: centos:7
 
+centos-6-gcc:
+  extends: .gcc-x86-64-build
+  variables:
+    CONTAINER: centos:6
+
+centos-6-gcc-debug:
+  extends: .gcc-x86-64-build-debug
+  variables:
+    CONTAINER: centos:6
+
 debian-jessie-clang:
   extends: .clang-x86-64-build
   variables:
index db4bac33029b55ef63377207c4184170fbe443c0..8a57e097a99c9701f2643a6c8946614b4ca2366f 100755 (executable)
@@ -2,6 +2,12 @@
 
 $CC --version
 
+# Express the compiler version as an integer.  e.g. GCC 4.9.2 => 0x040902
+cc-ver()
+{
+    $CC -dumpversion | awk -F. '{ printf "0x%02x%02x%02x", $1, $2, $3 }'
+}
+
 # random config or default config
 if [[ "${RANDCONFIG}" == "y" ]]; then
     make -C xen KCONFIG_ALLCONFIG=tools/kconfig/allrandom.config randconfig
@@ -22,6 +28,16 @@ if [[ "${CC}" == "clang" ]]; then
     cfgargs+=("--disable-stubdom")
 fi
 
+# Qemu requires Python 2.7 or later
+if python -c "import sys; res = sys.version_info < (2, 7); exit(not(res))"; then
+    cfgargs+=("--with-system-qemu=/bin/false")
+fi
+
+# SeaBIOS requires GCC 4.6 or later
+if [[ "${CC}" == "gcc" && `cc-ver` -lt 0x040600 ]]; then
+    cfgargs+=("--with-system-seabios=/bin/false")
+fi
+
 ./configure "${cfgargs[@]}"
 
 make -j$(nproc) dist
index b50ff9944113784f97a15cbe5ec7c5cbc76572c0..09d130bbd65a881dd5a540fe95c8050ef80b823a 100755 (executable)
@@ -15,6 +15,7 @@ die() {
 #
 BASE="registry.gitlab.com/xen-project/xen"
 case "_${CONTAINER}" in
+    _centos6) CONTAINER="${BASE}/centos:6" ;;
     _centos7) CONTAINER="${BASE}/centos:7" ;;
     _centos72) CONTAINER="${BASE}/centos:7.2" ;;
     _trusty) CONTAINER="${BASE}/ubuntu:trusty" ;;