.gitlab-ci.yml 1.95 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13
# 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:
    - NM_INSTALL="dnf install -y" ./contrib/fedora/REQUIRED_PACKAGES
14
    - dnf install -y glibc-langpack-pl ccache clang
15
    - locale -a
16
    - contrib/scripts/nm-ci-patch-gtkdoc.sh || true
17

18 19 20
.fedora_script: &fedora_script
  stage: test
  script:
21 22 23 24 25
    - git clean -fdx ; CI=gitlab BUILD_TYPE=autotools CC=gcc   WITH_DOCS=1 contrib/scripts/nm-ci-run.sh
    - mv build/INST/share/gtk-doc/html .git/docs-html
    - 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=autotools CC=clang WITH_DOCS=0 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
26 27
    - ./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
28
    - mv .git/docs-html .
29

30 31 32 33 34 35 36 37 38 39 40 41
checkpatch:
  image: fedora:28
  stage: test
  script:
    - dnf install -y git
    - contrib/scripts/checkpatch-feature-branch.sh 2>&1 | tee checkpatch-out.txt
  allow_failure: true
  artifacts:
    when: on_failure
    paths:
      - checkpatch-out.txt

42
f28_build:
43 44
  <<: *fedora_install
  image: fedora:28
45
  <<: *fedora_script
46 47 48
  artifacts:
    expire_in: 1 day
    paths:
49
      - docs-html
50

51
f_latest_build:
52 53
  <<: *fedora_install
  image: fedora:latest
54
  <<: *fedora_script
55

56
f_rawhide_build:
57 58
  <<: *fedora_install
  image: fedora:rawhide
59
  <<: *fedora_script
60 61
  allow_failure: true

62 63 64
pages:
  stage: deploy
  dependencies:
65
    - f28_build
66 67 68 69 70 71 72 73
  script:
    - mv docs-html public
  artifacts:
    expire_in: 20 days
    paths:
      - public
  only:
    - master