2022-03-24 01:48:28 +01:00
|
|
|
include:
|
|
|
|
- project: 'freedesktop/ci-templates'
|
2022-09-08 12:19:50 +02:00
|
|
|
ref: 3f37cc0e461f5b0c815409bf6f55759f26a74e9c
|
|
|
|
file:
|
|
|
|
- '/templates/ci-fairy.yml'
|
|
|
|
- '/templates/alpine.yml'
|
2022-03-24 02:20:55 +01:00
|
|
|
|
2022-03-28 11:17:07 +02:00
|
|
|
# When updating the prepare-container step, make sure to bump
|
|
|
|
# FDO_DISTRIBUTION_TAG, otherwise the container won't get rebuilt.
|
2022-06-10 19:44:44 +02:00
|
|
|
# To force a rebuild of the container, use:
|
|
|
|
# $ git push -f -o ci.variable="FDO_FORCE_REBUILD=1"
|
2022-03-24 02:20:55 +01:00
|
|
|
variables:
|
|
|
|
FDO_UPSTREAM_REPO: 'emersion/libdisplay-info'
|
2022-08-15 14:58:59 +02:00
|
|
|
FDO_DISTRIBUTION_TAG: '2022-08-15.0'
|
2022-03-24 01:48:28 +01:00
|
|
|
|
|
|
|
stages:
|
|
|
|
- "Contribution checks"
|
2022-03-24 02:20:55 +01:00
|
|
|
- "Prepare container"
|
|
|
|
- "Build and test"
|
2022-03-24 01:48:28 +01:00
|
|
|
|
|
|
|
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
|
2022-03-24 02:20:55 +01:00
|
|
|
|
|
|
|
prepare-container:
|
|
|
|
extends: .fdo.container-build@alpine@x86_64
|
|
|
|
stage: "Prepare container"
|
|
|
|
variables:
|
2022-06-16 11:04:00 +02:00
|
|
|
FDO_DISTRIBUTION_PACKAGES: |
|
|
|
|
build-base clang compiler-rt meson make git gcovr py3-pygments
|
2022-03-28 11:17:07 +02:00
|
|
|
FDO_DISTRIBUTION_EXEC: |
|
|
|
|
git clone git://linuxtv.org/edid-decode.git
|
|
|
|
cd edid-decode
|
2022-08-15 14:58:59 +02:00
|
|
|
git checkout 6816e6a691f40e6fbb64e6d40f012d7727c6315f
|
2022-03-28 11:17:07 +02:00
|
|
|
make
|
|
|
|
make install
|
|
|
|
cd ..
|
|
|
|
rm -rf edid-decode
|
2022-04-04 21:57:50 +02:00
|
|
|
rules:
|
|
|
|
- when: on_success
|
2022-03-24 02:20:55 +01:00
|
|
|
|
2022-06-16 11:04:00 +02:00
|
|
|
build-gcc:
|
2022-03-24 02:20:55 +01:00
|
|
|
extends: .fdo.distribution-image@alpine
|
|
|
|
stage: "Build and test"
|
|
|
|
script:
|
2022-08-23 23:14:31 +02:00
|
|
|
- CC=gcc meson setup build/ --fatal-meson-warnings -Dwerror=true -Db_coverage=true
|
2022-03-24 02:20:55 +01:00
|
|
|
- ninja -C build/
|
|
|
|
- ninja -C build/ test
|
2022-06-16 11:06:03 +02:00
|
|
|
- ninja -C build/ -j1 coverage-xml coverage-html
|
2022-03-24 02:20:55 +01:00
|
|
|
artifacts:
|
2022-05-25 11:26:37 +02:00
|
|
|
when: always
|
2022-03-24 02:20:55 +01:00
|
|
|
paths:
|
|
|
|
- build/meson-logs/
|
2022-06-06 15:37:16 +02:00
|
|
|
reports:
|
|
|
|
junit: build/meson-logs/testlog.junit.xml
|
2022-06-06 15:32:58 +02:00
|
|
|
coverage_report:
|
|
|
|
coverage_format: cobertura
|
|
|
|
path: build/meson-logs/coverage.xml
|
2022-04-04 21:57:50 +02:00
|
|
|
rules:
|
|
|
|
- when: on_success
|
2022-06-16 11:04:00 +02:00
|
|
|
|
|
|
|
build-clang:
|
|
|
|
extends: .fdo.distribution-image@alpine
|
|
|
|
stage: "Build and test"
|
|
|
|
script:
|
2022-08-23 23:14:31 +02:00
|
|
|
- CC=clang meson setup build/ --fatal-meson-warnings -Dwerror=true -Db_sanitize=address,undefined -Db_lundef=false
|
2022-06-16 11:04:00 +02:00
|
|
|
- ninja -C build/
|
|
|
|
- ninja -C build/ test
|
|
|
|
artifacts:
|
|
|
|
when: always
|
|
|
|
paths:
|
|
|
|
- build/meson-logs/
|
|
|
|
reports:
|
|
|
|
junit: build/meson-logs/testlog.junit.xml
|
|
|
|
rules:
|
|
|
|
- when: on_success
|