summaryrefslogtreecommitdiff
path: root/.gitlab-ci.yml
blob: c97c0d4bc0fc496a96396aac969fce0a58ec2b91 (plain)
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
image: registry.freedesktop.org/libnice/libnice/build-tools:centos-7
stages:
 - build
 - test

build autotools:
 stage: build
 except:
  - schedules
 before_script:
  - yum install -y net-tools
 script:
  - ifconfig
  - export BUILD_ID="libnice-$CI_JOB_NAME_$CI_COMMIT_SHA-$CI_JOB_ID"
  - export PREFIX="$(pwd)/prefix-$BUILD_ID"
  - export MAKEFLAGS="-j4"
  - mkdir "$PREFIX"
  - ./autogen.sh --prefix="$PREFIX" --enable-compile-warnings=error --enable-gtk-doc --enable-introspection
  - make
  - make install
 artifacts:
   untracked: true

test autotools:
  stage: test
  except:
    - schedules
  dependencies:
    - build autotools
  before_script:
   - yum install -y net-tools
  script:
    - ifconfig
    - make check
  artifacts:
    when: always
    paths:
      - libnice-0.1.15.1.tar.gz
      - config.log
      - nice/test-suite.log
      - random/test-suite.log
      - tests/test-suite.log
      - stun/tests/test-suite.log

build meson:
  image: 'fedora'
  stage: build
  variables:
    PREFIX: "${CI_PROJECT_DIR}/libnice-prefix"
    DEPENDENCIES: >
      meson
      gnutls-devel
      gupnp-igd-devel
      glib2-devel
      gobject-introspection-devel
      gstreamer1-devel
      redhat-rpm-config
  except:
    - schedules
  before_script:
    - dnf install -y ${DEPENDENCIES}
    - mkdir -p "${CI_PROJECT_DIR}"
  script:
    - meson --werror build/
    - ninja -C build/
  artifacts:
    paths:
      - build/

test meson:
  image: 'fedora'
  stage: test
  allow_failure: true
  dependencies:
    - build meson
  except:
    - schedules
  variables:
   PREFIX: "${CI_PROJECT_DIR}/libnice-prefix"
   DEPENDENCIES: >
     meson
     net-tools
     gnutls-devel
     gupnp-igd-devel
     glib2-devel
     gobject-introspection-devel
     gstreamer1-devel
     redhat-rpm-config
  before_script:
    - dnf install -y ${DEPENDENCIES}
    - mkdir -p "${CI_PROJECT_DIR}"
  script:
    - ifconfig
    - meson test -C build --print-errorlogs
  artifacts:
    when: on_failure
    paths:
      - build/meson-logs/

submit-to-coverity:
 image: registry.freedesktop.org/libnice/libnice/build-tools/coverity:2017.07
 stage: build
 only:
  - schedules
 script:
  - ./autogen.sh --prefix="$PREFIX" --disable-gtk-doc --disable-introspection
  - make clean
  - export PATH="$PATH:/root/cov-analysis-linux64-2017.07/bin"
  - cov-build --dir cov-int make -j4
  - tar czvf libnice.tgz cov-int
  - curl --form token=$COVERITY_TOKEN --form email=olivier.crete@ocrete.ca --form file=@libnice.tgz --form version="${CI_COMMIT_REF_NAME}-${CI_COMMIT_SHA}" --form description="CI weekly run" https://scan.coverity.com/builds?project=libnice