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

ci: Use fdo templates

parent fbd8b4a0
stages: stages:
- verify - verify
- containers
- build - build
- test - test
- deploy - deploy
...@@ -11,9 +12,6 @@ workflow: ...@@ -11,9 +12,6 @@ workflow:
- if: $CI_COMMIT_BRANCH == "latest-release" - if: $CI_COMMIT_BRANCH == "latest-release"
- if: $CI_PIPELINE_SOURCE == "web" - 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 # Check "allow-edit" checkbox on merge requests with ci-fairy
# #
...@@ -21,6 +19,14 @@ default: ...@@ -21,6 +19,14 @@ default:
include: include:
- project: 'freedesktop/ci-templates' - project: 'freedesktop/ci-templates'
file: '/templates/ci-fairy.yml' 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: check-allow-collaboration:
extends: extends:
...@@ -36,8 +42,20 @@ check-allow-collaboration: ...@@ -36,8 +42,20 @@ check-allow-collaboration:
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"' - if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
when: always 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: build:
stage: build stage: build
extends:
- .fdo.distribution-image@centos
- .libnice.centos:7
interruptible: true interruptible: true
variables: variables:
PREFIX: "${CI_PROJECT_DIR}/libnice-prefix" PREFIX: "${CI_PROJECT_DIR}/libnice-prefix"
...@@ -49,7 +67,7 @@ build: ...@@ -49,7 +67,7 @@ build:
## && true to make gitlab-ci happy ## && true to make gitlab-ci happy
- source scl_source enable rh-python36 && true - source scl_source enable rh-python36 && true
- meson --werror --warnlevel 2 -Dgtk_doc=enabled --prefix=$PREFIX build/ - meson --werror --warnlevel 2 -Dgtk_doc=enabled --prefix=$PREFIX build/
- ninja-build -C build/ - ninja -C build/
artifacts: artifacts:
paths: paths:
- build/ - build/
...@@ -202,6 +220,9 @@ build msvc x86 openssl: ...@@ -202,6 +220,9 @@ build msvc x86 openssl:
test: test:
stage: test stage: test
extends:
- .fdo.distribution-image@centos
- .libnice.centos:7
interruptible: true interruptible: true
needs: needs:
- build - build
...@@ -210,24 +231,28 @@ test: ...@@ -210,24 +231,28 @@ test:
script: script:
- ifconfig - ifconfig
- source scl_source enable rh-python36 && true - source scl_source enable rh-python36 && true
- ninja -C build/
- meson test -C build/ --setup debug - meson test -C build/ --setup debug
artifacts: artifacts:
when: on_failure when: on_failure
paths: paths:
- build/meson-logs/ - build/meson-logs/
test valgrind: test valgrind:
extends: test extends: test
script: script:
- ifconfig - ifconfig
- source scl_source enable rh-python36 && true - source scl_source enable rh-python36 && true
- meson configure build -Dgtk_doc=disabled - meson configure build -Dgtk_doc=disabled
- ninja -C build/
- meson test -C build/ --setup valgrind --print-errorlogs - meson test -C build/ --setup valgrind --print-errorlogs
doc-and-install: doc-and-install:
stage: test stage: test
extends:
- .fdo.distribution-image@centos
- .libnice.centos:7
interruptible: true interruptible: true
needs: needs:
- build - build
...@@ -237,8 +262,8 @@ doc-and-install: ...@@ -237,8 +262,8 @@ doc-and-install:
PREFIX: "${CI_PROJECT_DIR}/libnice-prefix" PREFIX: "${CI_PROJECT_DIR}/libnice-prefix"
script: script:
- source scl_source enable rh-python36 && true - source scl_source enable rh-python36 && true
- ninja-build -C build/ libnice-doc - ninja -C build/ libnice-doc
- ninja-build -C build/ install - ninja -C build/ install
- ls -lR ${PREFIX} - ls -lR ${PREFIX}
artifacts: artifacts:
paths: paths:
...@@ -246,6 +271,9 @@ doc-and-install: ...@@ -246,6 +271,9 @@ doc-and-install:
submit-to-coverity: submit-to-coverity:
stage: test stage: test
extends:
- .fdo.distribution-image@centos
- .libnice.centos:7
variables: variables:
COVERITY_PROJECT: libnice COVERITY_PROJECT: libnice
PREFIX: "${CI_PROJECT_DIR}/libnice-prefix" PREFIX: "${CI_PROJECT_DIR}/libnice-prefix"
...@@ -262,7 +290,7 @@ submit-to-coverity: ...@@ -262,7 +290,7 @@ submit-to-coverity:
- meson --werror --warnlevel 2 -Dgtk_doc=disabled -Dinstrospection=disabled --prefix=$PREFIX cov-build/ - meson --werror --warnlevel 2 -Dgtk_doc=disabled -Dinstrospection=disabled --prefix=$PREFIX cov-build/
- export PATH="$PATH:${CI_PROJECT_DIR}/cov-analysis-linux64/bin" - export PATH="$PATH:${CI_PROJECT_DIR}/cov-analysis-linux64/bin"
- echo $PATH - 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 - 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 - 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 @@ ...@@ -15,13 +15,8 @@
FROM centos:centos7 FROM centos:centos7
RUN yum -y update; yum clean all 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 git gtk-doc gnutls-devel gupnp-igd-devel gstreamer1-devel gobject-introspection-devel valgrind net-tools centos-release-scl graphviz
RUN yum -y install net-tools; yum clean all
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