libdisplay-info/.gitlab-ci.yml
Simon Ser a8e78208a5 Add edid-decode testing infrastructure
Add two small shell utilities to generate and compare diffs between
edid-decode and di-edid-decode. Store the diffs in-tree and add tests
to ensure they don't regress. Run the tests in CI with a pinned
installation of edid-decode.

One EDID blob is added to the test collection: dell-2408wfp-dp. It's
extracted [1] from the edid-decode repository.

[1]: https://git.linuxtv.org/edid-decode.git/tree/data/dell-2408wfp-dp

Signed-off-by: Simon Ser <contact@emersion.fr>
Closes: https://gitlab.freedesktop.org/emersion/libdisplay-info/-/issues/5
2022-05-12 11:35:58 +02:00

62 lines
1.6 KiB
YAML

.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-03-28.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'
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/ -Dwerror=true
- ninja -C build/
- ninja -C build/ test
artifacts:
paths:
- build/meson-logs/
rules:
- when: on_success