libdisplay-info/.gitlab-ci.yml

70 lines
1.9 KiB
YAML
Raw Normal View History

.templates_sha: &templates_sha 3f37cc0e461f5b0c815409bf6f55759f26a74e9c
include:
- project: 'freedesktop/ci-templates'
ref: *templates_sha
file: '/templates/ci-fairy.yml'
- project: 'freedesktop/ci-templates'
ref: *templates_sha
file: '/templates/alpine.yml'
# When updating the prepare-container step, make sure to bump
# FDO_DISTRIBUTION_TAG, otherwise the container won't get rebuilt.
# FDO_FORCE_REBUILD can be used when testing container changes.
variables:
FDO_UPSTREAM_REPO: 'emersion/libdisplay-info'
FDO_DISTRIBUTION_TAG: '2022-06-08.0'
#FDO_FORCE_REBUILD: 1
stages:
- "Contribution checks"
- "Prepare container"
- "Build and test"
check-mr:
extends: .fdo.ci-fairy
stage: "Contribution checks"
script:
- ci-fairy check-commits --signed-off-by
- ci-fairy check-merge-request --require-allow-collaboration
rules:
- if: '$CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "main"'
when: always
- when: never
prepare-container:
extends: .fdo.container-build@alpine@x86_64
stage: "Prepare container"
variables:
FDO_DISTRIBUTION_PACKAGES: 'build-base meson make git gcovr py3-pygments'
FDO_DISTRIBUTION_EXEC: |
git clone git://linuxtv.org/edid-decode.git
cd edid-decode
git checkout 8a8d673d738ce010ca32a179032e8f6c0bb5dfb4
make
make install
cd ..
rm -rf edid-decode
rules:
- when: on_success
build:
extends: .fdo.distribution-image@alpine
stage: "Build and test"
script:
- meson build/ --fatal-meson-warnings -Dwerror=true -Db_coverage=true
- ninja -C build/
- ninja -C build/ test
- ninja -C build/ coverage-xml coverage-html
artifacts:
when: always
paths:
- build/meson-logs/
reports:
junit: build/meson-logs/testlog.junit.xml
coverage_report:
coverage_format: cobertura
path: build/meson-logs/coverage.xml
rules:
- when: on_success