add ci support

parent d65c8ae2
Pipeline #1736 passed with stage
in 9 minutes and 38 seconds
stages:
- build
before_script:
# activate backports *for buster*
- echo "deb http://deb.debian.org/debian buster-backports main" >> /etc/apt/sources.list
- apt-get -y update
- apt-get -y install git make meson gcc clang libgtk-3.0 libhandy-0.0 libsoup2.4 libsecret-1-0 libsecret-1-dev
# install myhtml manually
- git clone https://github.com/lexborisov/myhtml
- cd myhtml && make && make install && make install && cp *.pc /usr/lib/pkgconfig/ && cd ..
.build: &build_steps
echo "BUILD_OPTS=${BUILD_OPTS}" &&
export LC_ALL=C.UTF-8 &&
meson ${BUILD_OPTS} . _build &&
ninja -C _build
build-debian-gcc:
image: debian:buster
tags:
- debian
stage: build
variables:
BUILD_OPTS: -Dgtk_doc=true -Db_coverage=true --werror
script:
- *build_steps
build-debian-clang:
image: debian:buster
tags:
- debian
stage: build
variables:
BUILD_OPTS: -Dgtk_doc=true -Db_coverage=true --werror
CC: clang
script:
- *build_steps
#unit-test:
# image: debian:buster
# <<: *tags
# stage: test
# dependencies:
# - build-debian-gcc
# script:
# - xvfb-run -s -noreset ninja -C _build test
# - ninja -C _build coverage
# coverage: '/^\s+lines\.+:\s+([\d.]+\%)\s+/'
# artifacts:
# when: always
# paths:
# - _build
#
#package-debian:
# image: debian:buster
# <<: *tags
# stage: package
# script:
# - dpkg-buildpackage -uc -us
# - cp ../*.deb .
# artifacts:
# paths:
# - "*.deb"
#
#publish-docs:
# stage: deploy
# dependencies:
# - build-gtkdoc
# environment:
# name: production
# url: https://developer.puri.sm/projects/libhandy/
# before_script:
# - export DEBIAN_FRONTEND=noninteractive
# - apt-get -y update
# - apt-get -y install ssh rsync
# tags:
# - debian
# script:
# # Don't publish in forks
# - '[ "$CI_PROJECT_NAMESPACE" == "Librem5" ] || exit 0'
# - mkdir -p ~/.ssh/
# - chmod 0700 ~/.ssh/
# - echo "$SSH_HOST_KEY" > ~/.ssh/known_hosts
# - touch ~/.ssh/id_rsa
# - chmod 0600 ~/.ssh/id_rsa
# - echo "$SSH_KEY" >> ~/.ssh/id_rsa
# - rsync -av -i --stats -e "ssh -l $SSH_USER -i ~/.ssh/id_rsa -p $SSH_PORT" _build/doc/html/ "$RSYNC_TARGET"
# only:
# - master
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