CI: Add a CentOS 6 container and build jobs
PATCH 1/1 CI: Add a CentOS 6 container and build jobs
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.
---
CC: Wei Liu <[email protected]>
CC: Doug Goldstein <[email protected]>
I've already pushed this container to the registry, for testing purposes.
A sample pipeline is:
https://gitlab.com/xen-project/people/andyhhp/xen/pipelines/53121963
This patch is also blocked on one build fix which I've submitted to SeaBIOS:
https://mail.coreboot.org/hyperkitty/list/[email protected]/thread/WV64JDCUGSFZAUMZUSTQWHBFEFVFTXQQ/
--- automation/build/centos/6.dockerfile | 51 ++++++++++++++++++++++++++++++++++++ automation/gitlab-ci/build.yaml | 10 +++++++ automation/scripts/build | 5 ++++ automation/scripts/containerize | 1 + 4 files changed, 67 insertions(+) create mode 100644 automation/build/centos/6.dockerfile
automation/build/centos/6.dockerfile new file +51 -0
@@ -0,0 +1,51 @@ +FROM centos:6 +LABEL maintainer.name="The Xen Project" \ + maintainer.email="[email protected]" + +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
automation/gitlab-ci/build.yaml +10 -0
@@ -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:
automation/scripts/build +5 -0
@@ -22,6 +22,11 @@ if [[ "${CC}" == "clang" ]]; then cfgargs+=("--disable-stubdom") fi +if python -c "import sys; exit(not(sys.version_info < (2, 7)))"; then + # Qemu requires Python >=2.7. Skip it in older distro containers + cfgargs+=("--with-system-qemu=/bin/false") +fi + ./configure "${cfgargs[@]}" make -j$(nproc) dist
automation/scripts/containerize +1 -0
@@ -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" ;;
Signature · 7 lines
2.1.4 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
Quoted 9 lines · Andrew Cooper
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.
Signed-off-by Andrew Cooper <[email protected]>
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Quoted 4 lines · Wei Liu
Quoted 3 lines · Andrew Cooper
CentOS 6 is probably the most frequently broken build, so adding it to CI would be a very good move.
Quoted 8 lines
Quoted 6 lines
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.
Signed-off-by Andrew Cooper <[email protected]>Acked-by Wei Liu <[email protected]>
Just saw your thread on seabios list -- do you want to exclude seabios build in CentOS 6?
Wei.
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Quoted 10 lines · Wei Liu
Quoted 9 lines · Wei Liu
Quoted 8 lines · Andrew Cooper
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.
Quoted 4 lines
Quoted 2 lines
Quoted 1 line
Signed-off-by Andrew Cooper <[email protected]>Acked-by Wei Liu <[email protected]>Just saw your thread on seabios list -- do you want to exclude seabios build in CentOS 6?
Yeah, but I'm not sure how best to do that. Testing the version of GCC isn't as easy as testing the version of python.
~Andrew
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Quoted 11 lines · Andrew Cooper
Quoted 10 lines · Wei Liu
Quoted 9 lines · Wei Liu
Quoted 8 lines · Andrew Cooper
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.
Quoted 7 lines
Quoted 4 lines
Quoted 2 lines
Quoted 1 line
Signed-off-by Andrew Cooper <[email protected]>Acked-by Wei Liu <[email protected]>Just saw your thread on seabios list -- do you want to exclude seabios build in CentOS 6?
Yeah, but I'm not sure how best to do that. Testing the version of GCC isn't as easy as testing the version of python.
I think using gcc -dumpversion and awk can get you want you need -- look at cc-ver in Config.mk.
If seabios is not disabled, the build will break.
Wei.
Quoted 2 lines
~Andrew
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
PATCH v2 1/1 CI: Add a CentOS 6 container and build jobs
In reply to Andrew CooperCentOS 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.
---
CC: Wei Liu <[email protected]>
CC: Doug Goldstein <[email protected]>
v2:
* Skip SeaBIOS as well
I've already pushed this container to the registry, for testing purposes.
A sample pipeline is:
https://gitlab.com/xen-project/people/andyhhp/xen/pipelines/53683097
--- automation/build/centos/6.dockerfile | 51 ++++++++++++++++++++++++++++++++++++ automation/gitlab-ci/build.yaml | 10 +++++++ automation/scripts/build | 16 +++++++++++ automation/scripts/containerize | 1 + 4 files changed, 78 insertions(+) create mode 100644 automation/build/centos/6.dockerfile
automation/build/centos/6.dockerfile new file +51 -0
@@ -0,0 +1,51 @@ +FROM centos:6 +LABEL maintainer.name="The Xen Project" \ + maintainer.email="[email protected]" + +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
automation/gitlab-ci/build.yaml +10 -0
@@ -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:
automation/scripts/build +16 -0
@@ -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
automation/scripts/containerize +1 -0
@@ -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" ;;
Signature · 7 lines
2.1.4 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
Quoted 9 lines · Andrew Cooper
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 <[email protected]>
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel