.gitlab-ci.yml 2.45 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12
# 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:
13 14 15 16
    - 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
    - date '+%Y%m%d-%H%M%S'; locale -a
    - date '+%Y%m%d-%H%M%S'; contrib/scripts/nm-ci-patch-gtkdoc.sh || true
17

18 19 20
.fedora_script: &fedora_script
  stage: test
  script:
21 22
    - date '+%Y%m%d-%H%M%S'; uname -a
    - date '+%Y%m%d-%H%M%S'; dnf list --installed
23
    - date '+%Y%m%d-%H%M%S'; git clean -fdx ; CI=gitlab BUILD_TYPE=autotools CC=gcc   WITH_DOCS=1 contrib/scripts/nm-ci-run.sh
24
    - date '+%Y%m%d-%H%M%S'; rm -rf /tmp/nm-docs-html; mv build/INST/share/gtk-doc/html /tmp/nm-docs-html
25 26 27 28 29
    - date '+%Y%m%d-%H%M%S'; git clean -fdx ; CI=gitlab BUILD_TYPE=meson     CC=gcc   WITH_DOCS=1 contrib/scripts/nm-ci-run.sh
    - date '+%Y%m%d-%H%M%S'; git clean -fdx ; CI=gitlab BUILD_TYPE=autotools CC=clang WITH_DOCS=0 contrib/scripts/nm-ci-run.sh
    - date '+%Y%m%d-%H%M%S'; git clean -fdx ; CI=gitlab BUILD_TYPE=meson     CC=clang WITH_DOCS=0 contrib/scripts/nm-ci-run.sh
    - date '+%Y%m%d-%H%M%S'; ./contrib/fedora/rpm/build_clean.sh -g -w crypto_gnutls -w debug -w iwd -w test
    - date '+%Y%m%d-%H%M%S'; ./contrib/fedora/rpm/build_clean.sh -g -w crypto_gnutls -w debug -w iwd -w test -w meson
30
    - date '+%Y%m%d-%H%M%S'; mv /tmp/nm-docs-html ./docs-html
31

32 33 34 35
checkpatch:
  image: fedora:28
  stage: test
  script:
36 37
    - 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
38 39 40 41 42 43
  allow_failure: true
  artifacts:
    when: on_failure
    paths:
      - checkpatch-out.txt

44
build_f28:
45 46
  <<: *fedora_install
  image: fedora:28
47
  <<: *fedora_script
48 49 50
  artifacts:
    expire_in: 1 day
    paths:
51
      - docs-html
52

53
build_f29:
54
  <<: *fedora_install
55
  image: fedora:29
56
  <<: *fedora_script
57

58 59 60 61 62 63
build_f30:
  <<: *fedora_install
  image: fedora:30
  <<: *fedora_script

build_frawhide:
64 65
  <<: *fedora_install
  image: fedora:rawhide
66
  <<: *fedora_script
67 68
  allow_failure: true

69 70 71
pages:
  stage: deploy
  dependencies:
72
    - build_f28
73 74 75 76 77 78 79 80
  script:
    - mv docs-html public
  artifacts:
    expire_in: 20 days
    paths:
      - public
  only:
    - master