summaryrefslogtreecommitdiff
path: root/.gitlab-ci.yml
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2019-02-04 11:06:21 +0100
committerThomas Haller <thaller@redhat.com>2019-02-07 17:31:37 +0100
commitbdac03fe9a8def21ef16bdd7bd0497dab83fbb1f (patch)
tree57808f1e5da70de0721ef943ad8ec2f657218c62 /.gitlab-ci.yml
parent389197fa8126aabd1378af3ee6f0a33db4ef2dce (diff)
downloadNetworkManager-bdac03fe9a8def21ef16bdd7bd0497dab83fbb1f.tar.gz
gitlab-ci: build with clang and do multiple builds in one test-step
Also, let one docker image do multiple builds. We fetch a fedora docker image, and then install 250 MB of packages. That alone takes a lot of time and resources. Instead of running a large number of docker images that only do one build, let one image do several builds. Also, install ccache. Hopefully this way we can benefit from building the same sources multiple times. Also note that building docs does not work currently with clang, due to g-ir-scanner. See commit 05568860cce5332977d92b85f7c25b8ed646cd58.
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r--.gitlab-ci.yml61
1 files changed, 24 insertions, 37 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 1933aa49bf..b4dffc40b5 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -11,10 +11,25 @@ stages:
.fedora_install: &fedora_install
before_script:
- NM_INSTALL="dnf install -y" ./contrib/fedora/REQUIRED_PACKAGES
- - dnf install -y glibc-langpack-pl
+ - dnf install -y glibc-langpack-pl ccache clang
- locale -a
- contrib/scripts/nm-ci-patch-gtkdoc.sh || true
+.fedora_script: &fedora_script
+ stage: test
+ script:
+ - CI=gitlab BUILD_TYPE=autotools CC=gcc WITH_DOCS=1 contrib/scripts/nm-ci-run.sh
+ - mv build/INST/share/gtk-doc/html /tmp/docs-html
+ - git clean -fdx
+ - CI=gitlab BUILD_TYPE=autotools CC=clang WITH_DOCS=0 contrib/scripts/nm-ci-run.sh
+ - git clean -fdx
+ - CI=gitlab BUILD_TYPE=meson CC=gcc WITH_DOCS=1 contrib/scripts/nm-ci-run.sh
+ - git clean -fdx
+ - CI=gitlab BUILD_TYPE=meson CC=clang WITH_DOCS=0 contrib/scripts/nm-ci-run.sh
+ - git clean -fdx
+ - ./contrib/fedora/rpm/build_clean.sh -g -w crypto_gnutls -w debug -w iwd -w test
+ - ./contrib/fedora/rpm/build_clean.sh -g -w crypto_gnutls -w debug -w iwd -w test -w meson
+
checkpatch:
image: fedora:28
stage: test
@@ -27,58 +42,30 @@ checkpatch:
paths:
- checkpatch-out.txt
-f28_build_autotools:
+f28_build:
<<: *fedora_install
image: fedora:28
- stage: test
- script:
- - CI=gitlab BUILD_TYPE=autotools contrib/scripts/nm-ci-run.sh
- - mv build/INST/share/gtk-doc/html docs-html
+ <<: *fedora_script
artifacts:
expire_in: 1 day
paths:
- - docs-html
-
-f28_build_meson:
- <<: *fedora_install
- image: fedora:28
- stage: test
- script:
- - CI=gitlab BUILD_TYPE=meson contrib/scripts/nm-ci-run.sh
-
-f28_rpm_autotools_dbg:
- <<: *fedora_install
- image: fedora:28
- stage: test
- script:
- - ./contrib/fedora/rpm/build_clean.sh -g -w crypto_gnutls -w debug -w iwd -w test
+ - /tmp/docs-html
-f28_rpm_meson_dbg:
- <<: *fedora_install
- image: fedora:28
- stage: test
- script:
- - ./contrib/fedora/rpm/build_clean.sh -g -w crypto_gnutls -w debug -w iwd -w meson -w test
-
-f_latest_build_autotools:
+f_latest_build:
<<: *fedora_install
image: fedora:latest
- stage: test
- script:
- - CI=gitlab BUILD_TYPE=autotools contrib/scripts/nm-ci-run.sh
+ <<: *fedora_script
-f_rawhide_build_autotools:
+f_rawhide_build:
<<: *fedora_install
image: fedora:rawhide
- stage: test
- script:
- - CI=gitlab BUILD_TYPE=autotools contrib/scripts/nm-ci-run.sh
+ <<: *fedora_script
allow_failure: true
pages:
stage: deploy
dependencies:
- - f28_build_autotools
+ - f28_build
script:
- mv docs-html public
artifacts: