gitlab-ci: enable test build on alpine linux
Alpine is especially interesting because it uses musl as libc. The build does not yet succeed. There are several issues that need to be fixed. However, it will be simpler to fix things, if we have tests in place -- even if at the moment they are known to be broken. See-also: https://git.alpinelinux.org/aports/tree/community/networkmanager?h=master
This commit is contained in:
@@ -10,6 +10,10 @@
|
||||
.templates_sha: &template_sha b18e53bf67b9ed493a006d83dbadd1ecc0daa61a # see https://docs.gitlab.com/ee/ci/yaml/#includefile
|
||||
|
||||
include:
|
||||
# Alpine container builder template
|
||||
- project: 'freedesktop/ci-templates'
|
||||
ref: *template_sha
|
||||
file: '/templates/alpine.yml'
|
||||
# Centos container builder template
|
||||
- project: 'freedesktop/ci-templates'
|
||||
ref: *template_sha
|
||||
@@ -40,15 +44,17 @@ variables:
|
||||
# these tags should be updated each time the list of packages is updated
|
||||
# changing these will force rebuilding the associated image
|
||||
# Note: these tags have no meaning and are not tied to a particular NM version
|
||||
FEDORA_TAG: '2020-11-17.0-4422fd99fcf1'
|
||||
UBUNTU_TAG: '2020-11-17.0-7ba6b1ddf582'
|
||||
DEBIAN_TAG: '2020-11-17.0-7ba6b1ddf582'
|
||||
CENTOS_TAG: '2020-11-17.0-4422fd99fcf1'
|
||||
FEDORA_TAG: '2020-11-17.0-cbb87607d569'
|
||||
UBUNTU_TAG: '2020-11-17.0-45915bd6e380'
|
||||
DEBIAN_TAG: '2020-11-17.0-45915bd6e380'
|
||||
CENTOS_TAG: '2020-11-17.0-cbb87607d569'
|
||||
ALPINE_TAG: '2020-11-17.0-8309a34970a3'
|
||||
|
||||
FEDORA_EXEC: 'bash .gitlab-ci/fedora-install.sh'
|
||||
UBUNTU_EXEC: 'bash .gitlab-ci/debian-install.sh'
|
||||
DEBIAN_EXEC: 'bash .gitlab-ci/debian-install.sh'
|
||||
CENTOS_EXEC: 'bash .gitlab-ci/fedora-install.sh'
|
||||
ALPINE_EXEC: 'bash .gitlab-ci/alpine-install.sh'
|
||||
|
||||
.nm_artifacts:
|
||||
variables:
|
||||
@@ -305,6 +311,16 @@ centos:8.2.2004@container-prep:
|
||||
FDO_DISTRIBUTION_TAG: $CENTOS_TAG
|
||||
FDO_DISTRIBUTION_EXEC: $CENTOS_EXEC
|
||||
|
||||
alpine:latest@container-prep:
|
||||
extends:
|
||||
- .fdo.container-build@alpine
|
||||
stage: prep
|
||||
variables:
|
||||
GIT_STRATEGY: none
|
||||
FDO_DISTRIBUTION_VERSION: 'latest'
|
||||
FDO_DISTRIBUTION_TAG: $ALPINE_TAG
|
||||
FDO_DISTRIBUTION_EXEC: $ALPINE_EXEC
|
||||
|
||||
#################################################################
|
||||
# #
|
||||
# container clean stage #
|
||||
@@ -546,6 +562,15 @@ centos:8.2.2004@container-clean:
|
||||
FDO_DISTRIBUTION_VERSION: '8.2.2004'
|
||||
FDO_DISTRIBUTION_TAG: $CENTOS_TAG
|
||||
|
||||
alpine:latest@container-clean:
|
||||
extends:
|
||||
- .container-clean
|
||||
variables:
|
||||
GIT_STRATEGY: none
|
||||
CURRENT_CONTAINER_IMAGE: $CI_REGISTRY_IMAGE/alpine/$FDO_DISTRIBUTION_VERSION:$FDO_DISTRIBUTION_TAG
|
||||
FDO_DISTRIBUTION_VERSION: 'latest'
|
||||
FDO_DISTRIBUTION_TAG: $ALPINE_TAG
|
||||
|
||||
|
||||
#################################################################
|
||||
# #
|
||||
@@ -819,6 +844,17 @@ t_centos:8.2.2004:
|
||||
- "centos:8.2.2004@container-prep"
|
||||
when: manual
|
||||
|
||||
t_alpine:latest:
|
||||
extends:
|
||||
- .build@template
|
||||
- .fdo.distribution-image@alpine
|
||||
variables:
|
||||
FDO_DISTRIBUTION_VERSION: 'latest'
|
||||
FDO_DISTRIBUTION_TAG: $ALPINE_TAG
|
||||
needs:
|
||||
- "alpine:latest@container-prep"
|
||||
when: manual
|
||||
|
||||
#################################################################
|
||||
# #
|
||||
# specific jobs #
|
||||
|
7
.gitlab-ci/alpine-install.sh
Executable file
7
.gitlab-ci/alpine-install.sh
Executable file
@@ -0,0 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -ex
|
||||
|
||||
./contrib/alpine/REQUIRED_PACKAGES
|
||||
|
||||
ln -snf elogind/systemd /usr/include/systemd
|
@@ -4,20 +4,23 @@ set -ex
|
||||
|
||||
IS_FEDORA=0
|
||||
IS_CENTOS=0
|
||||
IS_ALPINE=0
|
||||
grep -q '^NAME=.*\(CentOS\)' /etc/os-release && IS_CENTOS=1
|
||||
grep -q '^NAME=.*\(Fedora\)' /etc/os-release && IS_FEDORA=1
|
||||
grep -q '^NAME=.*\(Alpine\)' /etc/os-release && IS_ALPINE=1
|
||||
|
||||
do_clean() {
|
||||
git clean -fdx
|
||||
}
|
||||
|
||||
uname -a
|
||||
locale -a
|
||||
! command -v locale &>/dev/null || locale -a
|
||||
env
|
||||
meson --version
|
||||
|
||||
! command -v dpkg &>/dev/null || dpkg -l
|
||||
! command -v yum &>/dev/null || yum list installed
|
||||
! command -v apk &>/dev/null || apk -v info
|
||||
|
||||
# The formatting depends on the version of python black.
|
||||
# We have a dedicated test that checks our formatting, which
|
||||
|
@@ -55,6 +55,11 @@ distributions:
|
||||
- '7.9.2009'
|
||||
- '8.1.1911'
|
||||
- '8.2.2004'
|
||||
- name: alpine
|
||||
tag: *default_tag
|
||||
base_type: alpine
|
||||
versions:
|
||||
- 'latest'
|
||||
|
||||
# specifies which of the above distros is used as source for pages
|
||||
pages_build:
|
||||
|
49
contrib/alpine/REQUIRED_PACKAGES
Executable file
49
contrib/alpine/REQUIRED_PACKAGES
Executable file
@@ -0,0 +1,49 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -ex
|
||||
|
||||
apk update
|
||||
|
||||
apk add \
|
||||
'alpine-sdk' \
|
||||
'autoconf' \
|
||||
'automake' \
|
||||
'bash' \
|
||||
'clang' \
|
||||
'curl-dev' \
|
||||
'dbus' \
|
||||
'dbus-glib-dev' \
|
||||
'elogind-dev' \
|
||||
'eudev-dev' \
|
||||
'gcc' \
|
||||
'git' \
|
||||
'gnutls-dev' \
|
||||
'gobject-introspection-dev' \
|
||||
'gtk-doc' \
|
||||
'intltool' \
|
||||
'iptables' \
|
||||
'jansson-dev' \
|
||||
'libgudev-dev' \
|
||||
'libndp-dev' \
|
||||
'libnl3-dev' \
|
||||
'libpsl-dev' \
|
||||
'libsoup-dev' \
|
||||
'libteam-dev' \
|
||||
'libtool' \
|
||||
'linux-headers' \
|
||||
'make' \
|
||||
'meson' \
|
||||
'mobile-broadband-provider-info' \
|
||||
'modemmanager-dev' \
|
||||
'musl-dev' \
|
||||
'newt-dev' \
|
||||
'nss-dev' \
|
||||
'polkit-dev' \
|
||||
'ppp' \
|
||||
'ppp-dev' \
|
||||
'py3-gobject3' \
|
||||
'python3' \
|
||||
'readline-dev' \
|
||||
'util-linux-dev' \
|
||||
'vala' \
|
||||
'vim'
|
@@ -7,7 +7,7 @@
|
||||
# - CFLAGS
|
||||
# - WITH_DOCS
|
||||
|
||||
set -exv
|
||||
set -ex
|
||||
|
||||
die() {
|
||||
printf "%s\n" "$@"
|
||||
@@ -41,6 +41,13 @@ if command -v ccache &>/dev/null; then
|
||||
export PATH="/usr/lib64/ccache:/usr/lib/ccache${PATH:+:${PATH}}"
|
||||
fi
|
||||
|
||||
IS_FEDORA=0
|
||||
IS_CENTOS=0
|
||||
IS_ALPINE=0
|
||||
grep -q '^NAME=.*\(CentOS\)' /etc/os-release && IS_CENTOS=1
|
||||
grep -q '^NAME=.*\(Fedora\)' /etc/os-release && IS_FEDORA=1
|
||||
grep -q '^NAME=.*\(Alpine\)' /etc/os-release && IS_ALPINE=1
|
||||
|
||||
###############################################################################
|
||||
|
||||
if [ "$BUILD_TYPE" == meson ]; then
|
||||
@@ -58,6 +65,9 @@ _WITH_WERROR=1
|
||||
_WITH_LIBTEAM="$_TRUE"
|
||||
_WITH_DOCS="$_TRUE"
|
||||
_WITH_SYSTEMD_LOGIND="$_TRUE"
|
||||
if [ $IS_ALPINE = 1 ]; then
|
||||
_WITH_SYSTEMD_LOGIND="$_FALSE"
|
||||
fi
|
||||
|
||||
if [ "$NMTST_SEED_RAND" != "" ]; then
|
||||
export NMTST_SEED_RAND=
|
||||
@@ -133,9 +143,15 @@ run_autotools() {
|
||||
else
|
||||
_WITH_WERROR_VAL="yes"
|
||||
fi
|
||||
DISABLE_DEPENDENCY_TRACKING=
|
||||
if [ $IS_ALPINE = 1 ]; then
|
||||
DISABLE_DEPENDENCY_TRACKING='--disable-dependency-tracking'
|
||||
fi
|
||||
pushd ./build
|
||||
../configure \
|
||||
--prefix="$PWD/INST" \
|
||||
$DISABLE_DEPENDENCY_TRACKING \
|
||||
\
|
||||
--enable-introspection=$_WITH_DOCS \
|
||||
--enable-gtk-doc=$_WITH_DOCS \
|
||||
--with-systemd-logind=$_WITH_SYSTEMD_LOGIND \
|
||||
|
Reference in New Issue
Block a user