.gitlab-ci.yml 4.76 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
# 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.gnome.org/GNOME/network-manager-applet/-/ci/lint

.fedora_minimal: &fedora_minimal
  before_script:
    - dnf -y install
      file
      findutils
      gcc
      desktop-file-utils
      gettext-devel
      glib2-devel
      gtk3-devel
      intltool
      libgudev1-devel
      libnotify-devel
      libsecret-devel
      NetworkManager-libnm-devel
      pkgconfig
      /usr/bin/autopoint

.fedora_full: &fedora_full
  before_script:
    - dnf -y install
      file
      findutils
      gcc
      desktop-file-utils
      gettext-devel
      glib2-devel
      gtk3-devel
      intltool
      libgudev1-devel
      libnotify-devel
      libsecret-devel
      NetworkManager-libnm-devel
      pkgconfig
      /usr/bin/autopoint
      gcr-devel
      gobject-introspection-devel redhat-rpm-config
      gtk-doc
      iso-codes-devel
46
      mobile-broadband-provider-info-devel
47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69
      jansson-devel
      ModemManager-glib-devel
      libselinux-devel

.dist: &dist
  dependencies:
    - fedora28_dist
  variables:
    GIT_STRATEGY: none

.fedora_meson_minimal: &fedora_meson_minimal
  <<: *fedora_minimal
  <<: *dist
  script:
    - tar xJf network-manager-applet-*.tar.xz
    - dnf -y install meson
    - meson
      -Dlibnm_gtk=false
      -Dwwan=false
      -Dselinux=false
      -Dteam=false
      -Dgcr=false
      -Diso_codes=false
70
      -Dmobile_broadband_provider_info=false
71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94
      -Dld_gc=false
      -Dgtk_doc=false
      -Dintrospection=false
      -Dappindicator=no
      -Dmore_asserts=no
      network-manager-applet-*/ build
    - ninja -v -C build
    - ninja -v -C build test
    - ninja -v -C build install
    - ninja -v -C build uninstall

.fedora_meson_full: &fedora_meson_full
  <<: *fedora_full
  <<: *dist
  script:
    - dnf -y install meson
    - tar xJf network-manager-applet-*.tar.xz
    - meson
      -Dlibnm_gtk=false
      -Dwwan=true
      -Dselinux=true
      -Dteam=true
      -Dgcr=true
      -Diso_codes=true
95
      -Dmobile_broadband_provider_info=true
96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118
      -Dld_gc=true
      -Dgtk_doc=true
      -Dintrospection=true
      -Dappindicator=no
      -Dmore_asserts=yes
      network-manager-applet-*/ build
    - ninja -v -C build
    - ninja -v -C build test
    - ninja -v -C build install
    - ninja -v -C build uninstall

.fedora_autotools_minimal: &fedora_autotools_minimal
  <<: *fedora_minimal
  <<: *dist
  script:
    - dnf -y install make
    - tar xJf network-manager-applet-*.tar.xz
    - cd network-manager-applet-*/
    - ./configure
      --disable-silent-rules
      --with-more-asserts=no
      --disable-nls
      --disable-iso-codes
119
      --disable-mobile-broadband-provider-info
120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145
      --disable-gtk-doc
      --disable-introspection
      --disable-schemas-compile
      --disable-more-warnings
      --without-appindicator
      --without-wwan
      --without-selinux
      --without-team
      --without-gcr
    - make -j
    - make -j check
    - make -j install
    - make -j uninstall

.fedora_autotools_full: &fedora_autotools_full
  <<: *fedora_full
  <<: *dist
  script:
    - dnf -y install make
    - tar xJf network-manager-applet-*.tar.xz
    - cd network-manager-applet-*/
    - ./configure
      --disable-silent-rules
      --with-more-asserts=yes
      --enable-nls
      --enable-iso-codes
146
      --enable-mobile-broadband-provider-info
147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177
      --enable-gtk-doc
      --enable-introspection
      --enable-schemas-compile
      --enable-more-warnings
      --with-wwan
      --with-selinux
      --with-team
      --with-gcr
    - make -j
    - make -j check
    - make -j install
    - make -j uninstall

fedora28_dist:
  <<: *fedora_full
  image: fedora:28
  stage: build
  script:
    - dnf -y install
      autoconf automake make
      NetworkManager-devel
      NetworkManager-glib-devel
    - sh autogen.sh
    - make -j distcheck
  artifacts:
    paths:
      - "*.xz"

fedora_meson_minimal:
  <<: *fedora_meson_minimal
  image: fedora:latest
178
  stage: test
179 180 181 182

fedora_meson_full:
  <<: *fedora_meson_full
  image: fedora:latest
183
  stage: test
184 185 186 187

fedora_autotools_minimal:
  <<: *fedora_autotools_minimal
  image: fedora:latest
188
  stage: test
189 190 191 192

fedora_autotools_full:
  <<: *fedora_autotools_full
  image: fedora:latest
193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216
  stage: test

# https://network-manager-applet.pages.gitlab.gnome.org/libnma/
pages:
  <<: *fedora_full
  <<: *dist
  image: fedora:latest
  stage: deploy
  script:
    - dnf -y install make
    - tar xJf network-manager-applet-*.tar.xz
    - cd network-manager-applet-*/
    - ./configure
      --disable-silent-rules
      --enable-gtk-doc
    - make -j
    - cd ..
    - mkdir -p public
    - mv network-manager-applet-*/html public/libnma
  artifacts:
    paths:
      - public
  only:
    - master