.gitlab-ci.yml 36 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362
  1. # vim: set expandtab shiftwidth=2 tabstop=8 textwidth=0 filetype=yaml:
  2. ########################################
  3. # #
  4. # THIS FILE IS GENERATED, DO NOT EDIT #
  5. # #
  6. ########################################
  7. # To change the gitlab CI, edit .gitlab-ci/ci.template and/or .gitlab-ci/config.yaml
  8. # and run ci-fairy generate-template. For details, see
  9. # https://freedesktop.pages.freedesktop.org/ci-templates/ci-fairy.html#templating-gitlab-ci-yml
  10. # This is a bit complicated for two reasons:
  11. # - we really want to run dnf/apt/... only once, updating on the test runner for
  12. # each job takes forever. So we create a container image for each distribution
  13. # tested, then run the tests on this container image.
  14. #
  15. # This is handled by the ci-templates, ensuring containers are only rebuilt
  16. # when the TAG changes.
  17. #
  18. # - GitLab only allows one script: set per job but we have a bunch of commands
  19. # we need to re-run for each build (meson && ninja && etc). YAML cannot merge
  20. # arrays so we're screwed.
  21. #
  22. # So instead we use a default_build template and override everything with
  23. # variables. The only two variables that matter:
  24. # MESON_ARGS=-Denable-something=true
  25. # NINJA_ARGS=dist ... to run 'ninja -C builddir dist'
  26. # Note that you cannot use scripts: in any target if you expect default_build
  27. # to work.
  28. #
  29. #
  30. # All jobs must follow the naming scheme of
  31. # <distribution>:<version>@activity:
  32. # e.g. fedora:31@build-default
  33. .templates_sha: &template_sha c6aeb16f86e32525fa630fb99c66c4f3e62fc3cb
  34. include:
  35. - project: 'freedesktop/ci-templates'
  36. ref: *template_sha
  37. file:
  38. - '/templates/ci-fairy.yml'
  39. # Alpine container builder template
  40. - '/templates/alpine.yml'
  41. # Arch container builder template
  42. - '/templates/arch.yml'
  43. # Debian container builder template
  44. - '/templates/debian.yml'
  45. # Fedora container builder template
  46. - '/templates/fedora.yml'
  47. # Ubuntu container builder template
  48. - '/templates/ubuntu.yml'
  49. workflow:
  50. rules:
  51. # do not duplicate pipelines on merge pipelines
  52. - if: $CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS && $CI_PIPELINE_SOURCE == "push"
  53. when: never
  54. # merge pipeline
  55. - if: &is-merge-attempt $GITLAB_USER_LOGIN == "marge-bot" && $CI_PIPELINE_SOURCE == "merge_request_event"
  56. variables:
  57. FDO_RUNNER_JOB_PRIORITY_TAG_X86_64: priority:high
  58. FDO_RUNNER_JOB_PRIORITY_TAG_X86_64_KVM: priority:high-kvm
  59. FDO_RUNNER_JOB_PRIORITY_TAG_AARCH64: priority:high-aarch64
  60. # post-merge pipeline
  61. - if: &is-post-merge $GITLAB_USER_LOGIN == "marge-bot" && $CI_PIPELINE_SOURCE == "push"
  62. variables:
  63. FDO_RUNNER_JOB_PRIORITY_TAG_X86_64: priority:high
  64. FDO_RUNNER_JOB_PRIORITY_TAG_X86_64_KVM: priority:high-kvm
  65. FDO_RUNNER_JOB_PRIORITY_TAG_AARCH64: priority:high-aarch64
  66. # Pre-merge pipeline
  67. - if: &is-pre-merge $CI_PIPELINE_SOURCE == "merge_request_event"
  68. # Push to a branch on a fork
  69. - if: $CI_COMMIT_BRANCH
  70. stages:
  71. - sanity check # CI/commit checks
  72. - prep # prep work like rebuilding the container images if there is a change
  73. - build # for actually building and testing things in a container
  74. - test-suite # for running the test suite in a VM
  75. - test-suite-no-libwacom # for running the test suite in a VM (libwacom disabled)
  76. - valgrind # for running the test suite under valgrind in a VM
  77. - distro # distribs test
  78. - deploy # trigger wayland's website generation
  79. - container_clean # clean up unused container images (scheduled jobs only)
  80. variables:
  81. ###############################################################################
  82. # This is the list of packages required to build libinput with the default #
  83. # configuration. #
  84. # #
  85. # Run dnf install/apt-get install/.. with the list of packages for your #
  86. # distribution #
  87. # #
  88. # See the documentation here: #
  89. # https://wayland.freedesktop.org/libinput/doc/latest/building.html #
  90. ###############################################################################
  91. FEDORA_PACKAGES: 'git-core gcc gcc-c++ pkgconf-pkg-config meson check-devel libudev-devel libevdev-devel doxygen graphviz python3-sphinx python3-recommonmark python3-sphinx_rtd_theme python3-pytest-xdist libwacom-devel cairo-devel gtk4-devel glib2-devel mtdev-devel diffutils wayland-protocols-devel black clang clang-tools-extra jq rpmdevtools valgrind systemd-udev qemu-img qemu-system-x86-core qemu-system-aarch64-core jq python3-click python3-rich virtme-ng lua-devel'
  92. DEBIAN_PACKAGES: 'git gcc g++ pkg-config meson check libudev-dev libevdev-dev doxygen graphviz python3-sphinx python3-recommonmark python3-sphinx-rtd-theme python3-pytest-xdist libwacom-dev libcairo2-dev libgtk-3-dev libglib2.0-dev libmtdev-dev curl lua5.4-dev'
  93. UBUNTU_PACKAGES: 'git gcc g++ pkg-config meson check libudev-dev libevdev-dev doxygen graphviz python3-sphinx python3-recommonmark python3-sphinx-rtd-theme python3-pytest-xdist libwacom-dev libcairo2-dev libgtk-3-dev libglib2.0-dev libmtdev-dev lua5.4-dev'
  94. ARCH_PACKAGES: 'git gcc pkgconfig meson check libsystemd libevdev python-pytest-xdist libwacom gtk4 mtdev diffutils lua'
  95. ALPINE_PACKAGES: 'git gcc build-base pkgconfig meson check-dev eudev-dev libevdev-dev libwacom-dev cairo-dev gtk4.0-dev mtdev-dev bash lua5.4-dev'
  96. ############################ end of package lists #############################
  97. # these tags should be updated each time the list of packages is updated
  98. # changing these will force rebuilding the associated image
  99. # Note: these tags have no meaning and are not tied to a particular
  100. # libinput version
  101. FEDORA_TAG: '2026-01-09.0'
  102. DEBIAN_TAG: '2026-01-09.0'
  103. UBUNTU_TAG: '2026-01-09.0'
  104. ARCH_TAG: '2026-01-09.0'
  105. ALPINE_TAG: '2026-01-09.0'
  106. FDO_UPSTREAM_REPO: libinput/libinput
  107. MESON_BUILDDIR: "build dir"
  108. NINJA_ARGS: ''
  109. MESON_ARGS: ''
  110. MESON_TEST_ARGS: '--no-suite=hardware'
  111. # udev isn't available/working properly in the containers
  112. UDEV_NOT_AVAILABLE: 1
  113. GIT_DEPTH: 1
  114. # Default priority for non-merge pipelines
  115. FDO_RUNNER_JOB_PRIORITY_TAG_X86_64: "" # Empty tags are ignored by gitlab
  116. FDO_RUNNER_JOB_PRIORITY_TAG_X86_64_KVM: kvm
  117. FDO_RUNNER_JOB_PRIORITY_TAG_AARCH64: aarch64
  118. .policy:
  119. retry:
  120. max: 2
  121. when:
  122. - runner_system_failure
  123. - stuck_or_timeout_failure
  124. # cancel run when a newer version is pushed to the branch
  125. interruptible: true
  126. dependencies: []
  127. .policy-retry-on-failure:
  128. retry:
  129. max: 1
  130. when:
  131. - runner_system_failure
  132. - stuck_or_timeout_failure
  133. # cancel run when a newer version is pushed to the branch
  134. interruptible: true
  135. dependencies: []
  136. .default_artifacts:
  137. artifacts:
  138. name: "meson-logs-$CI_JOB_NAME"
  139. when: always
  140. expire_in: 1 week
  141. paths:
  142. - $MESON_BUILDDIR/meson-logs
  143. - $MESON_BUILDDIR/valgrind.*.log
  144. reports:
  145. junit: $MESON_BUILDDIR/*junit*.xml
  146. .fdo-runner-tags:
  147. tags:
  148. - $FDO_RUNNER_JOB_PRIORITY_TAG_X86_64
  149. #################################################################
  150. # #
  151. # sanity check stage #
  152. # #
  153. #################################################################
  154. fail-if-fork-is-not-public:
  155. extends:
  156. - .fdo-runner-tags
  157. stage: sanity check
  158. script:
  159. - |
  160. if [ $CI_PROJECT_VISIBILITY != "public" ]; then
  161. echo "*************************************************************************************"
  162. echo "Project visibility must be set to 'public'"
  163. echo "Change this in $CI_PROJECT_URL/edit under 'Visibility, project features, permissions'"
  164. echo "*************************************************************************************"
  165. exit 1
  166. fi
  167. except:
  168. - main@libinput/libinput
  169. # Re-generate the CI script and make sure it's the one currently checked in
  170. # If this job fails, re-generate the gitlab-ci.yml script, see
  171. # $SRCDIR/.gitlab-ci/generate-gitlab-ci.py
  172. #
  173. check-ci-script:
  174. extends:
  175. - .fdo.ci-fairy
  176. - .fdo-runner-tags
  177. stage: sanity check
  178. script:
  179. - ci-fairy generate-template --verify && exit 0 || true
  180. - >
  181. printf "%s\n" \
  182. "Committed gitlab-ci.yml differs from generated gitlab-ci.yml. Please verify" \
  183. "https://wayland.freedesktop.org/libinput/doc/latest/contributing.html"
  184. - exit 1
  185. #
  186. # Verify that commit messages are as expected, etc.
  187. #
  188. check-commit:
  189. extends:
  190. - .fdo.ci-fairy
  191. - .fdo-runner-tags
  192. stage: sanity check
  193. script:
  194. - ci-fairy -vv check-commits --junit-xml=results.xml && exit 0 || true
  195. - >
  196. printf "%s\n" \
  197. "Error checking commit format. Please verify" \
  198. "https://wayland.freedesktop.org/libinput/doc/latest/contributing.html"
  199. - exit 1
  200. except:
  201. - main@libinput/libinput
  202. variables:
  203. GIT_DEPTH: 100
  204. artifacts:
  205. reports:
  206. junit: results.xml
  207. #
  208. # Check for trailing whitespaces
  209. #
  210. check-whitespace:
  211. extends:
  212. - .fdo.ci-fairy
  213. - .fdo-runner-tags
  214. stage: sanity check
  215. script:
  216. - .gitlab-ci/whitespace-check.py $(git ls-files)
  217. #
  218. # pre-commit hooks
  219. #
  220. pre-commit-hooks:
  221. extends:
  222. - .fdo.ci-fairy
  223. - .fdo-runner-tags
  224. stage: sanity check
  225. script:
  226. - python3 -m venv venv
  227. - source venv/bin/activate
  228. - pip3 install pre-commit
  229. - pre-commit run --all-files
  230. - git diff --exit-code || (echo "ERROR - Code style errors found, please fix" && false)
  231. #################################################################
  232. # #
  233. # prep stage #
  234. # #
  235. #################################################################
  236. fedora:42@container-prep:
  237. extends:
  238. - .fdo.container-build@fedora
  239. - .policy
  240. - .fdo-runner-tags
  241. stage: prep
  242. variables:
  243. GIT_STRATEGY: none
  244. FDO_DISTRIBUTION_VERSION: '42'
  245. FDO_DISTRIBUTION_PACKAGES: $FEDORA_PACKAGES
  246. FDO_DISTRIBUTION_TAG: $FEDORA_TAG
  247. fedora:43@container-prep:
  248. extends:
  249. - .fdo.container-build@fedora
  250. - .policy
  251. - .fdo-runner-tags
  252. stage: prep
  253. variables:
  254. GIT_STRATEGY: none
  255. FDO_DISTRIBUTION_VERSION: '43'
  256. FDO_DISTRIBUTION_PACKAGES: $FEDORA_PACKAGES
  257. FDO_DISTRIBUTION_TAG: $FEDORA_TAG
  258. debian:stable@container-prep:
  259. extends:
  260. - .fdo.container-build@debian
  261. - .policy
  262. - .fdo-runner-tags
  263. stage: prep
  264. variables:
  265. GIT_STRATEGY: none
  266. FDO_DISTRIBUTION_VERSION: 'stable'
  267. FDO_DISTRIBUTION_PACKAGES: $DEBIAN_PACKAGES
  268. FDO_DISTRIBUTION_TAG: $DEBIAN_TAG
  269. ubuntu:25.10@container-prep:
  270. extends:
  271. - .fdo.container-build@ubuntu
  272. - .policy
  273. - .fdo-runner-tags
  274. stage: prep
  275. variables:
  276. GIT_STRATEGY: none
  277. FDO_DISTRIBUTION_VERSION: '25.10'
  278. FDO_DISTRIBUTION_PACKAGES: $UBUNTU_PACKAGES
  279. FDO_DISTRIBUTION_TAG: $UBUNTU_TAG
  280. arch:rolling@container-prep:
  281. extends:
  282. - .fdo.container-build@arch
  283. - .policy
  284. - .fdo-runner-tags
  285. stage: prep
  286. variables:
  287. GIT_STRATEGY: none
  288. FDO_DISTRIBUTION_VERSION: 'rolling'
  289. FDO_DISTRIBUTION_PACKAGES: $ARCH_PACKAGES
  290. FDO_DISTRIBUTION_TAG: $ARCH_TAG
  291. alpine:latest@container-prep:
  292. extends:
  293. - .fdo.container-build@alpine
  294. - .policy
  295. - .fdo-runner-tags
  296. stage: prep
  297. variables:
  298. GIT_STRATEGY: none
  299. FDO_DISTRIBUTION_VERSION: 'latest'
  300. FDO_DISTRIBUTION_PACKAGES: $ALPINE_PACKAGES
  301. FDO_DISTRIBUTION_TAG: $ALPINE_TAG
  302. #################################################################
  303. # #
  304. # container clean stage #
  305. # run during the clean stage #
  306. # #
  307. #################################################################
  308. #
  309. # This stage will look for the container images we currently have in
  310. # the registry and will remove any that are not tagged with the provided
  311. # $container_image:$tag
  312. #
  313. .container-clean:
  314. extends:
  315. - .policy
  316. - .fdo.ci-fairy
  317. - .fdo-runner-tags
  318. stage: container_clean
  319. script:
  320. # Go to your Profile, Settings, Access Tokens
  321. # Create a personal token with 'api' scope, copy the value.
  322. # Go to CI/CD, Schedules, schedule a new monthly job (or edit the existing one)
  323. # Define a variable of type File named AUTHFILE. Content is that token
  324. # value.
  325. - ci-fairy -v --authfile $AUTHFILE delete-image
  326. --repository $FDO_DISTRIBUTION_NAME/$FDO_DISTRIBUTION_VERSION
  327. --exclude-tag $FDO_DISTRIBUTION_TAG
  328. allow_failure: true
  329. only:
  330. - schedules
  331. fedora:42@container-clean:
  332. extends:
  333. - .policy
  334. - .container-clean
  335. variables:
  336. GIT_STRATEGY: none
  337. CURRENT_CONTAINER_IMAGE: $CI_REGISTRY_IMAGE/fedora/$FDO_DISTRIBUTION_VERSION:$FDO_DISTRIBUTION_TAG
  338. FDO_DISTRIBUTION_VERSION: '42'
  339. FDO_DISTRIBUTION_TAG: $FEDORA_TAG
  340. fedora:43@container-clean:
  341. extends:
  342. - .policy
  343. - .container-clean
  344. variables:
  345. GIT_STRATEGY: none
  346. CURRENT_CONTAINER_IMAGE: $CI_REGISTRY_IMAGE/fedora/$FDO_DISTRIBUTION_VERSION:$FDO_DISTRIBUTION_TAG
  347. FDO_DISTRIBUTION_VERSION: '43'
  348. FDO_DISTRIBUTION_TAG: $FEDORA_TAG
  349. debian:stable@container-clean:
  350. extends:
  351. - .policy
  352. - .container-clean
  353. variables:
  354. GIT_STRATEGY: none
  355. CURRENT_CONTAINER_IMAGE: $CI_REGISTRY_IMAGE/debian/$FDO_DISTRIBUTION_VERSION:$FDO_DISTRIBUTION_TAG
  356. FDO_DISTRIBUTION_VERSION: 'stable'
  357. FDO_DISTRIBUTION_TAG: $DEBIAN_TAG
  358. ubuntu:25.10@container-clean:
  359. extends:
  360. - .policy
  361. - .container-clean
  362. variables:
  363. GIT_STRATEGY: none
  364. CURRENT_CONTAINER_IMAGE: $CI_REGISTRY_IMAGE/ubuntu/$FDO_DISTRIBUTION_VERSION:$FDO_DISTRIBUTION_TAG
  365. FDO_DISTRIBUTION_VERSION: '25.10'
  366. FDO_DISTRIBUTION_TAG: $UBUNTU_TAG
  367. arch:rolling@container-clean:
  368. extends:
  369. - .policy
  370. - .container-clean
  371. variables:
  372. GIT_STRATEGY: none
  373. CURRENT_CONTAINER_IMAGE: $CI_REGISTRY_IMAGE/arch/$FDO_DISTRIBUTION_VERSION:$FDO_DISTRIBUTION_TAG
  374. FDO_DISTRIBUTION_VERSION: 'rolling'
  375. FDO_DISTRIBUTION_TAG: $ARCH_TAG
  376. alpine:latest@container-clean:
  377. extends:
  378. - .policy
  379. - .container-clean
  380. variables:
  381. GIT_STRATEGY: none
  382. CURRENT_CONTAINER_IMAGE: $CI_REGISTRY_IMAGE/alpine/$FDO_DISTRIBUTION_VERSION:$FDO_DISTRIBUTION_TAG
  383. FDO_DISTRIBUTION_VERSION: 'latest'
  384. FDO_DISTRIBUTION_TAG: $ALPINE_TAG
  385. #################################################################
  386. # #
  387. # build stage #
  388. # #
  389. #################################################################
  390. .build@template:
  391. extends:
  392. - .policy
  393. - .default_artifacts
  394. - .fdo-runner-tags
  395. stage: build
  396. script:
  397. - .gitlab-ci/meson-build.sh
  398. # Run meson and meson test in the container image through qemu
  399. .build-in-vng@template:
  400. extends:
  401. - .policy
  402. - .default_artifacts
  403. tags:
  404. - $FDO_RUNNER_JOB_PRIORITY_TAG_X86_64_KVM
  405. variables:
  406. MESON_BUILDDIR: build_dir
  407. VNG_KERNEL: https://gitlab.freedesktop.org/api/v4/projects/libevdev%2Fhid-tools/packages/generic/kernel-x86_64/v6.14/bzImage
  408. script:
  409. # first build in the host container
  410. - .gitlab-ci/meson-build.sh --skip-test
  411. - mkdir -p $MESON_BUILDDIR
  412. - curl -LO $VNG_KERNEL
  413. - export -p > .vngenv
  414. # runs the test suite only
  415. - |
  416. vng --run ./bzImage \
  417. --user root \
  418. --overlay-rwdir=$HOME \
  419. --append HOME=$HOME \
  420. --overlay-rwdir=$(pwd) \
  421. --rwdir=$MESON_BUILDDIR \
  422. --exec "source $PWD/.vngenv; rm $PWD/.vngenv; .gitlab-ci/meson-build.sh --skip-setup --skip-build --run-test"
  423. #
  424. # Fedora
  425. #
  426. .check_tainted: &check_tainted |
  427. # make sure the kernel is not tainted
  428. if [[ "$(ssh localhost -p 5555 cat /proc/sys/kernel/tainted)" -gt 0 ]];
  429. then
  430. echo tainted kernel ;
  431. exit 1 ;
  432. fi
  433. # Run meson and meson test in the qemu image
  434. .build-in-qemu@template:
  435. extends:
  436. - .policy
  437. tags:
  438. - $FDO_RUNNER_JOB_PRIORITY_TAG_X86_64_KVM
  439. variables:
  440. MESON_BUILDDIR: build_dir
  441. script:
  442. # start our vm, no args required
  443. - /app/vmctl start || (echo "Error - Failed to start the VM." && exit 1)
  444. - *check_tainted
  445. - "scp -r $PWD vm:"
  446. - echo "CI_JOB_ID=\"$CI_JOB_ID\"" > sshenv
  447. - echo "CI_JOB_NAME=\"$CI_JOB_NAME\"" >> sshenv
  448. - echo "MESON_ARGS=\"$MESON_ARGS\"" >> sshenv
  449. - echo "MESON_BUILDDIR=\"$MESON_BUILDDIR\"" >> sshenv
  450. - echo "MESON_TEST_ARGS=\"$MESON_TEST_ARGS\"" >> sshenv
  451. - echo "NINJA_ARGS=\"$NINJA_ARGS\"" >> sshenv
  452. - "scp sshenv vm:~/$CI_PROJECT_NAME/.meson_environment"
  453. - /app/vmctl exec "cd $CI_PROJECT_NAME ; .gitlab-ci/meson-build.sh" && touch .success || true
  454. # no matter the results of the tests, we want to fetch the logs
  455. - scp -r vm:$CI_PROJECT_NAME/$MESON_BUILDDIR .
  456. - *check_tainted
  457. - /app/vmctl stop
  458. - if [[ ! -e .success ]] ;
  459. then
  460. exit 1 ;
  461. fi
  462. artifacts:
  463. name: "qemu-meson-logs-$CI_JOB_NAME"
  464. when: always
  465. expire_in: 1 week
  466. paths:
  467. - $MESON_BUILDDIR/meson-logs
  468. - console.out
  469. reports:
  470. junit: $MESON_BUILDDIR/*junit*.xml
  471. # Run in a test suite. Special variables:
  472. # - SUITES: the meson test suites to run, or
  473. # - SUITE_NAMES: all elements will be expanded to libinput-test-suite-$value
  474. # Set one or the other, not both.
  475. .test-suite-vm:
  476. extends:
  477. - .build-in-vng@template
  478. stage: test-suite
  479. variables:
  480. # remove the global --no-suite=hardware
  481. MESON_TEST_ARGS: ''
  482. LITEST_JOBS: 4
  483. before_script:
  484. - if ! [[ -z $SUITE_NAMES ]]; then SUITES=$(echo $SUITE_NAMES | sed 's/\([^ ]*\)/libinput-test-suite-\1/g'); fi
  485. - echo "Testing $SUITES"
  486. - export MESON_TEST_ARGS="$MESON_TEST_ARGS $SUITES"
  487. .fedora:43@test-suite-vm:
  488. extends:
  489. - .fdo.distribution-image@fedora
  490. - .test-suite-vm
  491. variables:
  492. FDO_DISTRIBUTION_VERSION: 43
  493. FDO_DISTRIBUTION_TAG: $FEDORA_TAG
  494. needs:
  495. - "fedora:43@container-prep"
  496. vm-touchpad:
  497. extends:
  498. - .fedora:43@test-suite-vm
  499. variables:
  500. SUITE_NAMES: 'touchpad'
  501. vm-touchpad-no-libwacom:
  502. extends:
  503. - vm-touchpad
  504. stage: test-suite-no-libwacom
  505. variables:
  506. MESON_ARGS: '-Dlibwacom=false'
  507. vm-touchpad_palm:
  508. extends:
  509. - .fedora:43@test-suite-vm
  510. variables:
  511. SUITE_NAMES: 'touchpad_palm'
  512. vm-touchpad_palm-no-libwacom:
  513. extends:
  514. - vm-touchpad_palm
  515. stage: test-suite-no-libwacom
  516. variables:
  517. MESON_ARGS: '-Dlibwacom=false'
  518. vm-touchpad_dwt:
  519. extends:
  520. - .fedora:43@test-suite-vm
  521. variables:
  522. SUITE_NAMES: 'touchpad_dwt'
  523. vm-touchpad_dwt-no-libwacom:
  524. extends:
  525. - vm-touchpad_dwt
  526. stage: test-suite-no-libwacom
  527. variables:
  528. MESON_ARGS: '-Dlibwacom=false'
  529. vm-tap:
  530. extends:
  531. - .fedora:43@test-suite-vm
  532. variables:
  533. SUITE_NAMES: 'touchpad_tap'
  534. vm-tap-no-libwacom:
  535. extends:
  536. - vm-tap
  537. stage: test-suite-no-libwacom
  538. variables:
  539. MESON_ARGS: '-Dlibwacom=false'
  540. vm-tap-drag:
  541. extends:
  542. - .fedora:43@test-suite-vm
  543. variables:
  544. SUITE_NAMES: 'touchpad_tap_drag'
  545. vm-tap-drag-no-libwacom:
  546. extends:
  547. - vm-tap-drag
  548. stage: test-suite-no-libwacom
  549. variables:
  550. MESON_ARGS: '-Dlibwacom=false'
  551. vm-tap-palm:
  552. extends:
  553. - .fedora:43@test-suite-vm
  554. variables:
  555. SUITE_NAMES: 'touchpad_tap_palm'
  556. vm-tap-palm-no-libwacom:
  557. extends:
  558. - vm-tap-palm
  559. stage: test-suite-no-libwacom
  560. variables:
  561. MESON_ARGS: '-Dlibwacom=false'
  562. vm-touchpad-buttons:
  563. extends:
  564. - .fedora:43@test-suite-vm
  565. variables:
  566. SUITE_NAMES: 'touchpad_buttons'
  567. vm-touchpad-buttons-no-libwacom:
  568. extends:
  569. - vm-touchpad-buttons
  570. stage: test-suite-no-libwacom
  571. variables:
  572. MESON_ARGS: '-Dlibwacom=false'
  573. vm-tablet:
  574. extends:
  575. - .fedora:43@test-suite-vm
  576. variables:
  577. SUITE_NAMES: 'tablet'
  578. vm-tablet-no-libwacom:
  579. extends:
  580. - vm-tablet
  581. stage: test-suite-no-libwacom
  582. variables:
  583. MESON_ARGS: '-Dlibwacom=false'
  584. vm-tablet_left_handed:
  585. extends:
  586. - .fedora:43@test-suite-vm
  587. variables:
  588. SUITE_NAMES: 'tablet_left_handed'
  589. vm-tablet_left_handed-no-libwacom:
  590. extends:
  591. - vm-tablet_left_handed
  592. stage: test-suite-no-libwacom
  593. variables:
  594. MESON_ARGS: '-Dlibwacom=false'
  595. vm-tablet_proximity_tip:
  596. extends:
  597. - .fedora:43@test-suite-vm
  598. variables:
  599. SUITE_NAMES: 'tablet_proximity tablet_tip'
  600. vm-tablet_proximity_tip-no-libwacom:
  601. extends:
  602. - vm-tablet_proximity_tip
  603. stage: test-suite-no-libwacom
  604. variables:
  605. MESON_ARGS: '-Dlibwacom=false'
  606. vm-tablet_eraser:
  607. extends:
  608. - .fedora:43@test-suite-vm
  609. variables:
  610. SUITE_NAMES: 'tablet_eraser'
  611. vm-tablet_eraser-no-libwacom:
  612. extends:
  613. - vm-tablet_eraser
  614. stage: test-suite-no-libwacom
  615. variables:
  616. MESON_ARGS: '-Dlibwacom=false'
  617. vm-gestures:
  618. extends:
  619. - .fedora:43@test-suite-vm
  620. variables:
  621. SUITE_NAMES: 'gestures'
  622. vm-gestures-no-libwacom:
  623. extends:
  624. - vm-gestures
  625. stage: test-suite-no-libwacom
  626. variables:
  627. MESON_ARGS: '-Dlibwacom=false'
  628. vm-backends:
  629. extends:
  630. - .fedora:43@test-suite-vm
  631. variables:
  632. SUITE_NAMES: 'path udev'
  633. vm-backends-no-libwacom:
  634. extends:
  635. - vm-backends
  636. stage: test-suite-no-libwacom
  637. variables:
  638. MESON_ARGS: '-Dlibwacom=false'
  639. vm-misc:
  640. extends:
  641. - .fedora:43@test-suite-vm
  642. variables:
  643. SUITE_NAMES: 'log misc quirks device'
  644. vm-misc-no-libwacom:
  645. extends:
  646. - vm-misc
  647. stage: test-suite-no-libwacom
  648. variables:
  649. MESON_ARGS: '-Dlibwacom=false'
  650. vm-other devices:
  651. extends:
  652. - .fedora:43@test-suite-vm
  653. variables:
  654. SUITE_NAMES: 'keyboard pad switch trackball trackpoint totem touch'
  655. vm-other devices-no-libwacom:
  656. extends:
  657. - vm-other devices
  658. stage: test-suite-no-libwacom
  659. variables:
  660. MESON_ARGS: '-Dlibwacom=false'
  661. vm-pointer:
  662. extends:
  663. - .fedora:43@test-suite-vm
  664. variables:
  665. SUITE_NAMES: 'pointer'
  666. vm-pointer-no-libwacom:
  667. extends:
  668. - vm-pointer
  669. stage: test-suite-no-libwacom
  670. variables:
  671. MESON_ARGS: '-Dlibwacom=false'
  672. vm-lua:
  673. extends:
  674. - .fedora:43@test-suite-vm
  675. variables:
  676. SUITE_NAMES: 'lua'
  677. vm-lua-no-libwacom:
  678. extends:
  679. - vm-lua
  680. stage: test-suite-no-libwacom
  681. variables:
  682. MESON_ARGS: '-Dlibwacom=false'
  683. vm-valgrind-touchpad:
  684. stage: valgrind
  685. extends:
  686. - vm-touchpad
  687. - .policy-retry-on-failure
  688. variables:
  689. MESON_TEST_ARGS: '--setup=valgrind'
  690. LITEST_JOBS: 0
  691. retry:
  692. max: 2
  693. rules:
  694. - if: $GITLAB_USER_LOGIN != "marge-bot"
  695. vm-valgrind-touchpad_palm:
  696. stage: valgrind
  697. extends:
  698. - vm-touchpad_palm
  699. - .policy-retry-on-failure
  700. variables:
  701. MESON_TEST_ARGS: '--setup=valgrind'
  702. LITEST_JOBS: 0
  703. retry:
  704. max: 2
  705. rules:
  706. - if: $GITLAB_USER_LOGIN != "marge-bot"
  707. vm-valgrind-touchpad_dwt:
  708. stage: valgrind
  709. extends:
  710. - vm-touchpad_dwt
  711. - .policy-retry-on-failure
  712. variables:
  713. MESON_TEST_ARGS: '--setup=valgrind'
  714. LITEST_JOBS: 0
  715. retry:
  716. max: 2
  717. rules:
  718. - if: $GITLAB_USER_LOGIN != "marge-bot"
  719. vm-valgrind-tap:
  720. stage: valgrind
  721. extends:
  722. - vm-tap
  723. - .policy-retry-on-failure
  724. variables:
  725. MESON_TEST_ARGS: '--setup=valgrind'
  726. LITEST_JOBS: 0
  727. retry:
  728. max: 2
  729. rules:
  730. - if: $GITLAB_USER_LOGIN != "marge-bot"
  731. vm-valgrind-tap-drag:
  732. stage: valgrind
  733. extends:
  734. - vm-tap-drag
  735. - .policy-retry-on-failure
  736. variables:
  737. MESON_TEST_ARGS: '--setup=valgrind'
  738. LITEST_JOBS: 0
  739. retry:
  740. max: 2
  741. rules:
  742. - if: $GITLAB_USER_LOGIN != "marge-bot"
  743. vm-valgrind-tap-palm:
  744. stage: valgrind
  745. extends:
  746. - vm-tap-palm
  747. - .policy-retry-on-failure
  748. variables:
  749. MESON_TEST_ARGS: '--setup=valgrind'
  750. LITEST_JOBS: 0
  751. retry:
  752. max: 2
  753. rules:
  754. - if: $GITLAB_USER_LOGIN != "marge-bot"
  755. vm-valgrind-touchpad-buttons:
  756. stage: valgrind
  757. extends:
  758. - vm-touchpad-buttons
  759. - .policy-retry-on-failure
  760. variables:
  761. MESON_TEST_ARGS: '--setup=valgrind'
  762. LITEST_JOBS: 0
  763. retry:
  764. max: 2
  765. rules:
  766. - if: $GITLAB_USER_LOGIN != "marge-bot"
  767. vm-valgrind-tablet:
  768. stage: valgrind
  769. extends:
  770. - vm-tablet
  771. - .policy-retry-on-failure
  772. variables:
  773. MESON_TEST_ARGS: '--setup=valgrind'
  774. LITEST_JOBS: 0
  775. retry:
  776. max: 2
  777. rules:
  778. - if: $GITLAB_USER_LOGIN != "marge-bot"
  779. vm-valgrind-tablet_left_handed:
  780. stage: valgrind
  781. extends:
  782. - vm-tablet_left_handed
  783. - .policy-retry-on-failure
  784. variables:
  785. MESON_TEST_ARGS: '--setup=valgrind'
  786. LITEST_JOBS: 0
  787. retry:
  788. max: 2
  789. rules:
  790. - if: $GITLAB_USER_LOGIN != "marge-bot"
  791. vm-valgrind-tablet_proximity_tip:
  792. stage: valgrind
  793. extends:
  794. - vm-tablet_proximity_tip
  795. - .policy-retry-on-failure
  796. variables:
  797. MESON_TEST_ARGS: '--setup=valgrind'
  798. LITEST_JOBS: 0
  799. retry:
  800. max: 2
  801. rules:
  802. - if: $GITLAB_USER_LOGIN != "marge-bot"
  803. vm-valgrind-tablet_eraser:
  804. stage: valgrind
  805. extends:
  806. - vm-tablet_eraser
  807. - .policy-retry-on-failure
  808. variables:
  809. MESON_TEST_ARGS: '--setup=valgrind'
  810. LITEST_JOBS: 0
  811. retry:
  812. max: 2
  813. rules:
  814. - if: $GITLAB_USER_LOGIN != "marge-bot"
  815. vm-valgrind-gestures:
  816. stage: valgrind
  817. extends:
  818. - vm-gestures
  819. - .policy-retry-on-failure
  820. variables:
  821. MESON_TEST_ARGS: '--setup=valgrind'
  822. LITEST_JOBS: 0
  823. retry:
  824. max: 2
  825. rules:
  826. - if: $GITLAB_USER_LOGIN != "marge-bot"
  827. vm-valgrind-backends:
  828. stage: valgrind
  829. extends:
  830. - vm-backends
  831. - .policy-retry-on-failure
  832. variables:
  833. MESON_TEST_ARGS: '--setup=valgrind'
  834. LITEST_JOBS: 0
  835. retry:
  836. max: 2
  837. rules:
  838. - if: $GITLAB_USER_LOGIN != "marge-bot"
  839. vm-valgrind-misc:
  840. stage: valgrind
  841. extends:
  842. - vm-misc
  843. - .policy-retry-on-failure
  844. variables:
  845. MESON_TEST_ARGS: '--setup=valgrind'
  846. LITEST_JOBS: 0
  847. retry:
  848. max: 2
  849. rules:
  850. - if: $GITLAB_USER_LOGIN != "marge-bot"
  851. vm-valgrind-other devices:
  852. stage: valgrind
  853. extends:
  854. - vm-other devices
  855. - .policy-retry-on-failure
  856. variables:
  857. MESON_TEST_ARGS: '--setup=valgrind'
  858. LITEST_JOBS: 0
  859. retry:
  860. max: 2
  861. rules:
  862. - if: $GITLAB_USER_LOGIN != "marge-bot"
  863. vm-valgrind-pointer:
  864. stage: valgrind
  865. extends:
  866. - vm-pointer
  867. - .policy-retry-on-failure
  868. variables:
  869. MESON_TEST_ARGS: '--setup=valgrind'
  870. LITEST_JOBS: 0
  871. retry:
  872. max: 2
  873. rules:
  874. - if: $GITLAB_USER_LOGIN != "marge-bot"
  875. vm-valgrind-lua:
  876. stage: valgrind
  877. extends:
  878. - vm-lua
  879. - .policy-retry-on-failure
  880. variables:
  881. MESON_TEST_ARGS: '--setup=valgrind'
  882. LITEST_JOBS: 0
  883. retry:
  884. max: 2
  885. rules:
  886. - if: $GITLAB_USER_LOGIN != "marge-bot"
  887. .fedora-build@template:
  888. extends:
  889. - .fdo.distribution-image@fedora
  890. - .build@template
  891. variables:
  892. FDO_DISTRIBUTION_VERSION: '43'
  893. FDO_DISTRIBUTION_TAG: $FEDORA_TAG
  894. needs:
  895. - "fedora:43@container-prep"
  896. default-build-release@fedora:43:
  897. stage: distro
  898. extends:
  899. - .fedora-build@template
  900. variables:
  901. MESON_ARGS: "-Dbuildtype=release"
  902. CFLAGS: "-Werror"
  903. clang-tidy@fedora:43:
  904. extends:
  905. - .fedora-build@template
  906. variables:
  907. NINJA_ARGS: ''
  908. MESON_TEST_ARGS: ''
  909. CC: 'clang'
  910. script:
  911. - .gitlab-ci/meson-build.sh
  912. - ninja -C "$MESON_BUILDDIR" clang-tidy
  913. # Below jobs are build option combinations. We only
  914. # run them on one image, they shouldn't fail on one distro
  915. # when they succeed on another.
  916. build-no-libwacom@fedora:43:
  917. extends:
  918. - .fedora-build@template
  919. variables:
  920. MESON_ARGS: "-Dlibwacom=false"
  921. build-no-libwacom-nodeps@fedora:43:
  922. extends:
  923. - .fedora-build@template
  924. variables:
  925. MESON_ARGS: "-Dlibwacom=false"
  926. before_script:
  927. - dnf remove -y libwacom libwacom-devel
  928. build-no-mtdev@fedora:43:
  929. extends:
  930. - .fedora-build@template
  931. variables:
  932. MESON_ARGS: "-Dmtdev=false"
  933. build-no-mtdev-nodeps@fedora:43:
  934. extends:
  935. - .fedora-build@template
  936. variables:
  937. MESON_ARGS: "-Dmtdev=false"
  938. before_script:
  939. - dnf remove -y mtdev mtdev-devel
  940. build-no-lua@fedora:43:
  941. extends:
  942. - .fedora-build@template
  943. variables:
  944. MESON_ARGS: "-Dlua-plugins=disabled"
  945. build-no-lua-nodeps@fedora:43:
  946. extends:
  947. - .fedora-build@template
  948. variables:
  949. MESON_ARGS: "-Dlua-plugins=disabled"
  950. before_script:
  951. - dnf remove -y lua lua-devel
  952. build-docs@fedora:43:
  953. extends:
  954. - .fedora-build@template
  955. variables:
  956. MESON_ARGS: "-Ddocumentation=true"
  957. build-no-docs-nodeps@fedora:43:
  958. extends:
  959. - .fedora-build@template
  960. variables:
  961. MESON_ARGS: "-Ddocumentation=false"
  962. before_script:
  963. - dnf remove -y doxygen graphviz
  964. build-no-debuggui@fedora:43:
  965. extends:
  966. - .fedora-build@template
  967. variables:
  968. MESON_ARGS: "-Ddebug-gui=false"
  969. build-no-debuggui-nodeps@fedora:43:
  970. extends:
  971. - .fedora-build@template
  972. variables:
  973. MESON_ARGS: "-Ddebug-gui=false"
  974. before_script:
  975. - dnf remove -y gtk3-devel gtk4-devel
  976. build-no-tests@fedora:43:
  977. extends:
  978. - .fedora-build@template
  979. variables:
  980. MESON_ARGS: "-Dtests=false"
  981. build-no-tests-nodeps@fedora:43:
  982. extends:
  983. - .fedora-build@template
  984. variables:
  985. MESON_ARGS: "-Dtests=false"
  986. before_script:
  987. - dnf remove -y check-devel
  988. valgrind@fedora:43:
  989. extends:
  990. - .fedora-build@template
  991. variables:
  992. MESON_TEST_ARGS: '--suite=valgrind --no-suite=hardware --setup=valgrind'
  993. # Python checks, only run on Fedora
  994. usr-bin-env-python@fedora:43:
  995. extends:
  996. - .fedora-build@template
  997. script:
  998. - |
  999. if git grep -l '^#!/usr/bin/python'; then
  1000. echo "Use '/usr/bin/env python3' in the above files";
  1001. /bin/false
  1002. fi
  1003. # A job to check we're actually running all test suites in the CI
  1004. check-test-suites:
  1005. extends:
  1006. - .fedora-build@template
  1007. script:
  1008. - meson setup builddir
  1009. - meson introspect builddir --test | jq -r '.[].name' | grep 'libinput-test-suite' | sort > meson-testsuites
  1010. - |
  1011. cat <<EOF > ci-testsuites ;
  1012. libinput-test-suite-touchpad
  1013. libinput-test-suite-touchpad_palm
  1014. libinput-test-suite-touchpad_dwt
  1015. libinput-test-suite-touchpad_tap
  1016. libinput-test-suite-touchpad_tap_drag
  1017. libinput-test-suite-touchpad_tap_palm
  1018. libinput-test-suite-touchpad_buttons
  1019. libinput-test-suite-tablet
  1020. libinput-test-suite-tablet_left_handed
  1021. libinput-test-suite-tablet_proximity
  1022. libinput-test-suite-tablet_tip
  1023. libinput-test-suite-tablet_eraser
  1024. libinput-test-suite-gestures
  1025. libinput-test-suite-path
  1026. libinput-test-suite-udev
  1027. libinput-test-suite-log
  1028. libinput-test-suite-misc
  1029. libinput-test-suite-quirks
  1030. libinput-test-suite-device
  1031. libinput-test-suite-keyboard
  1032. libinput-test-suite-pad
  1033. libinput-test-suite-switch
  1034. libinput-test-suite-trackball
  1035. libinput-test-suite-trackpoint
  1036. libinput-test-suite-totem
  1037. libinput-test-suite-touch
  1038. libinput-test-suite-pointer
  1039. libinput-test-suite-lua
  1040. EOF
  1041. - sort -o ci-testsuites ci-testsuites
  1042. - diff -u8 -w ci-testsuites meson-testsuites || (echo "Some test suites are not run in the CI" && false)
  1043. only:
  1044. changes:
  1045. - "meson.build"
  1046. - ".gitlab-ci.yml"
  1047. #
  1048. # coverity run
  1049. #
  1050. # This requires the COVERITY_SCAN_TOKEN. Log into scan.coverity.com and get
  1051. # the token from the respective project settings page.
  1052. # Schedule a pipeline and set a variable COVERITY_SCAN_TOKEN with the token value.
  1053. # https://gitlab.freedesktop.org/$CI_PROJECT_PATH/-/pipeline_schedules
  1054. # Email from coverity will be sent to the GITLAB_USER_EMAIL that scheduled the
  1055. # job.
  1056. #
  1057. # Coverity ratelimits submissions and the coverity tools download is about
  1058. # 700M, do not run this too often.
  1059. #
  1060. coverity:
  1061. extends:
  1062. - .fdo.distribution-image@debian
  1063. - .policy
  1064. - .fdo-runner-tags
  1065. stage: build
  1066. variables:
  1067. FDO_DISTRIBUTION_VERSION: 'stable'
  1068. FDO_DISTRIBUTION_TAG: $DEBIAN_TAG
  1069. # so git-describe works, or should work
  1070. GIT_DEPTH: 200
  1071. only:
  1072. variables:
  1073. - $COVERITY_SCAN_TOKEN
  1074. script:
  1075. - curl https://scan.coverity.com/download/linux64
  1076. -o /tmp/cov-analysis-linux64.tgz
  1077. --form project=$CI_PROJECT_NAME
  1078. --form token=$COVERITY_SCAN_TOKEN
  1079. - tar xfz /tmp/cov-analysis-linux64.tgz
  1080. # coverity has special build options in meson, make sure we enable those
  1081. - meson coverity-build -Ddocumentation=false -Dcoverity=true
  1082. - cov-analysis-linux64-*/bin/cov-build --dir cov-int ninja -C coverity-build
  1083. - tar cfz cov-int.tar.gz cov-int
  1084. - curl https://scan.coverity.com/builds?project=$CI_PROJECT_NAME
  1085. --form token=$COVERITY_SCAN_TOKEN --form email=$GITLAB_USER_EMAIL
  1086. --form file=@cov-int.tar.gz --form version="$(git describe --tags)"
  1087. --form description="$(git describe --tags) / $CI_COMMIT_TITLE / $CI_COMMIT_REF_NAME:$CI_PIPELINE_ID"
  1088. artifacts:
  1089. name: "coverity-submit-data"
  1090. when: always
  1091. expire_in: 1 week
  1092. paths:
  1093. - cov-int.tar.gz
  1094. needs:
  1095. - "debian:stable@container-prep"
  1096. #################################################################
  1097. # #
  1098. # distro stage #
  1099. # #
  1100. #################################################################
  1101. fedora:42@default-build:
  1102. stage: distro
  1103. extends:
  1104. - .build@template
  1105. - .fdo.distribution-image@fedora
  1106. variables:
  1107. FDO_DISTRIBUTION_VERSION: '42'
  1108. FDO_DISTRIBUTION_TAG: $FEDORA_TAG
  1109. needs:
  1110. - "fedora:42@container-prep"
  1111. fedora:43@default-build:
  1112. stage: distro
  1113. extends:
  1114. - .build@template
  1115. - .fdo.distribution-image@fedora
  1116. variables:
  1117. FDO_DISTRIBUTION_VERSION: '43'
  1118. FDO_DISTRIBUTION_TAG: $FEDORA_TAG
  1119. needs:
  1120. - "fedora:43@container-prep"
  1121. debian:stable@default-build:
  1122. stage: distro
  1123. extends:
  1124. - .build@template
  1125. - .fdo.distribution-image@debian
  1126. variables:
  1127. FDO_DISTRIBUTION_VERSION: 'stable'
  1128. FDO_DISTRIBUTION_TAG: $DEBIAN_TAG
  1129. needs:
  1130. - "debian:stable@container-prep"
  1131. ubuntu:25.10@default-build:
  1132. stage: distro
  1133. extends:
  1134. - .build@template
  1135. - .fdo.distribution-image@ubuntu
  1136. variables:
  1137. FDO_DISTRIBUTION_VERSION: '25.10'
  1138. FDO_DISTRIBUTION_TAG: $UBUNTU_TAG
  1139. needs:
  1140. - "ubuntu:25.10@container-prep"
  1141. arch:rolling@default-build:
  1142. stage: distro
  1143. extends:
  1144. - .build@template
  1145. - .fdo.distribution-image@arch
  1146. variables:
  1147. FDO_DISTRIBUTION_VERSION: 'rolling'
  1148. FDO_DISTRIBUTION_TAG: $ARCH_TAG
  1149. MESON_ARGS: '-Ddocumentation=false'
  1150. needs:
  1151. - "arch:rolling@container-prep"
  1152. alpine:latest@default-build:
  1153. stage: distro
  1154. extends:
  1155. - .build@template
  1156. - .fdo.distribution-image@alpine
  1157. variables:
  1158. FDO_DISTRIBUTION_VERSION: 'latest'
  1159. FDO_DISTRIBUTION_TAG: $ALPINE_TAG
  1160. MESON_ARGS: '-Ddocumentation=false' # alpine does not have python-recommonmark
  1161. MESON_TEST_ARGS: '' # litest-selftest fails on musl
  1162. needs:
  1163. - "alpine:latest@container-prep"
  1164. #################################################################
  1165. # #
  1166. # deploy stage #
  1167. # #
  1168. #################################################################
  1169. build rpm:
  1170. extends:
  1171. - .fdo.distribution-image@fedora
  1172. - .policy
  1173. - .fdo-runner-tags
  1174. stage: deploy
  1175. variables:
  1176. FDO_DISTRIBUTION_VERSION: '43'
  1177. FDO_DISTRIBUTION_TAG: $FEDORA_TAG
  1178. needs:
  1179. - "fedora:43@container-prep"
  1180. script:
  1181. - meson "$MESON_BUILDDIR"
  1182. - VERSION=$(meson introspect "$MESON_BUILDDIR" --projectinfo | jq -r .version)
  1183. - sed -e "s/@PIPELINEID@/${CI_PIPELINE_ID}/"
  1184. -e "s/@GITVERSION@/${CI_COMMIT_SHA}/"
  1185. -e "s/@VERSION@/${VERSION}/" .gitlab-ci/libinput.spec.in > libinput.spec
  1186. - git config --local user.name 'gitlab CI'
  1187. - git config --local user.email 'noreply@nowhere'
  1188. - git add libinput.spec && git commit -m 'Add libinput.spec for build testing' libinput.spec
  1189. - cd "$MESON_BUILDDIR"
  1190. - meson dist --no-test
  1191. - rpmbuild -ta meson-dist/libinput*.tar.xz
  1192. wayland-web:
  1193. stage: deploy
  1194. trigger: wayland/wayland.freedesktop.org
  1195. variables:
  1196. MESON_ARGS: '-Ddocumentation=true -Ddebug-gui=false -Dlibwacom=false -Dtests=false'
  1197. MESON_BUILDDIR: 'builddir'
  1198. rules:
  1199. - if: '$CI_PIPELINE_SOURCE == "schedule"'
  1200. when: never
  1201. - if: '$CI_COMMIT_BRANCH == "main" && $GITLAB_USER_LOGIN != "marge-bot" && $CI_PROJECT_PATH == $FDO_UPSTREAM_REPO'
  1202. when: on_success
  1203. - when: never