9 - if: $CI_PIPELINE_SOURCE == "merge_request_event"
10 - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
11 - if: $CI_COMMIT_BRANCH == "latest-release"
12 - if: $CI_PIPELINE_SOURCE == "web"
15 image: registry.freedesktop.org/libnice/libnice/centos7/meson-build
18 # Check "allow-edit" checkbox on merge requests with ci-fairy
22 - project: 'freedesktop/ci-templates'
23 file: '/templates/ci-fairy.yml'
25 check-allow-collaboration:
29 - ci-fairy check-merge-request --require-allow-collaboration
36 - if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
43 PREFIX: "${CI_PROJECT_DIR}/libnice-prefix"
47 - mkdir -p "${CI_PROJECT_DIR}"
49 ## && true to make gitlab-ci happy
50 - source scl_source enable rh-python36 && true
51 - meson --werror --warnlevel 2 -Dgtk_doc=enabled --prefix=$PREFIX build/
52 - ninja-build -C build/
59 image: 'registry.freedesktop.org/gstreamer/gstreamer/amd64/windows:2021-10-01.0-master'
68 --prefix=${CI_PROJECT_DIR}/libnice-prefix
69 # Make sure any failure in PowerShell scripts is fatal
70 ErrorActionPreference: 'Stop'
71 WarningPreference: 'Stop'
74 extends: .build windows
77 # Make sure powershell exists on errors
78 # https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_preference_variables?view=powershell-6
79 - $ErrorActionPreference = "Stop"
81 # For some reason docker build hangs if this is included in the image, needs more troubleshooting
82 - $env:PATH += ';C:\msys64\usr\bin;C:\msys64\mingw64\bin;C:\msys64\mingw32\bin'
84 # It seems that the gpg doesn't like the SSL secured version of the keyserver
85 - C:\msys64\usr\bin\bash -c "pacman-key --init && pacman-key --populate msys2 && pacman-key --refresh-keys || true"
86 - echo "Download newest msys2 keyring"
87 - 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"
88 - C:\msys64\usr\bin\bash -c "pacman-key --init && pacman-key --populate msys2"
89 - C:\msys64\usr\bin\bash -c "pacman-key --refresh-keys || true"
90 - C:\msys64\usr\bin\bash -c "pacman -Sy --noconfirm --needed mingw-w64-x86_64-toolchain ninja"
93 # Make sure powershell exists on errors
94 # https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_preference_variables?view=powershell-6
95 - $ErrorActionPreference = "Stop"
96 # For some reason docker build hangs if this is included in the image, needs more troubleshooting
97 - $env:PATH += ';C:\msys64\usr\bin;C:\msys64\mingw64\bin;C:\msys64\mingw32\bin'
99 # For some reason, options are separated by newline instead of space, so we
100 # have to replace them first.
101 - $env:MESON_ARGS = $env:MESON_ARGS.replace("`n"," ")
103 - $env:PATH += ";C:\msys64\usr\bin;C:\msys64\mingw64/bin;C:\msys64\mingw32/bin"
105 # For some reason, options are separated by newline instead of space, so we
106 # have to replace them first.
107 - $env:CI_PROJECT_DIR = $env:CI_PROJECT_DIR.replace('\','/')
108 - $env:MESON_ARGS = $env:MESON_ARGS.replace('\','/')
110 # Build and run the tests.
111 # This is part of the same job due to a bug in the gitlab-runner
112 # that prevents us from exporting artifacts with docker-windows
113 # executors. It has since been fixed in gitlab 12.1, but
114 # we are blocked from upgrading currently.
116 # Gitlab Runner issue: https://gitlab.com/gitlab-org/gitlab-runner/issues/4291
117 # Blocked upgrade issue: https://gitlab.freedesktop.org/gstreamer/gst-ci/issues/6#note_192780
118 - C:\msys64\usr\bin\bash -c "meson build $env:MESON_ARGS"
119 - C:\msys64\usr\bin\bash -c "ninja -j 1 -C build"
120 - C:\msys64\usr\bin\bash -c "meson test -C build --print-errorlogs --suite libnice"
128 extends: .build windows
132 # For some reason, options are separated by newline instead of space, so we
133 # have to replace them first.
134 - $env:MESON_ARGS = $env:MESON_ARGS.replace("`n"," ")
136 # Build and run the tests.
137 # This is part of the same job due to a bug in the gitlab-runner
138 # that prevents us from exporting artifacts with docker-windows
139 # executors. It has since been fixed in gitlab 12.1, but
140 # we are blocked from upgrading currently.
142 # Gitlab Runner issue: https://gitlab.com/gitlab-org/gitlab-runner/issues/4291
143 # Blocked upgrade issue: https://gitlab.freedesktop.org/gstreamer/gst-ci/issues/6#note_192780
144 - cmd.exe /C "C:\BuildTools\Common7\Tools\VsDevCmd.bat -host_arch=amd64 -arch=$env:ARCH &&
145 meson subprojects download &&
146 meson wrap promote subprojects\glib-$env:GLIB_VERSION\subprojects\libffi.wrap &&
147 meson wrap promote subprojects\glib-$env:GLIB_VERSION\subprojects\proxy-libintl.wrap &&
148 meson subprojects download"
149 - cmd.exe /C "C:\BuildTools\Common7\Tools\VsDevCmd.bat -host_arch=amd64 -arch=$env:ARCH &&
150 meson build $env:MESON_ARGS &&
152 meson test -C build --print-errorlogs --suite libnice"
165 extends: .build windows
169 # For some reason, options are separated by newline instead of space, so we
170 # have to replace them first.
171 - $env:MESON_ARGS = $env:MESON_ARGS.replace("`n"," ")
172 - $env:MESON_ARGS += " -Dcrypto-library=openssl"
174 # Build and run the tests.
175 # This is part of the same job due to a bug in the gitlab-runner
176 # that prevents us from exporting artifacts with docker-windows
177 # executors. It has since been fixed in gitlab 12.1, but
178 # we are blocked from upgrading currently.
180 # Gitlab Runner issue: https://gitlab.com/gitlab-org/gitlab-runner/issues/4291
181 # Blocked upgrade issue: https://gitlab.freedesktop.org/gstreamer/gst-ci/issues/6#note_192780
182 - 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"
183 - cmd.exe /C "C:\BuildTools\Common7\Tools\VsDevCmd.bat -host_arch=amd64 -arch=$env:ARCH &&
184 meson subprojects download &&
185 meson wrap promote subprojects\glib-$env:GLIB_VERSION\subprojects\libffi.wrap &&
186 meson wrap promote subprojects\glib-$env:GLIB_VERSION\subprojects\proxy-libintl.wrap &&
187 meson subprojects download"
188 - cmd.exe /C "C:\BuildTools\Common7\Tools\VsDevCmd.bat -host_arch=amd64 -arch=$env:ARCH &&
189 meson build $env:MESON_ARGS &&
191 meson test -C build --print-errorlogs --suite libnice"
193 build msvc amd64 openssl:
194 extends: .build msvc openssl
198 build msvc x86 openssl:
199 extends: .build msvc openssl
212 - source scl_source enable rh-python36 && true
213 - meson test -C build/ --setup debug
224 - source scl_source enable rh-python36 && true
225 - meson configure build -Dgtk_doc=disabled
226 - meson test -C build/ --setup valgrind --print-errorlogs
237 PREFIX: "${CI_PROJECT_DIR}/libnice-prefix"
239 - source scl_source enable rh-python36 && true
240 - ninja-build -C build/ libnice-doc
241 - ninja-build -C build/ install
245 - build/docs/reference/libnice/html/
250 COVERITY_PROJECT: libnice
251 PREFIX: "${CI_PROJECT_DIR}/libnice-prefix"
257 - mkdir -p "${CI_PROJECT_DIR}"
259 - 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
260 - mv cov-analysis-linux64-* cov-analysis-linux64
261 - source scl_source enable rh-python36 && true
262 - meson --werror --warnlevel 2 -Dgtk_doc=disabled -Dinstrospection=disabled --prefix=$PREFIX cov-build/
263 - export PATH="$PATH:${CI_PROJECT_DIR}/cov-analysis-linux64/bin"
265 - cov-build --dir cov-int ninja-build -C cov-build
266 - tar czvf libnice.tgz cov-int
267 - 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
279 # For some reason, trigger gets rejected
280 # trigger: libnice/libnice-website
283 - mv build/docs/reference/libnice/html/ public/libnice/