Commit beb5b5a2 authored by Olivier Crête's avatar Olivier Crête

ci: Use fdo templates

parent fbd8b4a0
stages:
- verify
- containers
- build
- test
- deploy
......@@ -11,9 +12,6 @@ workflow:
- if: $CI_COMMIT_BRANCH == "latest-release"
- if: $CI_PIPELINE_SOURCE == "web"
default:
image: registry.freedesktop.org/libnice/libnice/centos7/meson-build
#
# Check "allow-edit" checkbox on merge requests with ci-fairy
#
......@@ -21,6 +19,14 @@ default:
include:
- project: 'freedesktop/ci-templates'
file: '/templates/ci-fairy.yml'
- project: 'freedesktop/ci-templates'
file: '/templates/centos.yml'
.libnice.centos:7:
variables:
FDO_DISTRIBUTION_VERSION: '7'
FDO_DISTRIBUTION_TAG: '2022-10-17'
FDO_UPSTREAM_REPO: 'libnice/libnice'
check-allow-collaboration:
extends:
......@@ -36,8 +42,20 @@ check-allow-collaboration:
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
when: always
build-centos-container:7:
extends:
- .fdo.container-build@centos # the CI template
- .libnice.centos:7 # our template job above
stage: containers
variables:
FDO_DISTRIBUTION_PACKAGES: 'git gtk-doc gnutls-devel gupnp-igd-devel gstreamer1-devel gobject-introspection-devel valgrind net-tools centos-release-scl graphviz'
FDO_DISTRIBUTION_EXEC: 'tests/docker/centos7-meson/pip-installs.sh'
build:
stage: build
extends:
- .fdo.distribution-image@centos
- .libnice.centos:7
interruptible: true
variables:
PREFIX: "${CI_PROJECT_DIR}/libnice-prefix"
......@@ -49,7 +67,7 @@ build:
## && 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/
- ninja -C build/
artifacts:
paths:
- build/
......@@ -202,6 +220,9 @@ build msvc x86 openssl:
test:
stage: test
extends:
- .fdo.distribution-image@centos
- .libnice.centos:7
interruptible: true
needs:
- build
......@@ -210,24 +231,28 @@ test:
script:
- ifconfig
- source scl_source enable rh-python36 && true
- ninja -C build/
- meson test -C build/ --setup debug
artifacts:
when: on_failure
paths:
- build/meson-logs/
test valgrind:
extends: test
script:
- ifconfig
- source scl_source enable rh-python36 && true
- meson configure build -Dgtk_doc=disabled
- ninja -C build/
- meson test -C build/ --setup valgrind --print-errorlogs
doc-and-install:
stage: test
extends:
- .fdo.distribution-image@centos
- .libnice.centos:7
interruptible: true
needs:
- build
......@@ -237,8 +262,8 @@ doc-and-install:
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
- ninja -C build/ libnice-doc
- ninja -C build/ install
- ls -lR ${PREFIX}
artifacts:
paths:
......@@ -246,6 +271,9 @@ doc-and-install:
submit-to-coverity:
stage: test
extends:
- .fdo.distribution-image@centos
- .libnice.centos:7
variables:
COVERITY_PROJECT: libnice
PREFIX: "${CI_PROJECT_DIR}/libnice-prefix"
......@@ -262,7 +290,7 @@ submit-to-coverity:
- meson --werror --warnlevel 2 -Dgtk_doc=disabled -Dinstrospection=disabled --prefix=$PREFIX cov-build/
- export PATH="$PATH:${CI_PROJECT_DIR}/cov-analysis-linux64/bin"
- echo $PATH
- cov-build --dir cov-int ninja-build -C cov-build
- cov-build --dir cov-int ninja -C cov-build
- 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
......
......@@ -15,13 +15,8 @@
FROM centos:centos7
RUN yum -y update; yum clean all
RUN yum -y install git gtk-doc gnutls-devel gupnp-igd-devel gstreamer1-devel gobject-introspection-devel valgrind; yum clean all
RUN yum -y install net-tools; yum clean all
RUN yum -y install git gtk-doc gnutls-devel gupnp-igd-devel gstreamer1-devel gobject-introspection-devel valgrind net-tools centos-release-scl graphviz
ADD pip-installs.sh /
RUN bash -ex /pip-installs.sh && rm /pip-installs.sh
RUN yum -y install centos-release-scl ; yum clean all
RUN yum -y install rh-python36; yum clean all
RUN scl enable rh-python36 "pip3 install meson"
RUN yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm; yum clean all
RUN yum -y install ninja-build; yum clean all
#/bin/sh
set -ex
yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
yum -y install rh-python36 lcov
scl enable rh-python36 "pip3 install meson==0.60.3"
scl enable rh-python36 "pip3 install ninja"
yum clean all
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment