stages: - build - test - deploy build autotools: stage: build image: registry.freedesktop.org/libnice/libnice/centos7/autotools-build except: - schedules 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 image: registry.freedesktop.org/libnice/libnice/centos7/autotools-build except: - schedules dependencies: - build autotools script: - ifconfig - make check artifacts: when: always paths: - config.log - nice/test-suite.log - random/test-suite.log - tests/test-suite.log - stun/tests/test-suite.log - docs/reference/libnice/test-suite.log test autotools valgrind: extends: test autotools allow_failure: true script: - ifconfig - make check-valgrind distcheck autotools: stage: test image: registry.freedesktop.org/libnice/libnice/centos7/autotools-build except: - schedules dependencies: - build autotools script: - ifconfig - make distcheck artifacts: paths: - libnice-*.tar.gz build meson: stage: build image: registry.freedesktop.org/libnice/libnice/centos7/meson-build variables: PREFIX: "${CI_PROJECT_DIR}/libnice-prefix" except: - schedules before_script: - mkdir -p "${CI_PROJECT_DIR}" script: ## && true to make gitlab-ci happy - source scl_source enable rh-python36 && true - meson --werror --warnlevel 2 -Dgtk_doc=enabled --prefix=$PREFIX build/ - ninja-build -C build/ artifacts: paths: - build/ build msys2: image: 'registry.freedesktop.org/gstreamer/gst-ci/amd64/windows:v6' stage: 'build' tags: - 'docker' - 'windows' - '1607' variables: MESON_ARGS: > --prefix=${CI_PROJECT_DIR}/libnice-prefix # Make sure any failure in PowerShell scripts is fatal ErrorActionPreference: 'Stop' WarningPreference: 'Stop' before_script: - pip3 install -U meson script: # For some reason, options are separated by newline instead of space, so we # have to replace them first. - $env:MESON_ARGS = $env:MESON_ARGS.replace("`n"," ") - $env:PATH += ";C:\msys64\usr\bin;C:\msys64\mingw64/bin;C:\msys64\mingw32/bin" # Build and run the tests. # This is part of the same job due to a bug in the gitlab-runner # that prevents us from exporting artifacts with docker-windows # executors. It has since been fixed in gitlab 12.1, but # we are blocked from upgrading currently. # # Gitlab Runner issue: https://gitlab.com/gitlab-org/gitlab-runner/issues/4291 # Blocked upgrade issue: https://gitlab.freedesktop.org/gstreamer/gst-ci/issues/6#note_192780 - C:\msys64\usr\bin\bash -c "meson build $env:MESON_ARGS && ninja -C build && meson test -C build --print-errorlogs --suite libnice" .build msvc: extends: build msys2 script: # For some reason, options are separated by newline instead of space, so we # have to replace them first. - $env:MESON_ARGS = $env:MESON_ARGS.replace("`n"," ") # Build and run the tests. # This is part of the same job due to a bug in the gitlab-runner # that prevents us from exporting artifacts with docker-windows # executors. It has since been fixed in gitlab 12.1, but # we are blocked from upgrading currently. # # Gitlab Runner issue: https://gitlab.com/gitlab-org/gitlab-runner/issues/4291 # Blocked upgrade issue: https://gitlab.freedesktop.org/gstreamer/gst-ci/issues/6#note_192780 - 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" - cmd.exe /C "C:\BuildTools\Common7\Tools\VsDevCmd.bat -host_arch=amd64 -arch=$env:ARCH && meson subprojects download && meson wrap promote subprojects\glib\subprojects\libffi.wrap && meson wrap promote subprojects\glib\subprojects\zlib.wrap && meson wrap promote subprojects\glib\subprojects\proxy-libintl.wrap && meson subprojects download" - cmd.exe /C "C:\BuildTools\Common7\Tools\VsDevCmd.bat -host_arch=amd64 -arch=$env:ARCH && meson build $env:MESON_ARGS && ninja -C build && meson test -C build --print-errorlogs --suite libnice" build msvc amd64: extends: .build msvc variables: ARCH: 'amd64' build msvc x86: extends: .build msvc variables: ARCH: 'x86' test meson: stage: test image: registry.freedesktop.org/libnice/libnice/centos7/meson-build allow_failure: true dependencies: - build meson except: - schedules script: - ifconfig - source scl_source enable rh-python36 && true - meson test -C build/ --print-errorlogs artifacts: when: on_failure paths: - build/meson-logs/ test valgrind meson: extends: test meson script: - ifconfig - source scl_source enable rh-python36 && true - meson test -C build/ --setup valgrind --print-errorlogs doc-and-install meson: stage: test image: registry.freedesktop.org/libnice/libnice/centos7/meson-build dependencies: - build meson except: - schedules variables: PREFIX: "${CI_PROJECT_DIR}/libnice-prefix" script: - source scl_source enable rh-python36 && true - ninja-build -C build/ libnice-doc - ninja-build -C build/ install - ls -lR ${PREFIX} artifacts: paths: - build/docs/reference/libnice/html/ submit-to-coverity: stage: test image: registry.freedesktop.org/libnice/libnice/centos7/autotools-build variables: COVERITY_PROJECT: libnice only: - schedules dependencies: [] script: - curl -v https://scan.coverity.com/download/linux64 -o coverity_tool.tgz --form token="${COVERITY_TOKEN}" --form project="${COVERITY_PROJECT}" && tar xf coverity_tool.tgz && rm coverity_tool.tgz - mv cov-analysis-linux64-* cov-analysis-linux64 - ./autogen.sh --prefix="$PREFIX" --disable-gtk-doc --disable-introspection - make clean - export PATH="$PATH:${CI_PROJECT_DIR}/cov-analysis-linux64/bin" - echo $PATH - 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 pages: stage: deploy dependencies: - doc-and-install meson only: - tags artifacts: paths: - public script: - mv build/docs/reference/libnice/html/ public/