mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-08 21:10:25 +01:00
We also generate a source tarball and artifact it.
Hence, we need proper gtk-doc links. This requires files in
/usr/share/gtk-doc/html for adding cross links. Install glib2-doc
package.
Note that in containers dnf is configured to not install documentation
files. We need to override that.
(cherry picked from commit a0f31e4038)
131 lines
4.2 KiB
YAML
131 lines
4.2 KiB
YAML
# Quick syntax check:
|
|
# python -c 'import sys, yaml; yaml.dump (yaml.load (sys.stdin), sys.stdout)' <.gitlab-ci.yml
|
|
|
|
# If things don't seem to work, this can help:
|
|
# https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/ci/lint
|
|
|
|
stages:
|
|
- test
|
|
- deploy
|
|
|
|
.fedora_install: &fedora_install
|
|
before_script:
|
|
- date '+%Y%m%d-%H%M%S'; NM_INSTALL="dnf install -y" ./contrib/fedora/REQUIRED_PACKAGES
|
|
- date '+%Y%m%d-%H%M%S'; dnf install -y glibc-langpack-pl ccache clang
|
|
|
|
# containers have "tsflags=nodocs" in /etc/dnf/dnf.conf. We need /usr/shared/gtk-doc/html
|
|
# to generate proper documentation.
|
|
- date '+%Y%m%d-%H%M%S'; dnf reinstall -y --setopt='tsflags=' glib2-doc
|
|
|
|
- date '+%Y%m%d-%H%M%S'; contrib/scripts/nm-ci-patch-gtkdoc.sh || true
|
|
|
|
.debian_install: &debian_install
|
|
before_script:
|
|
- date '+%Y%m%d-%H%M%S'; apt-get update
|
|
- date '+%Y%m%d-%H%M%S'; NM_INSTALL="apt-get -qq install -y" ./contrib/debian/REQUIRED_PACKAGES
|
|
- date '+%Y%m%d-%H%M%S'; dbus-uuidgen --ensure
|
|
- date '+%Y%m%d-%H%M%S'; sed -i 's/^# \(pl_PL.UTF-8 .*\)$/\1/p' /etc/locale.gen ; true
|
|
- date '+%Y%m%d-%H%M%S'; locale-gen pl_PL.UTF-8
|
|
- date '+%Y%m%d-%H%M%S'; pip3 install meson
|
|
|
|
.do_build: &do_build
|
|
stage: test
|
|
script:
|
|
- date '+%Y%m%d-%H%M%S'; uname -a
|
|
- date '+%Y%m%d-%H%M%S'; locale -a
|
|
- date '+%Y%m%d-%H%M%S'; env
|
|
- date '+%Y%m%d-%H%M%S'; meson --version
|
|
- date '+%Y%m%d-%H%M%S'; ! which dnf || dnf list --installed
|
|
- date '+%Y%m%d-%H%M%S'; ! which dpkg || dpkg -l
|
|
- date '+%Y%m%d-%H%M%S'; git clean -fdx ; BUILD_TYPE=autotools CC=gcc WITH_DOCS=1 contrib/scripts/nm-ci-run.sh
|
|
- date '+%Y%m%d-%H%M%S'; rm -rf /tmp/nm-docs-html; mv build/INST/share/gtk-doc/html /tmp/nm-docs-html
|
|
- date '+%Y%m%d-%H%M%S'; git clean -fdx ; BUILD_TYPE=meson CC=gcc WITH_DOCS=1 contrib/scripts/nm-ci-run.sh
|
|
- date '+%Y%m%d-%H%M%S'; git clean -fdx ; BUILD_TYPE=autotools CC=clang WITH_DOCS=0 contrib/scripts/nm-ci-run.sh
|
|
- date '+%Y%m%d-%H%M%S'; git clean -fdx ; BUILD_TYPE=meson CC=clang WITH_DOCS=0 contrib/scripts/nm-ci-run.sh
|
|
- date '+%Y%m%d-%H%M%S'; git clean -fdx ; ! grep -q '^NAME=Fedora' /etc/os-release || ./contrib/fedora/rpm/build_clean.sh -g -w crypto_gnutls -w debug -w iwd -w test
|
|
- date '+%Y%m%d-%H%M%S'; git clean -fdx ; ! grep -q '^NAME=Fedora' /etc/os-release || ./contrib/fedora/rpm/build_clean.sh -g -w crypto_gnutls -w debug -w iwd -w test -w meson
|
|
- date '+%Y%m%d-%H%M%S'; git clean -fdx ; test "$NM_BUILD_TARBALL" != 1 || ( ./contrib/fedora/rpm/build_clean.sh -r && mv ./NetworkManager-1*.tar.xz /tmp/ && mv ./contrib/fedora/rpm/latest/SRPMS/NetworkManager-1*.src.rpm /tmp/ )
|
|
- date '+%Y%m%d-%H%M%S'; git clean -fdx
|
|
- date '+%Y%m%d-%H%M%S'; mv /tmp/nm-docs-html ./docs-html
|
|
- date '+%Y%m%d-%H%M%S'; test "$NM_BUILD_TARBALL" != 1 || mv /tmp/NetworkManager-1*.tar.xz /tmp/NetworkManager-1*.src.rpm ./
|
|
|
|
checkpatch:
|
|
image: fedora:28
|
|
stage: test
|
|
script:
|
|
- date '+%Y%m%d-%H%M%S'; dnf install -y git
|
|
- date '+%Y%m%d-%H%M%S'; contrib/scripts/checkpatch-feature-branch.sh 2>&1 | tee checkpatch-out.txt
|
|
allow_failure: true
|
|
artifacts:
|
|
when: on_failure
|
|
paths:
|
|
- checkpatch-out.txt
|
|
|
|
t_fedora:28:
|
|
<<: *fedora_install
|
|
image: fedora:28
|
|
<<: *do_build
|
|
|
|
t_fedora:29:
|
|
<<: *fedora_install
|
|
image: fedora:29
|
|
<<: *do_build
|
|
variables:
|
|
NM_BUILD_TARBALL: 1
|
|
artifacts:
|
|
expire_in: 2 days
|
|
paths:
|
|
- docs-html
|
|
- NetworkManager-1*.tar.xz
|
|
- NetworkManager-1*.src.rpm
|
|
|
|
t_fedora:30:
|
|
<<: *fedora_install
|
|
image: fedora:30
|
|
<<: *do_build
|
|
|
|
t_fedora:rawhide:
|
|
<<: *fedora_install
|
|
image: fedora:rawhide
|
|
<<: *do_build
|
|
allow_failure: true
|
|
when: manual
|
|
|
|
t_ubuntu:16.04:
|
|
<<: *debian_install
|
|
image: ubuntu:16.04
|
|
<<: *do_build
|
|
|
|
t_ubuntu:18.04:
|
|
<<: *debian_install
|
|
image: ubuntu:18.04
|
|
<<: *do_build
|
|
|
|
t_debian:9:
|
|
<<: *debian_install
|
|
image: debian:stretch
|
|
<<: *do_build
|
|
|
|
t_debian:testing:
|
|
<<: *debian_install
|
|
image: debian:testing
|
|
<<: *do_build
|
|
when: manual
|
|
|
|
t_debian:sid:
|
|
<<: *debian_install
|
|
image: debian:sid
|
|
<<: *do_build
|
|
|
|
pages:
|
|
stage: deploy
|
|
dependencies:
|
|
- t_fedora:29
|
|
script:
|
|
- mv docs-html public
|
|
artifacts:
|
|
expire_in: 20 days
|
|
paths:
|
|
- public
|
|
only:
|
|
- master
|