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-11-23 15:26:12 +01:00
|
|
|
FDO_DISTRIBUTION_TAG: '2022-11-24.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"
|
2023-01-10 15:28:00 +01:00
|
|
|
- "Publish"
|
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-11-23 15:26:12 +01:00
|
|
|
FDO_BASE_IMAGE: alpine:3.17
|
2022-06-16 11:04:00 +02:00
|
|
|
FDO_DISTRIBUTION_PACKAGES: |
|
2022-11-23 01:36:44 +01:00
|
|
|
build-base clang compiler-rt meson make git gcovr py3-pygments go hwdata
|
2022-03-28 11:17:07 +02:00
|
|
|
FDO_DISTRIBUTION_EXEC: |
|
|
|
|
git clone git://linuxtv.org/edid-decode.git
|
|
|
|
cd edid-decode
|
2022-11-23 12:54:57 +01:00
|
|
|
git checkout 894eefd10f5fd67327fae8e6160e7eb4172e554f
|
2022-03-28 11:17:07 +02:00
|
|
|
make
|
|
|
|
make install
|
|
|
|
cd ..
|
|
|
|
rm -rf edid-decode
|
2022-09-28 21:22:09 +02:00
|
|
|
|
|
|
|
go install git.sr.ht/~emersion/gyosu@latest
|
|
|
|
mv ~/go/bin/gyosu /usr/bin/
|
|
|
|
rm -rf ~/go
|
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
|
2022-09-28 21:22:09 +02:00
|
|
|
|
2023-01-10 15:28:00 +01:00
|
|
|
build-docs:
|
2022-09-28 21:22:09 +02:00
|
|
|
extends: .fdo.distribution-image@alpine
|
|
|
|
stage: "Build and test"
|
|
|
|
script:
|
|
|
|
- gyosu -I$PWD/include/ -fexported-symbols='di_*'
|
|
|
|
-ffile-prefix-map=$PWD/include/= -fsite-name=libdisplay-info
|
|
|
|
-o public $PWD/include/libdisplay-info/
|
|
|
|
artifacts:
|
|
|
|
paths:
|
|
|
|
- public/
|
2023-01-10 15:28:00 +01:00
|
|
|
rules:
|
|
|
|
- when: on_success
|
|
|
|
|
|
|
|
pages:
|
|
|
|
extends: .fdo.distribution-image@alpine
|
|
|
|
stage: "Publish"
|
|
|
|
script:
|
|
|
|
- "true"
|
|
|
|
artifacts:
|
|
|
|
paths:
|
|
|
|
- public/
|
2022-09-28 21:22:09 +02:00
|
|
|
rules:
|
|
|
|
- if: '$CI_PROJECT_PATH == "emersion/libdisplay-info" && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
|
|
|
|
when: on_success
|
|
|
|
- when: never
|