10 - if: $CI_PIPELINE_SOURCE == "merge_request_event"
11 - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
12 - if: $CI_COMMIT_BRANCH == "latest-release"
13 - if: $CI_PIPELINE_SOURCE == "web"
16 # Check "allow-edit" checkbox on merge requests with ci-fairy
20 - project: 'freedesktop/ci-templates'
21 file: '/templates/ci-fairy.yml'
22 - project: 'freedesktop/ci-templates'
23 file: '/templates/centos.yml'
27 FDO_DISTRIBUTION_VERSION: '7'
28 FDO_DISTRIBUTION_TAG: '2022-10-17'
29 FDO_UPSTREAM_REPO: 'libnice/libnice'
31 check-allow-collaboration:
35 - ci-fairy check-merge-request --require-allow-collaboration
42 - if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
45 build-centos-container:7:
47 - .fdo.container-build@centos # the CI template
48 - .libnice.centos:7 # our template job above
51 FDO_DISTRIBUTION_PACKAGES: 'git gtk-doc gnutls-devel gupnp-igd-devel gstreamer1-devel gobject-introspection-devel valgrind net-tools centos-release-scl graphviz'
52 FDO_DISTRIBUTION_EXEC: 'tests/docker/centos7-meson/pip-installs.sh'
57 - .fdo.distribution-image@centos
61 PREFIX: "${CI_PROJECT_DIR}/libnice-prefix"
65 - mkdir -p "${CI_PROJECT_DIR}"
67 ## && true to make gitlab-ci happy
68 - source scl_source enable rh-python36 && true
69 - meson --werror --warnlevel 2 -Dgtk_doc=enabled --prefix=$PREFIX -Db_coverage=true build/
77 image: 'registry.freedesktop.org/gstreamer/gstreamer/amd64/windows:2021-10-01.0-master'
86 --prefix=${CI_PROJECT_DIR}/libnice-prefix
87 # Make sure any failure in PowerShell scripts is fatal
88 ErrorActionPreference: 'Stop'
89 WarningPreference: 'Stop'
92 extends: .build windows
95 # Make sure powershell exists on errors
96 # https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_preference_variables?view=powershell-6
97 - $ErrorActionPreference = "Stop"
99 # For some reason docker build hangs if this is included in the image, needs more troubleshooting
100 - $env:PATH += ';C:\msys64\usr\bin;C:\msys64\mingw64\bin;C:\msys64\mingw32\bin'
102 # It seems that the gpg doesn't like the SSL secured version of the keyserver
103 - C:\msys64\usr\bin\bash -c "pacman-key --init && pacman-key --populate msys2 && pacman-key --refresh-keys || true"
104 - echo "Download newest msys2 keyring"
105 - C:\msys64\usr\bin\bash -c "curl -O http://repo.msys2.org/msys/x86_64/msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz && pacman -U --noconfirm msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz"
106 - C:\msys64\usr\bin\bash -c "pacman-key --init && pacman-key --populate msys2"
107 - C:\msys64\usr\bin\bash -c "pacman-key --refresh-keys || true"
108 - C:\msys64\usr\bin\bash -c "pacman -Sy --noconfirm --needed mingw-w64-x86_64-toolchain ninja"
111 # Make sure powershell exists on errors
112 # https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_preference_variables?view=powershell-6
113 - $ErrorActionPreference = "Stop"
114 # For some reason docker build hangs if this is included in the image, needs more troubleshooting
115 - $env:PATH += ';C:\msys64\usr\bin;C:\msys64\mingw64\bin;C:\msys64\mingw32\bin'
117 # For some reason, options are separated by newline instead of space, so we
118 # have to replace them first.
119 - $env:MESON_ARGS = $env:MESON_ARGS.replace("`n"," ")
121 - $env:PATH += ";C:\msys64\usr\bin;C:\msys64\mingw64/bin;C:\msys64\mingw32/bin"
123 # For some reason, options are separated by newline instead of space, so we
124 # have to replace them first.
125 - $env:CI_PROJECT_DIR = $env:CI_PROJECT_DIR.replace('\','/')
126 - $env:MESON_ARGS = $env:MESON_ARGS.replace('\','/')
128 # Build and run the tests.
129 # This is part of the same job due to a bug in the gitlab-runner
130 # that prevents us from exporting artifacts with docker-windows
131 # executors. It has since been fixed in gitlab 12.1, but
132 # we are blocked from upgrading currently.
134 # Gitlab Runner issue: https://gitlab.com/gitlab-org/gitlab-runner/issues/4291
135 # Blocked upgrade issue: https://gitlab.freedesktop.org/gstreamer/gst-ci/issues/6#note_192780
136 - C:\msys64\usr\bin\bash -c "meson build $env:MESON_ARGS"
137 - C:\msys64\usr\bin\bash -c "ninja -j 1 -C build"
138 - C:\msys64\usr\bin\bash -c "meson test -C build --print-errorlogs --suite libnice"
146 extends: .build windows
150 # For some reason, options are separated by newline instead of space, so we
151 # have to replace them first.
152 - $env:MESON_ARGS = $env:MESON_ARGS.replace("`n"," ")
154 # Build and run the tests.
155 # This is part of the same job due to a bug in the gitlab-runner
156 # that prevents us from exporting artifacts with docker-windows
157 # executors. It has since been fixed in gitlab 12.1, but
158 # we are blocked from upgrading currently.
160 # Gitlab Runner issue: https://gitlab.com/gitlab-org/gitlab-runner/issues/4291
161 # Blocked upgrade issue: https://gitlab.freedesktop.org/gstreamer/gst-ci/issues/6#note_192780
162 - cmd.exe /C "C:\BuildTools\Common7\Tools\VsDevCmd.bat -host_arch=amd64 -arch=$env:ARCH &&
163 meson subprojects download &&
164 meson wrap promote subprojects\glib-$env:GLIB_VERSION\subprojects\libffi.wrap &&
165 meson wrap promote subprojects\glib-$env:GLIB_VERSION\subprojects\proxy-libintl.wrap &&
166 meson subprojects download"
167 - cmd.exe /C "C:\BuildTools\Common7\Tools\VsDevCmd.bat -host_arch=amd64 -arch=$env:ARCH &&
168 meson build $env:MESON_ARGS &&
170 meson test -C build --print-errorlogs --suite libnice"
173 junit: build/meson-logs/testlog-*.junit.xml
189 extends: .build windows
193 # For some reason, options are separated by newline instead of space, so we
194 # have to replace them first.
195 - $env:MESON_ARGS = $env:MESON_ARGS.replace("`n"," ")
196 - $env:MESON_ARGS += " -Dcrypto-library=openssl"
198 # Build and run the tests.
199 # This is part of the same job due to a bug in the gitlab-runner
200 # that prevents us from exporting artifacts with docker-windows
201 # executors. It has since been fixed in gitlab 12.1, but
202 # we are blocked from upgrading currently.
204 # Gitlab Runner issue: https://gitlab.com/gitlab-org/gitlab-runner/issues/4291
205 # Blocked upgrade issue: https://gitlab.freedesktop.org/gstreamer/gst-ci/issues/6#note_192780
206 - New-Item -Path subprojects -Name openssl.wrap -Value "[wrap-git]`r`ndirectory=openssl`r`nurl=https://gitlab.freedesktop.org/libnice/openssl-binaries-for-ci.git`r`nrevision=1.1.1c`r`n"
207 - cmd.exe /C "C:\BuildTools\Common7\Tools\VsDevCmd.bat -host_arch=amd64 -arch=$env:ARCH &&
208 meson subprojects download &&
209 meson wrap promote subprojects\glib-$env:GLIB_VERSION\subprojects\libffi.wrap &&
210 meson wrap promote subprojects\glib-$env:GLIB_VERSION\subprojects\proxy-libintl.wrap &&
211 meson subprojects download"
212 - cmd.exe /C "C:\BuildTools\Common7\Tools\VsDevCmd.bat -host_arch=amd64 -arch=$env:ARCH &&
213 meson build $env:MESON_ARGS &&
215 meson test -C build --print-errorlogs --suite libnice"
217 build msvc amd64 openssl:
218 extends: .build msvc openssl
222 build msvc x86 openssl:
223 extends: .build msvc openssl
230 - .fdo.distribution-image@centos
239 - source scl_source enable rh-python36 && true
241 - meson test -C build/ --setup debug
242 - ninja -C build coverage
243 coverage: '/lines......: \d+\.\d+% /'
246 junit: build/meson-logs/testlog-*.junit.xml
255 - source scl_source enable rh-python36 && true
256 - meson configure build -Dgtk_doc=disabled
258 - meson test -C build/ --setup valgrind --print-errorlogs
264 - .fdo.distribution-image@centos
272 PREFIX: "${CI_PROJECT_DIR}/libnice-prefix"
274 - source scl_source enable rh-python36 && true
275 - ninja -C build/ libnice-doc
276 - ninja -C build/ install
280 - build/docs/reference/libnice/html/
285 - .fdo.distribution-image@centos
288 COVERITY_PROJECT: libnice
289 PREFIX: "${CI_PROJECT_DIR}/libnice-prefix"
295 - mkdir -p "${CI_PROJECT_DIR}"
297 - curl -v https://scan.coverity.com/download/linux64 -o coverity_tool.tgz --data "token=${COVERITY_TOKEN}&project=${COVERITY_PROJECT}" && tar xf coverity_tool.tgz && rm coverity_tool.tgz
298 - mv cov-analysis-linux64-* cov-analysis-linux64
299 - source scl_source enable rh-python36 && true
300 - meson --werror --warnlevel 2 -Dgtk_doc=disabled -Dinstrospection=disabled --prefix=$PREFIX cov-build/
301 - export PATH="$PATH:${CI_PROJECT_DIR}/cov-analysis-linux64/bin"
303 - cov-build --dir cov-int ninja -C cov-build
304 - tar czvf libnice.tgz cov-int
305 - 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
317 # For some reason, trigger gets rejected
318 # trigger: libnice/libnice-website
321 - mv build/docs/reference/libnice/html/ public/libnice/