Revision ec637686e49b97689ae8c7a72706de902cfc0492 authored by Jens Finkhaeuser on 10 July 2020, 13:46:20 UTC, committed by Jens Finkhaeuser on 10 July 2020, 13:46:20 UTC
1 parent 4fad275
.gitlab-ci.yml
stages:
- build
- test
- release
cache:
paths:
- apt-cache/
### build & test dependencies
.dep-linux-deps: &dep-linux-deps
tags:
- linux
before_script:
- apt-get -o dir::cache::archives="apt-cache" update
- >
apt-get -o dir::cache::archives="apt-cache" install -y
ninja-build python3 python3-pip clang gcc gcc-multilib g++-multilib
gcovr lcov
git
- pip3 install meson
.dep-linux: &dep-linux
<<: *dep-linux-deps
image: debian
.dep-android: &dep-android
<<: *dep-linux-deps
image: jfinkhaeuser/gitlab-ci-android-ndk
### build
.build-linux: &build-linux
<<: *dep-linux
stage: build
script:
- mkdir build
- cd build
- CXX=${compiler} CXXFLAGS="${ci_cxx_flags}" meson -Db_coverage=${coverage:=false} ..
- ninja
artifacts:
name: build
expire_in: 1 week
paths:
- build/
build:clang:
<<: *build-linux
variables:
compiler: clang++
build:gcc:
<<: *build-linux
variables:
compiler: g++
coverage: "true"
build:gcc-i386:
<<: *build-linux
variables:
compiler: g++
ci_cxx_flags: -m32
.build-android: &build-android
<<: *dep-android
stage: build
script:
- pip3 install pipenv
- pipenv install
- pipenv run ./android.py ${androidabi}
- mkdir build
- cd build
- CXX=${compiler} CXXFLAGS="${ci_cxx_flags}" meson -Db_coverage=${coverage:=false} --cross-file ../android-${androidabi}.txt ..
- ninja
artifacts:
name: build
expire_in: 1 week
paths:
- build/
build:android-arm64-v8a:
<<: *build-android
stage: build
variables:
androidabi: arm64-v8a
build:android-armeabi-v7a:
<<: *build-android
stage: build
variables:
androidabi: armeabi-v7a
build:android-x86:
<<: *build-android
stage: build
variables:
androidabi: x86
build:android-x86_64:
<<: *build-android
stage: build
variables:
androidabi: x86_64
### test
.test-linux: &test-linux
<<: *dep-linux
script:
- cd build
- ./unittests --gtest_output=xml:unittests-log.xml 2>unittests-debug.log
- if test "${coverage:=false}" == true ; then ninja coverage && cat meson-logs/coverage.txt ; fi
artifacts:
name: lib_test_and_logs
expire_in: 1 week
when: always
paths:
- build/libliberate.*
- build/unittests
- build/unittests-debug.log
- build/unittests-log.xml
- build/meson-logs/coverage*
reports:
junit:
- build/unittests-log.xml
test:clang:
<<: *test-linux
image: debian
stage: test
needs:
- build:clang
test:gcc:
<<: *test-linux
image: debian
stage: test
needs:
- build:gcc
variables:
coverage: "true"
coverage: /^TOTAL.*\s+(\d+\%)$/
test:gcc-i386:
<<: *test-linux
image: debian
stage: test
needs:
- build:gcc-i386
### distribution
release:
<<: *dep-linux
image: debian
stage: release
script:
- cd build
- ninja dist
needs:
- build:gcc
artifacts:
name: release
paths:
- build/meson-dist/liberate-*.tar.*
only:
- tags
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...