9 - if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
10 - if: '$CI_COMMIT_BRANCH'
13 image: registry.freedesktop.org/libnice/libnice/centos7/meson-build
16 # Check "allow-edit" checkbox on merge requests with ci-fairy
20 - project: 'freedesktop/ci-templates'
21 file: '/templates/ci-fairy.yml'
23 check-allow-collaboration:
27 - ci-fairy check-merge-request --require-allow-collaboration
34 - if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
41 PREFIX: "${CI_PROJECT_DIR}/libnice-prefix"
45 - mkdir -p "${CI_PROJECT_DIR}"
47 ## && true to make gitlab-ci happy
48 - source scl_source enable rh-python36 && true
49 - meson --werror --warnlevel 2 -Dgtk_doc=enabled --prefix=$PREFIX build/
50 - ninja-build -C build/
57 image: 'registry.freedesktop.org/gstreamer/gstreamer/amd64/windows:2021-10-01.0-master'
66 --prefix=${CI_PROJECT_DIR}/libnice-prefix
67 # Make sure any failure in PowerShell scripts is fatal
68 ErrorActionPreference: 'Stop'
69 WarningPreference: 'Stop'
72 extends: .build windows
75 # Make sure powershell exists on errors
76 # https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_preference_variables?view=powershell-6
77 - $ErrorActionPreference = "Stop"
79 # For some reason docker build hangs if this is included in the image, needs more troubleshooting
80 - $env:PATH += ';C:\msys64\usr\bin;C:\msys64\mingw64\bin;C:\msys64\mingw32\bin'
82 # It seems that the gpg doesn't like the SSL secured version of the keyserver
83 - C:\msys64\usr\bin\bash -c "pacman-key --init && pacman-key --populate msys2 && pacman-key --refresh-keys || true"
84 - echo "Download newest msys2 keyring"
85 - 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"
86 - C:\msys64\usr\bin\bash -c "pacman-key --init && pacman-key --populate msys2"
87 - C:\msys64\usr\bin\bash -c "pacman-key --refresh-keys || true"
88 - C:\msys64\usr\bin\bash -c "pacman -Sy --noconfirm --needed mingw-w64-x86_64-toolchain ninja"
91 # Make sure powershell exists on errors
92 # https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_preference_variables?view=powershell-6
93 - $ErrorActionPreference = "Stop"
94 # For some reason docker build hangs if this is included in the image, needs more troubleshooting
95 - $env:PATH += ';C:\msys64\usr\bin;C:\msys64\mingw64\bin;C:\msys64\mingw32\bin'
97 # For some reason, options are separated by newline instead of space, so we
98 # have to replace them first.
99 - $env:MESON_ARGS = $env:MESON_ARGS.replace("`n"," ")
101 - $env:PATH += ";C:\msys64\usr\bin;C:\msys64\mingw64/bin;C:\msys64\mingw32/bin"
103 # For some reason, options are separated by newline instead of space, so we
104 # have to replace them first.
105 - $env:CI_PROJECT_DIR = $env:CI_PROJECT_DIR.replace('\','/')
106 - $env:MESON_ARGS = $env:MESON_ARGS.replace('\','/')
108 # Build and run the tests.
109 # This is part of the same job due to a bug in the gitlab-runner
110 # that prevents us from exporting artifacts with docker-windows
111 # executors. It has since been fixed in gitlab 12.1, but
112 # we are blocked from upgrading currently.
114 # Gitlab Runner issue: https://gitlab.com/gitlab-org/gitlab-runner/issues/4291
115 # Blocked upgrade issue: https://gitlab.freedesktop.org/gstreamer/gst-ci/issues/6#note_192780
116 - C:\msys64\usr\bin\bash -c "meson build $env:MESON_ARGS"
117 - C:\msys64\usr\bin\bash -c "ninja -j 1 -C build"
118 - C:\msys64\usr\bin\bash -c "meson test -C build --print-errorlogs --suite libnice"
126 extends: .build windows
130 # For some reason, options are separated by newline instead of space, so we
131 # have to replace them first.
132 - $env:MESON_ARGS = $env:MESON_ARGS.replace("`n"," ")
134 # Build and run the tests.
135 # This is part of the same job due to a bug in the gitlab-runner
136 # that prevents us from exporting artifacts with docker-windows
137 # executors. It has since been fixed in gitlab 12.1, but
138 # we are blocked from upgrading currently.
140 # Gitlab Runner issue: https://gitlab.com/gitlab-org/gitlab-runner/issues/4291
141 # Blocked upgrade issue: https://gitlab.freedesktop.org/gstreamer/gst-ci/issues/6#note_192780
142 - cmd.exe /C "C:\BuildTools\Common7\Tools\VsDevCmd.bat -host_arch=amd64 -arch=$env:ARCH &&
143 meson subprojects download &&
144 meson wrap promote subprojects\glib-$env:GLIB_VERSION\subprojects\libffi.wrap &&
145 meson wrap promote subprojects\glib-$env:GLIB_VERSION\subprojects\proxy-libintl.wrap &&
146 meson subprojects download"
147 - cmd.exe /C "C:\BuildTools\Common7\Tools\VsDevCmd.bat -host_arch=amd64 -arch=$env:ARCH &&
148 meson build $env:MESON_ARGS &&
150 meson test -C build --print-errorlogs --suite libnice"
163 extends: .build windows
167 # For some reason, options are separated by newline instead of space, so we
168 # have to replace them first.
169 - $env:MESON_ARGS = $env:MESON_ARGS.replace("`n"," ")
170 - $env:MESON_ARGS += " -Dcrypto-library=openssl"
172 # Build and run the tests.
173 # This is part of the same job due to a bug in the gitlab-runner
174 # that prevents us from exporting artifacts with docker-windows
175 # executors. It has since been fixed in gitlab 12.1, but
176 # we are blocked from upgrading currently.
178 # Gitlab Runner issue: https://gitlab.com/gitlab-org/gitlab-runner/issues/4291
179 # Blocked upgrade issue: https://gitlab.freedesktop.org/gstreamer/gst-ci/issues/6#note_192780
180 - 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"
181 - cmd.exe /C "C:\BuildTools\Common7\Tools\VsDevCmd.bat -host_arch=amd64 -arch=$env:ARCH &&
182 meson subprojects download &&
183 meson wrap promote subprojects\glib-$env:GLIB_VERSION\subprojects\libffi.wrap &&
184 meson wrap promote subprojects\glib-$env:GLIB_VERSION\subprojects\proxy-libintl.wrap &&
185 meson subprojects download"
186 - cmd.exe /C "C:\BuildTools\Common7\Tools\VsDevCmd.bat -host_arch=amd64 -arch=$env:ARCH &&
187 meson build $env:MESON_ARGS &&
189 meson test -C build --print-errorlogs --suite libnice"
191 build msvc amd64 openssl:
192 extends: .build msvc openssl
196 build msvc x86 openssl:
197 extends: .build msvc openssl
210 - source scl_source enable rh-python36 && true
211 - meson test -C build/ --setup debug
222 - source scl_source enable rh-python36 && true
223 - meson configure build -Dgtk_doc=disabled
224 - meson test -C build/ --setup valgrind --print-errorlogs
235 PREFIX: "${CI_PROJECT_DIR}/libnice-prefix"
237 - source scl_source enable rh-python36 && true
238 - ninja-build -C build/ libnice-doc
239 - ninja-build -C build/ install
243 - build/docs/reference/libnice/html/
248 COVERITY_PROJECT: libnice
249 PREFIX: "${CI_PROJECT_DIR}/libnice-prefix"
255 - mkdir -p "${CI_PROJECT_DIR}"
257 - 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
258 - mv cov-analysis-linux64-* cov-analysis-linux64
259 - source scl_source enable rh-python36 && true
260 - meson --werror --warnlevel 2 -Dgtk_doc=disabled -Dinstrospection=disabled --prefix=$PREFIX cov-build/
261 - export PATH="$PATH:${CI_PROJECT_DIR}/cov-analysis-linux64/bin"
263 - cov-build --dir cov-int ninja-build -C cov-build
264 - tar czvf libnice.tgz cov-int
265 - 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
277 # For some reason, trigger gets rejected
278 # trigger: libnice/libnice-website
281 - mv build/docs/reference/libnice/html/ public/libnice/