ci: Add CentOS 7 build
For similar reasons as https://github.com/projectatomic/rpm-ostree/pull/824 Closes: #919 Approved by: jlebon
This commit is contained in:
parent
a98faa9113
commit
e0e07e2a48
16
.papr.yml
16
.papr.yml
|
|
@ -26,9 +26,25 @@ artifacts:
|
||||||
- test-suite.log
|
- test-suite.log
|
||||||
---
|
---
|
||||||
|
|
||||||
|
context: c7-build
|
||||||
inherit: true
|
inherit: true
|
||||||
|
required: true
|
||||||
|
|
||||||
|
container:
|
||||||
|
image: registry.centos.org/centos/centos:7
|
||||||
|
|
||||||
|
env:
|
||||||
|
CFLAGS: ''
|
||||||
|
|
||||||
|
tests:
|
||||||
|
- ci/build-check.sh
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
context: f25-rust
|
context: f25-rust
|
||||||
|
inherit: true
|
||||||
|
container:
|
||||||
|
image: registry.fedoraproject.org/fedora:25
|
||||||
packages:
|
packages:
|
||||||
- cargo
|
- cargo
|
||||||
env:
|
env:
|
||||||
|
|
|
||||||
|
|
@ -10,11 +10,15 @@ make check
|
||||||
make syntax-check # TODO: do syntax-check under check
|
make syntax-check # TODO: do syntax-check under check
|
||||||
# And now run the installed tests
|
# And now run the installed tests
|
||||||
make install
|
make install
|
||||||
|
if test -x /usr/bin/gnome-desktop-testing-runner; then
|
||||||
gnome-desktop-testing-runner -p 0 ostree
|
gnome-desktop-testing-runner -p 0 ostree
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test -x /usr/bin/clang; then
|
||||||
git clean -dfx && git submodule foreach git clean -dfx
|
git clean -dfx && git submodule foreach git clean -dfx
|
||||||
# And now a clang build to find unused variables; perhaps
|
# And now a clang build to find unused variables; perhaps
|
||||||
# in the future these could parallelize
|
# in the future these could parallelize
|
||||||
export CC=clang
|
export CC=clang
|
||||||
export CFLAGS='-Werror=unused-variable'
|
export CFLAGS='-Werror=unused-variable'
|
||||||
build
|
build
|
||||||
|
fi
|
||||||
|
|
|
||||||
14
ci/build.sh
14
ci/build.sh
|
|
@ -6,10 +6,14 @@ set -xeuo pipefail
|
||||||
dn=$(dirname $0)
|
dn=$(dirname $0)
|
||||||
. ${dn}/libbuild.sh
|
. ${dn}/libbuild.sh
|
||||||
|
|
||||||
install_builddeps ostree
|
pkg_install_builddeps ostree
|
||||||
|
pkg_install sudo which attr fuse \
|
||||||
dnf install -y sudo which attr fuse gjs parallel coccinelle clang \
|
libubsan libasan libtsan PyYAML redhat-rpm-config \
|
||||||
libubsan libasan libtsan PyYAML gnome-desktop-testing redhat-rpm-config \
|
|
||||||
elfutils
|
elfutils
|
||||||
|
pkg_install_if_os fedora gjs gnome-desktop-testing parallel coccinelle clang
|
||||||
|
|
||||||
build --enable-gtk-doc --enable-installed-tests=exclusive ${CONFIGOPTS:-}
|
DETECTED_CONFIGOPTS=
|
||||||
|
if test -x /usr/bin/gnome-desktop-testing-runner; then
|
||||||
|
DETECTED_CONFIGOPTS="${DETECTED_CONFIGOPTS} --enable-installed-tests=exclusive"
|
||||||
|
fi
|
||||||
|
build --enable-gtk-doc ${DETECTED_CONFIGOPTS} ${CONFIGOPTS:-}
|
||||||
|
|
|
||||||
|
|
@ -10,14 +10,45 @@ build() {
|
||||||
make V=1
|
make V=1
|
||||||
}
|
}
|
||||||
|
|
||||||
install_builddeps() {
|
pkg_install() {
|
||||||
pkg=$1
|
yum -y install "$@"
|
||||||
dnf -y install dnf-plugins-core
|
}
|
||||||
dnf install -y @buildsys-build
|
|
||||||
dnf install -y 'dnf-command(builddep)'
|
|
||||||
|
|
||||||
|
pkg_install_if_os() {
|
||||||
|
os=$1
|
||||||
|
shift
|
||||||
|
(. /etc/os-release;
|
||||||
|
if test "${os}" = "${ID}"; then
|
||||||
|
pkg_install "$@"
|
||||||
|
else
|
||||||
|
echo "Skipping installation on OS ${ID}: $@"
|
||||||
|
fi
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
pkg_builddep() {
|
||||||
|
# This is sadly the only case where it's a different command
|
||||||
|
if test -x /usr/bin/dnf; then
|
||||||
|
dnf builddep -y "$@"
|
||||||
|
else
|
||||||
|
yum-builddep -y "$@"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
pkg_install_builddeps() {
|
||||||
|
pkg=$1
|
||||||
|
if test -x /usr/bin/dnf; then
|
||||||
|
yum -y install dnf-plugins-core
|
||||||
|
yum install -y 'dnf-command(builddep)'
|
||||||
|
# Base buildroot
|
||||||
|
pkg_install @buildsys-build
|
||||||
|
else
|
||||||
|
yum -y install yum-utils
|
||||||
|
# Base buildroot, copied from the mock config sadly
|
||||||
|
yum -y install bash bzip2 coreutils cpio diffutils system-release findutils gawk gcc gcc-c++ grep gzip info make patch redhat-rpm-config rpm-build sed shadow-utils tar unzip util-linux which xz
|
||||||
|
fi
|
||||||
# builddeps+runtime deps
|
# builddeps+runtime deps
|
||||||
dnf builddep -y $pkg
|
pkg_builddep $pkg
|
||||||
dnf install -y $pkg
|
pkg_install $pkg
|
||||||
rpm -e $pkg
|
rpm -e $pkg
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue