2018-02-18 15:59:29 +01:00
|
|
|
|
stages:
|
2019-11-26 13:17:42 +01:00
|
|
|
|
- style-check
|
2018-02-18 15:59:29 +01:00
|
|
|
|
- build
|
2018-04-27 17:04:52 +02:00
|
|
|
|
- coverage
|
ci: Add scan-build job in a new ‘analysis’ pipeline stage
Use Meson’s support for running scan-build (Clang’s static analyser)
against the build, so that we get static analysis of each pipeline. Add
it in a new pipeline stage, after code coverage, so that we don’t waste
resources on it unless the unit tests pass — a static analysis build
takes perhaps 10× as long as a normal GCC build.
https://mesonbuild.com/howtox.html#use-clang-static-analyzer
Currently, the static analysis results are uploaded as artifacts, but
the job will always succeed (regardless of whether there are any bugs
found in the analysis).
Currently, a large number of reports are outputted by the analyser,
which need to be fixed before we can gate the pipeline on it.
Furthermore, in order to get scan-build to exit with a non-zero status
if any bugs are found, we need to depend on Meson ≥ 0.49.0, which
contains the fix https://github.com/mesonbuild/meson/issues/4334,
allowing us to add the following to .gitlab-ci.yml:
```
variables:
# Exit with a non-zero status if any bugs are found
SCANBUILD: "scan-build --status-bugs"
```
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2018-12-28 00:32:39 +01:00
|
|
|
|
- analysis
|
2018-04-27 17:04:52 +02:00
|
|
|
|
- deploy
|
2022-10-31 02:46:31 +01:00
|
|
|
|
- report
|
2018-02-18 15:59:29 +01:00
|
|
|
|
|
2018-02-22 19:37:16 +01:00
|
|
|
|
cache:
|
|
|
|
|
paths:
|
|
|
|
|
- _ccache/
|
|
|
|
|
|
2018-05-26 20:17:15 +02:00
|
|
|
|
variables:
|
2024-06-14 14:59:01 +02:00
|
|
|
|
FEDORA_IMAGE: "registry.gitlab.gnome.org/gnome/glib/fedora:v39.5"
|
2022-11-24 13:10:07 +01:00
|
|
|
|
COVERITY_IMAGE: "registry.gitlab.gnome.org/gnome/glib/coverity:v7"
|
2024-06-14 14:59:01 +02:00
|
|
|
|
DEBIAN_IMAGE: "registry.gitlab.gnome.org/gnome/glib/debian-stable:v23"
|
2024-11-19 10:40:51 +01:00
|
|
|
|
DEBIAN_I386_IMAGE: "registry.gitlab.gnome.org/gnome/glib/debian-stable-i386:v3"
|
2024-06-14 14:59:01 +02:00
|
|
|
|
ALPINE_IMAGE: "registry.gitlab.gnome.org/gnome/glib/alpine:v7"
|
|
|
|
|
MINGW_IMAGE: "registry.gitlab.gnome.org/gnome/glib/mingw:v39.5"
|
2024-07-09 10:09:02 +02:00
|
|
|
|
GOBJECT_INTROSPECTION_TAG: "1.80.1"
|
2022-10-20 03:16:30 +02:00
|
|
|
|
MESON_TEST_TIMEOUT_MULTIPLIER: 4
|
2018-08-16 20:31:55 +02:00
|
|
|
|
G_MESSAGES_DEBUG: all
|
2022-05-05 20:24:30 +02:00
|
|
|
|
MESON_COMMON_OPTIONS: "--buildtype debug --wrap-mode=nodownload --fatal-meson-warnings"
|
2018-05-26 20:17:15 +02:00
|
|
|
|
|
2023-05-15 17:58:58 +02:00
|
|
|
|
# Default CI job setup; contrast with `.only-origin`.
|
|
|
|
|
#
|
2023-11-06 15:46:52 +01:00
|
|
|
|
# Don’t execute the pipeline when a merge request is merged into `origin/main`,
|
|
|
|
|
# as it will have already been tested
|
2019-11-28 12:38:25 +01:00
|
|
|
|
.only-default:
|
2019-11-27 12:06:32 +01:00
|
|
|
|
only:
|
|
|
|
|
- branches
|
|
|
|
|
except:
|
2023-05-15 17:58:58 +02:00
|
|
|
|
refs:
|
|
|
|
|
- tags
|
|
|
|
|
variables:
|
2023-11-06 15:46:52 +01:00
|
|
|
|
- $CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_PROJECT_NAMESPACE == "GNOME"
|
2019-11-27 12:06:32 +01:00
|
|
|
|
|
2023-12-12 15:59:02 +01:00
|
|
|
|
# As above, but does get executed on merge into `origin/main`. For use with
|
|
|
|
|
# updating code coverage results and docs builds.
|
|
|
|
|
.only-default-and-merges:
|
|
|
|
|
only:
|
|
|
|
|
- branches
|
|
|
|
|
except:
|
|
|
|
|
refs:
|
|
|
|
|
- tags
|
|
|
|
|
|
2022-02-20 13:44:45 +01:00
|
|
|
|
# Some jobs run on CI runners which don’t have good isolation between CI jobs,
|
|
|
|
|
# and don’t have much available resource. Limit those jobs to only ones on the
|
|
|
|
|
# origin repository (GNOME/glib), rather than people’s forks. Code in the origin
|
|
|
|
|
# repository can be trusted.
|
|
|
|
|
.only-origin:
|
|
|
|
|
only:
|
|
|
|
|
- branches@GNOME/glib
|
|
|
|
|
except:
|
|
|
|
|
- tags
|
|
|
|
|
|
2020-07-27 12:54:58 +02:00
|
|
|
|
# Some jobs take a long time and are unlikely to find failures (or will find
|
|
|
|
|
# failures which are not merge-blockers to fix), so they’re executed on a weekly
|
|
|
|
|
# schedule in order to save CI resources and speed up branch pipelines.
|
2022-02-20 13:30:19 +01:00
|
|
|
|
.only-schedules:
|
2020-07-27 12:54:58 +02:00
|
|
|
|
only:
|
|
|
|
|
- schedules
|
2022-02-20 13:30:19 +01:00
|
|
|
|
except:
|
|
|
|
|
- tags
|
|
|
|
|
|
2024-01-23 19:18:54 +01:00
|
|
|
|
# Some jobs take a long time and are unlikely to find failures (or will find
|
|
|
|
|
# failures which are not merge-blockers to fix), so they’re executed on a weekly
|
|
|
|
|
# schedule in order to save CI resources and speed up branch pipelines.
|
|
|
|
|
# But for specific merge requests, one may still want to run them, so make
|
|
|
|
|
# possible to run them manually.
|
|
|
|
|
.only-schedules-or-manual:
|
|
|
|
|
rules:
|
|
|
|
|
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
|
|
|
|
|
when: never
|
|
|
|
|
# As per rule before, the following rules will only apply to non MR events
|
|
|
|
|
- if: $CI_PIPELINE_SOURCE == "schedule"
|
|
|
|
|
when: always
|
|
|
|
|
- if: $CI_PIPELINE_SOURCE != "schedule"
|
|
|
|
|
when: manual
|
|
|
|
|
allow_failure: true
|
|
|
|
|
|
2024-01-25 17:07:46 +01:00
|
|
|
|
# Some jobs should be runnable only on schedules and when triggered by a branch
|
|
|
|
|
# in the origin repository, but without
|
|
|
|
|
.only-schedules-or-manual-in-default-branch:
|
|
|
|
|
rules:
|
|
|
|
|
- if: $CI_PROJECT_PATH != "GNOME/glib" || $CI_COMMIT_BRANCH != $CI_DEFAULT_BRANCH
|
|
|
|
|
when: never
|
|
|
|
|
# As per rule before, the following rules will apply only to GNOME/glib:main
|
|
|
|
|
- if: $CI_PIPELINE_SOURCE == "schedule"
|
|
|
|
|
when: always
|
|
|
|
|
- if: $CI_PIPELINE_SOURCE != "schedule"
|
|
|
|
|
when: manual
|
|
|
|
|
allow_failure: true
|
|
|
|
|
|
2024-01-25 16:45:25 +01:00
|
|
|
|
# Some jobs run on CI runners don’t have much available resource.
|
|
|
|
|
# Limit those jobs to only ones on the origin repository (GNOME/glib),
|
|
|
|
|
# rather than people’s forks or if ran manually.
|
|
|
|
|
.only-origin-or-manual:
|
|
|
|
|
rules:
|
|
|
|
|
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
|
|
|
|
|
when: never
|
|
|
|
|
- if: $CI_PIPELINE_SOURCE == "schedule"
|
|
|
|
|
when: never
|
|
|
|
|
- if: $CI_PROJECT_NAMESPACE == "GNOME"
|
|
|
|
|
when: always
|
|
|
|
|
- if: $CI_PROJECT_NAMESPACE != "GNOME"
|
|
|
|
|
when: manual
|
|
|
|
|
allow_failure: true
|
|
|
|
|
|
2024-07-09 10:09:02 +02:00
|
|
|
|
.build-gobject-introspection:
|
|
|
|
|
before_script:
|
2024-09-19 22:01:37 +02:00
|
|
|
|
# If the CI image doesn’t provide a new enough gobject-introspection
|
|
|
|
|
# package, build it ourselves.
|
|
|
|
|
# See https://gitlab.gnome.org/GNOME/glib/-/merge_requests/3746#note_2161354
|
|
|
|
|
- >
|
|
|
|
|
if ! pkg-config --atleast-version "${GOBJECT_INTROSPECTION_TAG}" gobject-introspection-1.0; then
|
|
|
|
|
mkdir -p gobject-introspection
|
|
|
|
|
git clone --branch $GOBJECT_INTROSPECTION_TAG https://gitlab.gnome.org/GNOME/gobject-introspection.git gobject-introspection
|
|
|
|
|
meson gobject-introspection gobject-introspection/build --prefix=/usr
|
|
|
|
|
sudo meson install -C gobject-introspection/build
|
|
|
|
|
fi
|
2024-07-09 10:09:02 +02:00
|
|
|
|
artifacts:
|
|
|
|
|
expire_in: 3 days
|
|
|
|
|
paths:
|
|
|
|
|
- gobject-introspection
|
|
|
|
|
|
2022-02-20 13:33:09 +01:00
|
|
|
|
.build-linux:
|
2022-02-20 13:30:19 +01:00
|
|
|
|
before_script:
|
|
|
|
|
- bash .gitlab-ci/show-execution-environment.sh
|
|
|
|
|
- cp -r $HOME/subprojects/* subprojects/
|
2020-07-27 12:54:58 +02:00
|
|
|
|
|
2023-07-05 09:03:09 +02:00
|
|
|
|
# FIXME: Work around https://gitlab.com/gitlab-org/gitlab/-/issues/391756
|
2024-02-07 14:46:11 +01:00
|
|
|
|
.with-git:
|
2023-07-05 09:03:09 +02:00
|
|
|
|
before_script:
|
|
|
|
|
- rm -rf subprojects/gvdb
|
2023-10-11 18:38:04 +02:00
|
|
|
|
- git config --global --add safe.directory "${PWD}"
|
2023-07-05 09:03:09 +02:00
|
|
|
|
- git submodule update --init --depth 1
|
|
|
|
|
variables:
|
|
|
|
|
GIT_SUBMODULE_STRATEGY: "none"
|
|
|
|
|
GIT_SUBMODULE_DEPTH: 1
|
|
|
|
|
|
|
|
|
|
style-check-advisory:
|
2024-02-07 14:46:11 +01:00
|
|
|
|
extends:
|
|
|
|
|
- .only-default
|
|
|
|
|
- .with-git
|
2020-11-10 09:53:00 +01:00
|
|
|
|
image: $DEBIAN_IMAGE
|
|
|
|
|
stage: style-check
|
|
|
|
|
allow_failure: true
|
|
|
|
|
script:
|
2024-02-07 14:00:45 +01:00
|
|
|
|
- failed=
|
|
|
|
|
- .gitlab-ci/run-style-check-diff.sh || failed=1
|
|
|
|
|
- .gitlab-ci/run-check-todos.sh || failed=1
|
|
|
|
|
- test -z "$failed"
|
2022-10-27 10:30:06 +02:00
|
|
|
|
|
|
|
|
|
sh-and-py-check:
|
2024-02-07 14:46:11 +01:00
|
|
|
|
extends:
|
|
|
|
|
- .only-default
|
|
|
|
|
- .with-git
|
2022-10-27 10:30:06 +02:00
|
|
|
|
image: $DEBIAN_IMAGE
|
|
|
|
|
stage: style-check
|
|
|
|
|
allow_failure: false
|
|
|
|
|
script:
|
2024-02-07 14:00:45 +01:00
|
|
|
|
- failed=
|
|
|
|
|
- tests/shellcheck.sh || failed=1
|
|
|
|
|
- tests/black.sh || failed=1
|
|
|
|
|
- tests/flake8.sh || failed=1
|
|
|
|
|
- test -z "$failed"
|
Incorporate some lint checks into `meson test`
This will make it easier and more obvious for developers to run them
locally: I'm sure I'm not the only developer who had assumed that
`.gitlab-ci/` is private to the CI environment and inappropriate (or
perhaps even destructive) to run on a developer/user system.
The lint checks are automatically skipped (with TAP SKIP syntax) if we
are not in a git checkout, or if git or the lint tool is missing. They
can also be disabled explicitly with `meson test --no-suite=lint`,
which downstream distributions will probably want to do.
By default, most lint checks are reported as an "expected failure"
(with TAP TODO syntax) rather than a hard failure, because they do not
indicate a functional problem with GLib and there is a tendency for
lint tools to introduce additional checks or become more strict over
time. Developers can override this by configuring with `-Dwerror=true`
(which also makes compiler warnings into fatal errors), or by running
the test suite like `LINT_WARNINGS_ARE_ERRORS=1 meson test --suite=lint`.
One exception to this is tests/check-missing-install-tag.py, which is
checking a functionally significant feature of our build system, and
seems like it is unlikely to have false positives: if that one fails,
it is reported as a hard failure.
run-style-check-diff.sh and run-check-todos.sh are not currently given
this treatment, because they require search-common-ancestor.sh, which
uses Gitlab-CI-specific information to find out which commits are in-scope
for checking.
Signed-off-by: Simon McVittie <smcv@collabora.com>
2024-02-07 13:16:22 +01:00
|
|
|
|
variables:
|
|
|
|
|
LINT_WARNINGS_ARE_ERRORS: '1'
|
2022-10-27 10:30:06 +02:00
|
|
|
|
only:
|
|
|
|
|
changes:
|
|
|
|
|
- "**/*.py"
|
|
|
|
|
- "**/*.sh"
|
2019-04-25 12:23:26 +02:00
|
|
|
|
|
2022-11-02 16:20:09 +01:00
|
|
|
|
style-check-mandatory:
|
2024-02-07 14:46:11 +01:00
|
|
|
|
extends:
|
|
|
|
|
- .only-default
|
|
|
|
|
- .with-git
|
2022-11-02 16:20:09 +01:00
|
|
|
|
image: $DEBIAN_IMAGE
|
|
|
|
|
stage: style-check
|
|
|
|
|
allow_failure: false
|
|
|
|
|
script:
|
Incorporate some lint checks into `meson test`
This will make it easier and more obvious for developers to run them
locally: I'm sure I'm not the only developer who had assumed that
`.gitlab-ci/` is private to the CI environment and inappropriate (or
perhaps even destructive) to run on a developer/user system.
The lint checks are automatically skipped (with TAP SKIP syntax) if we
are not in a git checkout, or if git or the lint tool is missing. They
can also be disabled explicitly with `meson test --no-suite=lint`,
which downstream distributions will probably want to do.
By default, most lint checks are reported as an "expected failure"
(with TAP TODO syntax) rather than a hard failure, because they do not
indicate a functional problem with GLib and there is a tendency for
lint tools to introduce additional checks or become more strict over
time. Developers can override this by configuring with `-Dwerror=true`
(which also makes compiler warnings into fatal errors), or by running
the test suite like `LINT_WARNINGS_ARE_ERRORS=1 meson test --suite=lint`.
One exception to this is tests/check-missing-install-tag.py, which is
checking a functionally significant feature of our build system, and
seems like it is unlikely to have false positives: if that one fails,
it is reported as a hard failure.
run-style-check-diff.sh and run-check-todos.sh are not currently given
this treatment, because they require search-common-ancestor.sh, which
uses Gitlab-CI-specific information to find out which commits are in-scope
for checking.
Signed-off-by: Simon McVittie <smcv@collabora.com>
2024-02-07 13:16:22 +01:00
|
|
|
|
- tests/reuse.sh
|
|
|
|
|
variables:
|
|
|
|
|
LINT_WARNINGS_ARE_ERRORS: '1'
|
2022-11-02 16:20:09 +01:00
|
|
|
|
|
2018-06-22 17:08:06 +02:00
|
|
|
|
fedora-x86_64:
|
2022-02-20 13:36:40 +01:00
|
|
|
|
extends:
|
2024-07-09 10:09:02 +02:00
|
|
|
|
- .build-gobject-introspection
|
2022-02-20 13:36:40 +01:00
|
|
|
|
- .build-linux
|
2023-12-12 15:59:02 +01:00
|
|
|
|
- .only-default-and-merges
|
2024-02-07 14:46:11 +01:00
|
|
|
|
- .with-git
|
2020-01-13 18:45:00 +01:00
|
|
|
|
image: $FEDORA_IMAGE
|
2018-02-18 15:59:29 +01:00
|
|
|
|
stage: build
|
2020-07-27 13:00:57 +02:00
|
|
|
|
needs: []
|
2018-04-27 17:04:52 +02:00
|
|
|
|
variables:
|
2024-07-24 11:34:44 +02:00
|
|
|
|
CFLAGS: "--coverage -ftest-coverage -fprofile-arcs -fprofile-update=atomic"
|
|
|
|
|
CXXFLAGS: "--coverage -ftest-coverage -fprofile-arcs -fprofile-update=atomic"
|
2024-02-13 11:23:12 +01:00
|
|
|
|
before_script:
|
|
|
|
|
- !reference [".build-linux", "before_script"]
|
|
|
|
|
- !reference [".with-git", "before_script"]
|
2024-07-09 10:09:02 +02:00
|
|
|
|
- !reference [".build-gobject-introspection", "before_script"]
|
2018-02-18 15:59:29 +01:00
|
|
|
|
script:
|
2023-08-14 13:24:28 +02:00
|
|
|
|
- meson setup ${MESON_COMMON_OPTIONS}
|
2018-09-26 16:56:10 +02:00
|
|
|
|
--werror
|
|
|
|
|
--default-library=both
|
|
|
|
|
--prefix=$HOME/glib-installed
|
2021-02-24 14:16:57 +01:00
|
|
|
|
--localstatedir=/var
|
2018-09-26 16:56:10 +02:00
|
|
|
|
--libdir=lib
|
2024-05-15 22:48:44 +02:00
|
|
|
|
-Dsystemtap=enabled
|
2024-05-15 22:09:46 +02:00
|
|
|
|
-Ddtrace=enabled
|
2018-09-26 16:56:10 +02:00
|
|
|
|
-Dinstalled_tests=true
|
2023-11-29 11:26:37 +01:00
|
|
|
|
-Ddocumentation=true
|
2023-11-28 19:00:35 +01:00
|
|
|
|
-Dintrospection=enabled
|
2023-12-20 15:04:11 +01:00
|
|
|
|
-Dman-pages=enabled
|
2018-09-26 16:56:10 +02:00
|
|
|
|
_build
|
2023-08-16 13:57:47 +02:00
|
|
|
|
- meson compile -C _build
|
2018-04-27 17:04:52 +02:00
|
|
|
|
- mkdir -p _coverage
|
2024-05-24 18:00:55 +02:00
|
|
|
|
- lcov --config-file .lcovrc --directory _build --capture --initial
|
|
|
|
|
--output-file "_coverage/${CI_JOB_NAME}-baseline.lcov"
|
2019-04-05 21:53:11 +02:00
|
|
|
|
- .gitlab-ci/run-tests.sh
|
2024-05-24 18:00:55 +02:00
|
|
|
|
- lcov --config-file .lcovrc --directory _build --capture
|
|
|
|
|
--output-file "_coverage/${CI_JOB_NAME}.lcov"
|
2023-12-12 15:57:57 +01:00
|
|
|
|
# Copy the built documentation to an artifact directory. The build for docs.gtk.org
|
|
|
|
|
# can then pull it from there — see https://gitlab.gnome.org/GNOME/gtk/-/blob/docs-gtk-org/README.md
|
|
|
|
|
- mkdir -p _reference/
|
2024-03-13 17:46:06 +01:00
|
|
|
|
- mv _build/docs/reference/glib/glib-2.0/ _reference/glib/
|
|
|
|
|
- mv _build/docs/reference/glib/glib-unix-2.0/ _reference/glib-unix/
|
|
|
|
|
- mv _build/docs/reference/gmodule/gmodule-2.0/ _reference/gmodule/
|
|
|
|
|
- mv _build/docs/reference/gobject/gobject-2.0/ _reference/gobject/
|
|
|
|
|
- mv _build/docs/reference/gio/gio-2.0/ _reference/gio/
|
|
|
|
|
- mv _build/docs/reference/gio/gio-unix-2.0/ _reference/gio-unix/
|
|
|
|
|
- mv _build/docs/reference/girepository/girepository-2.0/ _reference/girepository/
|
2018-02-18 15:59:29 +01:00
|
|
|
|
artifacts:
|
2019-04-05 21:53:11 +02:00
|
|
|
|
reports:
|
2022-10-19 20:08:15 +02:00
|
|
|
|
junit:
|
|
|
|
|
- _build/meson-logs/testlog.junit.xml
|
|
|
|
|
- _build/meson-logs/testlog-*.junit.xml
|
2018-05-29 11:54:29 +02:00
|
|
|
|
name: "glib-${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}"
|
2018-05-29 11:53:41 +02:00
|
|
|
|
when: always
|
2022-04-06 13:54:54 +02:00
|
|
|
|
expire_in: 1 week
|
2018-02-18 15:59:29 +01:00
|
|
|
|
paths:
|
2018-08-29 12:16:58 +02:00
|
|
|
|
- "_build/config.h"
|
|
|
|
|
- "_build/glib/glibconfig.h"
|
2018-06-05 20:01:53 +02:00
|
|
|
|
- "_build/meson-logs"
|
|
|
|
|
- "_coverage"
|
2023-12-12 15:57:57 +01:00
|
|
|
|
- "_reference"
|
2018-02-18 15:59:29 +01:00
|
|
|
|
|
2024-10-18 13:14:44 +02:00
|
|
|
|
.build-debian:
|
2022-02-20 13:36:40 +01:00
|
|
|
|
extends:
|
|
|
|
|
- .build-linux
|
2024-02-07 14:46:11 +01:00
|
|
|
|
- .with-git
|
2019-04-30 15:01:56 +02:00
|
|
|
|
stage: build
|
2020-07-27 13:00:57 +02:00
|
|
|
|
needs: []
|
2024-02-13 11:23:12 +01:00
|
|
|
|
before_script:
|
|
|
|
|
- !reference [".build-linux", "before_script"]
|
|
|
|
|
- !reference [".with-git", "before_script"]
|
2019-04-30 15:01:56 +02:00
|
|
|
|
script:
|
2023-08-14 13:24:28 +02:00
|
|
|
|
- meson setup ${MESON_COMMON_OPTIONS}
|
2019-04-30 15:01:56 +02:00
|
|
|
|
--werror
|
|
|
|
|
--default-library=both
|
|
|
|
|
--prefix=$HOME/glib-installed
|
2021-02-24 14:16:57 +01:00
|
|
|
|
--localstatedir=/var
|
2019-04-30 15:01:56 +02:00
|
|
|
|
--libdir=lib
|
2024-05-15 22:48:44 +02:00
|
|
|
|
-Dsystemtap=enabled
|
2024-05-15 22:09:46 +02:00
|
|
|
|
-Ddtrace=enabled
|
2019-04-30 15:01:56 +02:00
|
|
|
|
_build
|
2023-08-16 13:57:47 +02:00
|
|
|
|
- meson compile -C _build
|
2019-04-30 15:01:56 +02:00
|
|
|
|
- .gitlab-ci/run-tests.sh
|
|
|
|
|
artifacts:
|
|
|
|
|
reports:
|
2022-10-19 20:08:15 +02:00
|
|
|
|
junit:
|
|
|
|
|
- _build/meson-logs/testlog.junit.xml
|
|
|
|
|
- _build/meson-logs/testlog-*.junit.xml
|
2019-04-30 15:01:56 +02:00
|
|
|
|
name: "glib-${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}"
|
|
|
|
|
when: always
|
2022-04-06 13:54:54 +02:00
|
|
|
|
expire_in: 1 week
|
2019-04-30 15:01:56 +02:00
|
|
|
|
paths:
|
|
|
|
|
- "_build/config.h"
|
|
|
|
|
- "_build/glib/glibconfig.h"
|
|
|
|
|
- "_build/meson-logs"
|
|
|
|
|
|
2024-10-18 13:14:44 +02:00
|
|
|
|
debian-stable-x86_64:
|
|
|
|
|
extends:
|
|
|
|
|
- .build-debian
|
|
|
|
|
# We don't need to run this job too often, because the combination of
|
|
|
|
|
# fedora-x86_64 and debian-stable-i386 should cover more or less
|
|
|
|
|
# everything that this job does
|
|
|
|
|
- .only-schedules-or-manual
|
|
|
|
|
image: $DEBIAN_IMAGE
|
|
|
|
|
|
|
|
|
|
debian-stable-i386:
|
|
|
|
|
extends:
|
|
|
|
|
- .build-debian
|
|
|
|
|
- .only-default
|
|
|
|
|
image: $DEBIAN_I386_IMAGE
|
|
|
|
|
|
2023-10-19 01:33:04 +02:00
|
|
|
|
hurd-i386:
|
|
|
|
|
extends:
|
2024-01-23 19:18:54 +01:00
|
|
|
|
- .only-schedules-or-manual
|
2024-02-07 14:46:11 +01:00
|
|
|
|
- .with-git
|
2023-10-19 01:33:04 +02:00
|
|
|
|
stage: build
|
|
|
|
|
tags:
|
|
|
|
|
- hurd
|
|
|
|
|
needs: []
|
|
|
|
|
script:
|
2024-09-05 13:31:09 +02:00
|
|
|
|
- meson setup ${MESON_COMMON_OPTIONS}
|
2023-10-19 01:33:04 +02:00
|
|
|
|
--werror
|
|
|
|
|
--default-library=both
|
|
|
|
|
--prefix=$HOME/glib-installed
|
|
|
|
|
--localstatedir=/var
|
|
|
|
|
--libdir=lib
|
|
|
|
|
_build
|
|
|
|
|
- meson compile -C _build
|
|
|
|
|
- .gitlab-ci/run-tests.sh
|
|
|
|
|
artifacts:
|
|
|
|
|
reports:
|
|
|
|
|
junit:
|
|
|
|
|
- _build/meson-logs/testlog.junit.xml
|
|
|
|
|
- _build/meson-logs/testlog-*.junit.xml
|
|
|
|
|
name: "glib-${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}"
|
|
|
|
|
when: always
|
|
|
|
|
expire_in: 1 week
|
|
|
|
|
paths:
|
|
|
|
|
- "_build/config.h"
|
|
|
|
|
- "_build/glib/glibconfig.h"
|
|
|
|
|
- "_build/meson-logs"
|
|
|
|
|
|
2023-11-28 12:51:30 +01:00
|
|
|
|
muslc-alpine-x86_64:
|
2023-08-10 20:10:01 +02:00
|
|
|
|
extends:
|
|
|
|
|
- .build-linux
|
2024-01-23 19:18:54 +01:00
|
|
|
|
- .only-schedules-or-manual
|
2024-02-07 14:46:11 +01:00
|
|
|
|
- .with-git
|
2023-08-10 20:10:01 +02:00
|
|
|
|
image: $ALPINE_IMAGE
|
|
|
|
|
stage: build
|
|
|
|
|
needs: []
|
2024-02-13 11:23:12 +01:00
|
|
|
|
before_script:
|
|
|
|
|
- !reference [".build-linux", "before_script"]
|
|
|
|
|
- !reference [".with-git", "before_script"]
|
2023-08-10 20:10:01 +02:00
|
|
|
|
script:
|
|
|
|
|
- meson setup ${MESON_COMMON_OPTIONS}
|
|
|
|
|
--werror
|
|
|
|
|
--default-library=both
|
|
|
|
|
--prefix=$HOME/glib-installed
|
|
|
|
|
--localstatedir=/var
|
|
|
|
|
--libdir=lib
|
|
|
|
|
_build
|
|
|
|
|
- meson compile -C _build
|
|
|
|
|
- .gitlab-ci/run-tests.sh
|
|
|
|
|
artifacts:
|
|
|
|
|
reports:
|
|
|
|
|
junit:
|
|
|
|
|
- _build/meson-logs/testlog.junit.xml
|
|
|
|
|
- _build/meson-logs/testlog-*.junit.xml
|
|
|
|
|
name: "glib-${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}"
|
|
|
|
|
when: always
|
|
|
|
|
expire_in: 1 week
|
|
|
|
|
paths:
|
|
|
|
|
- "_build/config.h"
|
|
|
|
|
- "_build/glib/glibconfig.h"
|
|
|
|
|
- "_build/meson-logs"
|
|
|
|
|
|
2019-11-15 11:59:00 +01:00
|
|
|
|
installed-tests:
|
2022-02-20 13:30:19 +01:00
|
|
|
|
extends:
|
2022-02-20 13:33:09 +01:00
|
|
|
|
- .build-linux
|
2024-01-23 19:18:54 +01:00
|
|
|
|
- .only-schedules-or-manual
|
2020-01-13 18:45:00 +01:00
|
|
|
|
image: $FEDORA_IMAGE
|
2019-11-15 11:59:00 +01:00
|
|
|
|
stage: build
|
2020-07-27 13:00:57 +02:00
|
|
|
|
needs: []
|
2019-11-15 11:59:00 +01:00
|
|
|
|
script:
|
|
|
|
|
# dtrace is disabled because it breaks the static-link.py test
|
2023-08-14 13:24:28 +02:00
|
|
|
|
- meson setup ${MESON_COMMON_OPTIONS}
|
2019-11-15 11:59:00 +01:00
|
|
|
|
--werror
|
|
|
|
|
--prefix=/usr --libdir=/usr/lib64
|
|
|
|
|
-Dinstalled_tests=true
|
|
|
|
|
-Ddefault_library=both
|
2024-05-15 22:09:46 +02:00
|
|
|
|
-Ddtrace=disabled
|
2019-11-15 11:59:00 +01:00
|
|
|
|
_build
|
2023-08-16 13:57:47 +02:00
|
|
|
|
- meson compile -C _build
|
|
|
|
|
- sudo meson install -C _build
|
2019-01-17 07:38:20 +01:00
|
|
|
|
# Remove old headers, possibly present in current installation
|
|
|
|
|
- sudo rm -f /usr/include/glib-2.0/glib/gurifuncs.h
|
2019-12-11 17:52:24 +01:00
|
|
|
|
- sudo chown -R `id -un`:`id -gn` _build/
|
2019-12-04 14:33:47 +01:00
|
|
|
|
# Work-around https://gitlab.gnome.org/GNOME/gnome-desktop-testing/merge_requests/2
|
|
|
|
|
- mkdir -p _build/installed-tests-report/logs/
|
2019-11-28 14:30:23 +01:00
|
|
|
|
- GLIB_TEST_COMPILATION=1 gnome-desktop-testing-runner
|
2019-11-15 11:59:00 +01:00
|
|
|
|
--report-directory=_build/installed-tests-report/failed/
|
2019-11-28 15:21:33 +01:00
|
|
|
|
--log-directory=_build/installed-tests-report/logs/
|
2020-02-24 12:06:00 +01:00
|
|
|
|
--parallel=0
|
2019-11-15 11:59:00 +01:00
|
|
|
|
glib
|
|
|
|
|
artifacts:
|
|
|
|
|
name: "glib-${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}"
|
|
|
|
|
when: always
|
2022-04-06 13:54:54 +02:00
|
|
|
|
expire_in: 1 week
|
2019-11-15 11:59:00 +01:00
|
|
|
|
paths:
|
|
|
|
|
- "_build/config.h"
|
|
|
|
|
- "_build/glib/glibconfig.h"
|
|
|
|
|
- "_build/meson-logs"
|
|
|
|
|
- "_build/installed-tests-report/"
|
|
|
|
|
|
2019-03-05 12:02:24 +01:00
|
|
|
|
G_DISABLE_ASSERT:
|
2022-02-20 13:30:19 +01:00
|
|
|
|
extends:
|
2022-02-20 13:33:09 +01:00
|
|
|
|
- .build-linux
|
2024-01-23 19:18:54 +01:00
|
|
|
|
- .only-schedules-or-manual
|
2024-02-07 14:46:11 +01:00
|
|
|
|
- .with-git
|
2024-07-09 10:09:02 +02:00
|
|
|
|
- .build-gobject-introspection
|
2020-01-13 18:45:00 +01:00
|
|
|
|
image: $FEDORA_IMAGE
|
2019-03-05 12:02:24 +01:00
|
|
|
|
stage: build
|
2020-07-27 13:00:57 +02:00
|
|
|
|
needs: []
|
2024-01-18 17:55:40 +01:00
|
|
|
|
variables:
|
|
|
|
|
MESON_TEST_TIMEOUT_MULTIPLIER: 15
|
2024-02-13 11:23:12 +01:00
|
|
|
|
before_script:
|
|
|
|
|
- !reference [".build-linux", "before_script"]
|
|
|
|
|
- !reference [".with-git", "before_script"]
|
2024-07-09 10:09:02 +02:00
|
|
|
|
- !reference [".build-gobject-introspection", "before_script"]
|
2019-03-05 12:02:24 +01:00
|
|
|
|
script:
|
2023-08-14 13:24:28 +02:00
|
|
|
|
- meson setup ${MESON_COMMON_OPTIONS}
|
2019-03-05 12:02:24 +01:00
|
|
|
|
--werror
|
2024-05-15 22:48:44 +02:00
|
|
|
|
-Dsystemtap=enabled
|
2024-05-15 22:09:46 +02:00
|
|
|
|
-Ddtrace=enabled
|
2019-03-05 12:02:24 +01:00
|
|
|
|
-Dinstalled_tests=true
|
2020-04-08 21:14:31 +02:00
|
|
|
|
-Dglib_assert=false
|
2023-11-28 19:00:35 +01:00
|
|
|
|
-Dintrospection=enabled
|
2019-03-05 12:02:24 +01:00
|
|
|
|
_build
|
2023-08-16 13:57:47 +02:00
|
|
|
|
- meson compile -C _build
|
2024-01-18 17:55:40 +01:00
|
|
|
|
# Also take the opportunity to run the thorough tests (which are slow)
|
|
|
|
|
- bash -x ./.gitlab-ci/run-tests.sh --setup thorough
|
2019-03-05 12:02:24 +01:00
|
|
|
|
artifacts:
|
2019-04-05 21:53:11 +02:00
|
|
|
|
reports:
|
2022-10-19 20:08:15 +02:00
|
|
|
|
junit:
|
|
|
|
|
- _build/meson-logs/testlog.junit.xml
|
|
|
|
|
- _build/meson-logs/testlog-*.junit.xml
|
2019-03-05 12:02:24 +01:00
|
|
|
|
name: "glib-${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}"
|
|
|
|
|
when: always
|
2022-04-06 13:54:54 +02:00
|
|
|
|
expire_in: 1 week
|
2019-03-05 12:02:24 +01:00
|
|
|
|
paths:
|
|
|
|
|
- "_build/config.h"
|
|
|
|
|
- "_build/glib/glibconfig.h"
|
|
|
|
|
- "_build/meson-logs"
|
|
|
|
|
|
2018-06-26 18:23:09 +02:00
|
|
|
|
valgrind:
|
2022-02-20 13:30:19 +01:00
|
|
|
|
extends:
|
2022-02-20 13:33:09 +01:00
|
|
|
|
- .build-linux
|
2024-01-23 19:18:54 +01:00
|
|
|
|
- .only-schedules-or-manual
|
2024-02-07 14:46:11 +01:00
|
|
|
|
- .with-git
|
2024-07-09 10:09:02 +02:00
|
|
|
|
- .build-gobject-introspection
|
2020-01-13 18:45:00 +01:00
|
|
|
|
image: $FEDORA_IMAGE
|
2018-06-26 18:23:09 +02:00
|
|
|
|
stage: analysis
|
2020-07-27 13:00:57 +02:00
|
|
|
|
needs: []
|
2018-06-26 18:23:09 +02:00
|
|
|
|
variables:
|
2022-09-02 20:41:40 +02:00
|
|
|
|
MESON_TEST_TIMEOUT_MULTIPLIER: 15
|
2024-02-13 11:23:12 +01:00
|
|
|
|
before_script:
|
|
|
|
|
- !reference [".build-linux", "before_script"]
|
|
|
|
|
- !reference [".with-git", "before_script"]
|
2024-07-09 10:09:02 +02:00
|
|
|
|
- !reference [".build-gobject-introspection", "before_script"]
|
2018-06-26 18:23:09 +02:00
|
|
|
|
script:
|
2023-08-14 13:24:28 +02:00
|
|
|
|
- meson setup ${MESON_COMMON_OPTIONS}
|
2018-06-26 18:23:09 +02:00
|
|
|
|
--werror
|
2024-05-15 22:48:44 +02:00
|
|
|
|
-Dsystemtap=enabled
|
2024-05-15 22:09:46 +02:00
|
|
|
|
-Ddtrace=enabled
|
2018-06-26 18:23:09 +02:00
|
|
|
|
-Dinstalled_tests=true
|
2023-11-28 19:00:35 +01:00
|
|
|
|
-Dintrospection=enabled
|
2018-06-26 18:23:09 +02:00
|
|
|
|
_build
|
2023-08-16 13:57:47 +02:00
|
|
|
|
- meson compile -C _build
|
2022-06-01 15:48:34 +02:00
|
|
|
|
# Valgrind doesn’t work when the soft FD limit is set too high
|
|
|
|
|
# See https://gitlab.gnome.org/GNOME/glib/-/merge_requests/2710
|
|
|
|
|
- ulimit -Sn 1024
|
2018-06-26 18:23:09 +02:00
|
|
|
|
- bash -x ./.gitlab-ci/run-tests.sh
|
2022-06-16 12:01:04 +02:00
|
|
|
|
--setup valgrind
|
2018-06-26 18:23:09 +02:00
|
|
|
|
--no-suite slow
|
|
|
|
|
artifacts:
|
|
|
|
|
reports:
|
2022-05-25 15:27:08 +02:00
|
|
|
|
junit: "_build/meson-logs/testlog-valgrind.junit.xml"
|
2018-06-26 18:23:09 +02:00
|
|
|
|
name: "glib-${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}"
|
|
|
|
|
when: always
|
2022-04-06 13:54:54 +02:00
|
|
|
|
expire_in: 1 week
|
2018-06-26 18:23:09 +02:00
|
|
|
|
paths:
|
|
|
|
|
- "_build/config.h"
|
|
|
|
|
- "_build/glib/glibconfig.h"
|
|
|
|
|
- "_build/meson-logs"
|
|
|
|
|
|
2022-02-20 13:34:20 +01:00
|
|
|
|
.cross-build-linux:
|
2022-02-20 13:33:09 +01:00
|
|
|
|
extends: .build-linux
|
2018-05-20 06:14:56 +02:00
|
|
|
|
stage: build
|
2020-07-27 13:00:57 +02:00
|
|
|
|
needs: []
|
2018-05-20 06:14:56 +02:00
|
|
|
|
artifacts:
|
2018-06-05 20:01:53 +02:00
|
|
|
|
name: "glib-${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}"
|
|
|
|
|
when: always
|
2022-04-06 13:54:54 +02:00
|
|
|
|
expire_in: 1 week
|
2018-05-20 06:14:56 +02:00
|
|
|
|
paths:
|
2018-06-05 20:01:53 +02:00
|
|
|
|
- "_build/meson-logs"
|
2018-05-20 06:14:56 +02:00
|
|
|
|
|
2022-04-26 16:50:36 +02:00
|
|
|
|
cross-android_arm64:
|
2022-02-20 13:36:40 +01:00
|
|
|
|
extends:
|
|
|
|
|
- .cross-build-linux
|
|
|
|
|
- .only-default
|
2022-04-26 16:50:36 +02:00
|
|
|
|
image: $FEDORA_IMAGE
|
2018-06-26 19:18:29 +02:00
|
|
|
|
script:
|
|
|
|
|
# FIXME: add --werror
|
2023-08-14 13:24:28 +02:00
|
|
|
|
- meson setup ${MESON_COMMON_OPTIONS} --cross-file=.gitlab-ci/cross_file_android_arm64_31.txt _build
|
2023-08-16 13:57:47 +02:00
|
|
|
|
- meson compile -C _build
|
2018-06-26 19:18:29 +02:00
|
|
|
|
|
2018-06-22 17:08:06 +02:00
|
|
|
|
cross-mingw64:
|
2022-02-20 13:36:40 +01:00
|
|
|
|
extends:
|
|
|
|
|
- .cross-build-linux
|
|
|
|
|
- .only-default
|
2020-01-13 18:45:00 +01:00
|
|
|
|
image: $MINGW_IMAGE
|
2023-02-15 19:23:04 +01:00
|
|
|
|
variables:
|
|
|
|
|
PYTHONUTF8: "1"
|
2018-05-20 21:17:48 +02:00
|
|
|
|
script:
|
|
|
|
|
# FIXME: Add --werror
|
2023-08-14 13:24:28 +02:00
|
|
|
|
- meson setup ${MESON_COMMON_OPTIONS} --cross-file=/opt/cross_file_mingw64.txt _build
|
2023-08-16 13:57:47 +02:00
|
|
|
|
- meson compile -C _build
|
2021-09-20 14:13:36 +02:00
|
|
|
|
artifacts:
|
|
|
|
|
reports:
|
2022-10-19 20:08:15 +02:00
|
|
|
|
junit:
|
|
|
|
|
- _build/meson-logs/testlog.junit.xml
|
|
|
|
|
- _build/meson-logs/testlog-*.junit.xml
|
2021-09-20 14:13:36 +02:00
|
|
|
|
name: "glib-${env:CI_JOB_NAME}-${env:CI_COMMIT_REF_NAME}"
|
|
|
|
|
when: always
|
2022-04-06 13:54:54 +02:00
|
|
|
|
expire_in: 1 week
|
2021-09-20 14:13:36 +02:00
|
|
|
|
paths:
|
|
|
|
|
- _build/meson-logs
|
|
|
|
|
- _build/glib/libglib-2.0-0.dll
|
|
|
|
|
- _build/gio/libgio-2.0-0.dll
|
|
|
|
|
- _build/gmodule/libgmodule-2.0-0.dll
|
|
|
|
|
- _build/gthread/libgthread-2.0-0.dll
|
|
|
|
|
- _build/gobject/libgobject-2.0-0.dll
|
2018-05-20 21:17:48 +02:00
|
|
|
|
|
2024-05-15 12:31:20 +02:00
|
|
|
|
# A note about msys2: it’s a rolling release distribution, running Windows under
|
|
|
|
|
# Docker isn’t really supported, and the win32-ps CI runner is shared. All that
|
|
|
|
|
# adds up to mean that we have to run CI against the latest msys2 packages, and
|
2024-08-14 13:32:54 +02:00
|
|
|
|
# that this occasionally causes deterministic build failures in GLib due to
|
|
|
|
|
# changes in msys2.
|
2024-05-15 12:31:20 +02:00
|
|
|
|
# In order to avoid that pre-empting other GLib development, the policy in such
|
|
|
|
|
# cases is to:
|
|
|
|
|
# 1. Immediately and without hesitation make the msys2-* CI jobs non-fatal
|
|
|
|
|
# (add `allow_failure: true` below).
|
|
|
|
|
# 2. File an issue about fixing the GLib msys2 build and re-enabling failure
|
|
|
|
|
# on the CI job
|
|
|
|
|
# 3. Set the milestone for that issue to be the next GLib release, so it’s done
|
|
|
|
|
# in a timely manner; and tag it as ~win32 so the GLib Windows maintainers
|
|
|
|
|
# are notified and can work on it.
|
|
|
|
|
# 4. Rebase any pending broken MRs on top of the commit which makes the CI job
|
|
|
|
|
# non-fatal, so that development on `main` is unblocked.
|
2024-08-14 13:32:54 +02:00
|
|
|
|
#
|
|
|
|
|
# This policy doesn’t apply to intermittent flaky test failures, only to
|
|
|
|
|
# consistent build failures caused by changed dependencies or build environment.
|
2018-02-22 19:37:16 +01:00
|
|
|
|
msys2-mingw32:
|
2024-02-06 17:34:36 +01:00
|
|
|
|
extends: .only-default-and-merges
|
2018-02-22 19:37:16 +01:00
|
|
|
|
stage: build
|
|
|
|
|
tags:
|
2020-04-29 08:44:43 +02:00
|
|
|
|
- win32-ps
|
2020-07-27 13:00:57 +02:00
|
|
|
|
needs: []
|
2018-02-22 19:37:16 +01:00
|
|
|
|
variables:
|
|
|
|
|
MSYSTEM: "MINGW32"
|
|
|
|
|
CHERE_INVOKING: "yes"
|
2022-10-29 04:12:21 +02:00
|
|
|
|
CFLAGS: -coverage -ftest-coverage -fprofile-arcs
|
2023-02-15 19:23:04 +01:00
|
|
|
|
PYTHONUTF8: "1"
|
2024-08-23 10:34:29 +02:00
|
|
|
|
G_DEBUGGER: 'gdb.exe -batch -ex "set logging enabled on" -ex "attach %p" -ex "signal-event %e" -ex "c" -ex "thread apply all bt full" -ex "k"'
|
2018-02-22 19:37:16 +01:00
|
|
|
|
script:
|
|
|
|
|
- C:\msys64\usr\bin\pacman --noconfirm -Syyuu --ask 20
|
2020-02-12 15:35:54 +01:00
|
|
|
|
- C:\msys64\usr\bin\bash .gitlab-ci/show-execution-environment.sh
|
2018-02-22 19:37:16 +01:00
|
|
|
|
- C:\msys64\usr\bin\bash -lc "bash -x ./.gitlab-ci/test-msys2.sh"
|
2018-04-27 17:04:52 +02:00
|
|
|
|
artifacts:
|
2019-04-06 16:22:04 +02:00
|
|
|
|
reports:
|
2022-10-19 20:08:15 +02:00
|
|
|
|
junit:
|
|
|
|
|
- _build/meson-logs/testlog.junit.xml
|
|
|
|
|
- _build/meson-logs/testlog-*.junit.xml
|
2020-04-29 08:44:43 +02:00
|
|
|
|
name: "glib-${env:CI_JOB_NAME}-${env:CI_COMMIT_REF_NAME}"
|
2018-05-28 14:11:22 +02:00
|
|
|
|
when: always
|
2022-04-06 13:54:54 +02:00
|
|
|
|
expire_in: 1 week
|
2018-04-27 17:04:52 +02:00
|
|
|
|
paths:
|
2018-05-28 14:11:22 +02:00
|
|
|
|
- _build/meson-logs
|
2024-08-23 10:34:29 +02:00
|
|
|
|
- _build/gdb.txt
|
2018-04-27 17:04:52 +02:00
|
|
|
|
- _coverage/
|
2024-02-06 17:34:36 +01:00
|
|
|
|
- _reference/
|
2018-04-27 17:04:52 +02:00
|
|
|
|
|
2024-05-15 12:31:20 +02:00
|
|
|
|
# See the note about msys2 CI job failure policy above.
|
2022-10-29 04:14:29 +02:00
|
|
|
|
msys2-clang64:
|
2024-01-23 19:18:54 +01:00
|
|
|
|
extends: .only-schedules-or-manual
|
2022-10-29 04:14:29 +02:00
|
|
|
|
stage: build
|
|
|
|
|
tags:
|
|
|
|
|
- win32-ps
|
|
|
|
|
needs: []
|
|
|
|
|
variables:
|
|
|
|
|
MSYSTEM: "CLANG64"
|
|
|
|
|
CHERE_INVOKING: "yes"
|
2023-02-15 19:23:04 +01:00
|
|
|
|
PYTHONUTF8: "1"
|
2022-10-29 04:14:29 +02:00
|
|
|
|
script:
|
|
|
|
|
- C:\msys64\usr\bin\pacman --noconfirm -Syyuu --ask 20
|
|
|
|
|
- C:\msys64\usr\bin\bash .gitlab-ci/show-execution-environment.sh
|
|
|
|
|
- C:\msys64\usr\bin\bash -lc "bash -x ./.gitlab-ci/test-msys2.sh"
|
|
|
|
|
artifacts:
|
|
|
|
|
reports:
|
|
|
|
|
junit: "_build/meson-logs/testlog.junit.xml"
|
|
|
|
|
name: "glib-${env:CI_JOB_NAME}-${env:CI_COMMIT_REF_NAME}"
|
|
|
|
|
when: always
|
|
|
|
|
expire_in: 1 week
|
|
|
|
|
paths:
|
|
|
|
|
- _build/meson-logs
|
|
|
|
|
|
2024-09-30 12:08:15 +02:00
|
|
|
|
vs2019-x64:
|
2019-11-28 12:38:25 +01:00
|
|
|
|
extends: .only-default
|
2018-05-24 19:18:25 +02:00
|
|
|
|
stage: build
|
|
|
|
|
tags:
|
2020-04-29 08:44:43 +02:00
|
|
|
|
- win32-ps
|
2020-07-27 13:00:57 +02:00
|
|
|
|
needs: []
|
2023-02-15 19:23:04 +01:00
|
|
|
|
variables:
|
2024-09-12 22:40:41 +02:00
|
|
|
|
GIT_SUBMODULE_STRATEGY: recursive
|
|
|
|
|
GIT_SUBMODULE_DEPTH: 1
|
2023-02-15 19:23:04 +01:00
|
|
|
|
PYTHONUTF8: "1"
|
2018-05-24 19:18:25 +02:00
|
|
|
|
script:
|
2022-01-14 17:01:16 +01:00
|
|
|
|
# FIXME: These should use --wrap-mode=nodownload but the Windows CI machines
|
|
|
|
|
# aren’t currently set up for that.
|
2024-09-25 16:17:18 +02:00
|
|
|
|
# FIXME: Use --meson-fatal-warnings once we've enabled c_std=gnu99,c99
|
|
|
|
|
# for the runner's Meson version.
|
|
|
|
|
- .gitlab-ci/test-msvc.bat --buildtype debug
|
2022-05-06 14:46:53 +02:00
|
|
|
|
--wrap-mode=default
|
|
|
|
|
--python.platlibdir=C:\Python37\site-packages
|
|
|
|
|
--python.purelibdir=C:\Python37\site-packages
|
2024-09-30 12:08:15 +02:00
|
|
|
|
--plat=x64
|
2018-05-24 19:18:25 +02:00
|
|
|
|
artifacts:
|
2019-04-08 10:51:47 +02:00
|
|
|
|
reports:
|
2022-10-19 20:08:15 +02:00
|
|
|
|
junit:
|
|
|
|
|
- _build/meson-logs/testlog.junit.xml
|
|
|
|
|
- _build/meson-logs/testlog-*.junit.xml
|
2020-04-29 08:44:43 +02:00
|
|
|
|
name: "glib-${env:CI_JOB_NAME}-${env:CI_COMMIT_REF_NAME}"
|
2018-05-24 19:18:25 +02:00
|
|
|
|
when: always
|
2022-04-06 13:54:54 +02:00
|
|
|
|
expire_in: 1 week
|
2018-05-24 19:18:25 +02:00
|
|
|
|
paths:
|
|
|
|
|
- _build/meson-logs
|
2021-09-20 14:13:36 +02:00
|
|
|
|
- _build/glib/libglib-2.0-0.dll
|
|
|
|
|
- _build/gio/libgio-2.0-0.dll
|
|
|
|
|
- _build/gmodule/libgmodule-2.0-0.dll
|
|
|
|
|
- _build/gthread/libgthread-2.0-0.dll
|
|
|
|
|
- _build/gobject/libgobject-2.0-0.dll
|
2018-05-24 19:18:25 +02:00
|
|
|
|
|
2024-09-30 12:08:15 +02:00
|
|
|
|
vs2019-x64-static:
|
2022-01-14 17:01:16 +01:00
|
|
|
|
extends: .only-default
|
|
|
|
|
stage: build
|
|
|
|
|
tags:
|
|
|
|
|
- win32-ps
|
|
|
|
|
needs: []
|
2023-02-15 19:23:04 +01:00
|
|
|
|
variables:
|
2024-09-12 22:40:41 +02:00
|
|
|
|
GIT_SUBMODULE_STRATEGY: recursive
|
|
|
|
|
GIT_SUBMODULE_DEPTH: 1
|
2023-02-15 19:23:04 +01:00
|
|
|
|
PYTHONUTF8: "1"
|
2022-01-14 17:01:16 +01:00
|
|
|
|
script:
|
|
|
|
|
# FIXME: These should use --wrap-mode=nodownload but the Windows CI machines
|
|
|
|
|
# aren’t currently set up for that.
|
2024-09-25 16:17:18 +02:00
|
|
|
|
# FIXME: Use --meson-fatal-warnings once we've enabled c_std=gnu99,c99
|
|
|
|
|
# for the runner's Meson version.
|
|
|
|
|
- .gitlab-ci/test-msvc.bat --buildtype debug
|
2022-05-06 14:46:53 +02:00
|
|
|
|
--wrap-mode=default
|
|
|
|
|
--default-library=static
|
|
|
|
|
--python.platlibdir=C:\Python37\site-packages
|
|
|
|
|
--python.purelibdir=C:\Python37\site-packages
|
2024-09-30 12:08:15 +02:00
|
|
|
|
--plat=x64
|
2022-01-14 17:01:16 +01:00
|
|
|
|
artifacts:
|
|
|
|
|
reports:
|
2022-10-19 20:08:15 +02:00
|
|
|
|
junit:
|
|
|
|
|
- _build/meson-logs/testlog.junit.xml
|
|
|
|
|
- _build/meson-logs/testlog-*.junit.xml
|
2022-01-14 17:01:16 +01:00
|
|
|
|
name: "glib-${env:CI_JOB_NAME}-${env:CI_COMMIT_REF_NAME}"
|
|
|
|
|
when: always
|
2022-04-06 13:54:54 +02:00
|
|
|
|
expire_in: 1 week
|
2022-01-14 17:01:16 +01:00
|
|
|
|
paths:
|
|
|
|
|
- _build/meson-logs
|
|
|
|
|
|
2024-10-01 10:25:45 +02:00
|
|
|
|
vs2019-x86:
|
2024-10-04 06:26:51 +02:00
|
|
|
|
extends: .only-schedules-or-manual
|
2024-10-01 10:25:45 +02:00
|
|
|
|
stage: build
|
|
|
|
|
tags:
|
|
|
|
|
- win32-ps
|
|
|
|
|
needs: []
|
|
|
|
|
variables:
|
|
|
|
|
GIT_SUBMODULE_STRATEGY: recursive
|
|
|
|
|
GIT_SUBMODULE_DEPTH: 1
|
|
|
|
|
PYTHONUTF8: "1"
|
|
|
|
|
script:
|
|
|
|
|
# FIXME: These should use --wrap-mode=nodownload but the Windows CI machines
|
|
|
|
|
# aren’t currently set up for that.
|
|
|
|
|
# FIXME: Use --meson-fatal-warnings once we've enabled c_std=gnu99,c99
|
|
|
|
|
# for the runner's Meson version.
|
|
|
|
|
- .gitlab-ci/test-msvc.bat --buildtype debug
|
|
|
|
|
--wrap-mode=default
|
|
|
|
|
--python.platlibdir=C:\Python37\site-packages
|
|
|
|
|
--python.purelibdir=C:\Python37\site-packages
|
|
|
|
|
--plat=x64_x86
|
|
|
|
|
artifacts:
|
|
|
|
|
reports:
|
|
|
|
|
junit:
|
|
|
|
|
- _build/meson-logs/testlog.junit.xml
|
|
|
|
|
- _build/meson-logs/testlog-*.junit.xml
|
|
|
|
|
name: "glib-${env:CI_JOB_NAME}-${env:CI_COMMIT_REF_NAME}"
|
|
|
|
|
when: always
|
|
|
|
|
expire_in: 1 week
|
|
|
|
|
paths:
|
|
|
|
|
- _build/meson-logs
|
|
|
|
|
- _build/glib/libglib-2.0-0.dll
|
|
|
|
|
- _build/gio/libgio-2.0-0.dll
|
|
|
|
|
- _build/gmodule/libgmodule-2.0-0.dll
|
|
|
|
|
- _build/gthread/libgthread-2.0-0.dll
|
|
|
|
|
- _build/gobject/libgobject-2.0-0.dll
|
|
|
|
|
|
2024-10-04 06:54:51 +02:00
|
|
|
|
vs2019-arm64:
|
|
|
|
|
extends: .only-schedules-or-manual
|
|
|
|
|
stage: build
|
|
|
|
|
tags:
|
|
|
|
|
- win32-ps
|
|
|
|
|
needs: []
|
|
|
|
|
variables:
|
|
|
|
|
GIT_SUBMODULE_STRATEGY: recursive
|
|
|
|
|
GIT_SUBMODULE_DEPTH: 1
|
|
|
|
|
PYTHONUTF8: "1"
|
|
|
|
|
script:
|
|
|
|
|
# FIXME: These should use --wrap-mode=nodownload but the Windows CI machines
|
|
|
|
|
# aren’t currently set up for that.
|
|
|
|
|
# FIXME: Use --meson-fatal-warnings once we've enabled c_std=gnu99,c99
|
|
|
|
|
# for the runner's Meson version.
|
|
|
|
|
- .gitlab-ci/test-msvc.bat --buildtype debug
|
|
|
|
|
--wrap-mode=default
|
|
|
|
|
--python.platlibdir=C:\Python37\site-packages
|
|
|
|
|
--python.purelibdir=C:\Python37\site-packages
|
|
|
|
|
--plat=x64_arm64
|
|
|
|
|
artifacts:
|
|
|
|
|
reports:
|
|
|
|
|
junit:
|
|
|
|
|
- _build/meson-logs/testlog.junit.xml
|
|
|
|
|
- _build/meson-logs/testlog-*.junit.xml
|
|
|
|
|
name: "glib-${env:CI_JOB_NAME}-${env:CI_COMMIT_REF_NAME}"
|
|
|
|
|
when: always
|
|
|
|
|
expire_in: 1 week
|
|
|
|
|
paths:
|
|
|
|
|
- _build/meson-logs
|
|
|
|
|
- _build/glib/libglib-2.0-0.dll
|
|
|
|
|
- _build/gio/libgio-2.0-0.dll
|
|
|
|
|
- _build/gmodule/libgmodule-2.0-0.dll
|
|
|
|
|
- _build/gthread/libgthread-2.0-0.dll
|
|
|
|
|
- _build/gobject/libgobject-2.0-0.dll
|
|
|
|
|
|
2021-09-02 19:53:26 +02:00
|
|
|
|
freebsd-13-x86_64:
|
2024-05-16 13:39:01 +02:00
|
|
|
|
extends: .only-schedules-or-manual
|
2019-06-24 16:55:36 +02:00
|
|
|
|
stage: build
|
|
|
|
|
tags:
|
2021-09-02 19:53:26 +02:00
|
|
|
|
- freebsd-13
|
2020-07-27 13:00:57 +02:00
|
|
|
|
needs: []
|
2019-06-24 16:55:36 +02:00
|
|
|
|
variables:
|
|
|
|
|
CPPFLAGS: -I/usr/local/include
|
|
|
|
|
LDFLAGS: -L/usr/local/lib -Wl,--disable-new-dtags
|
2021-09-02 18:51:14 +02:00
|
|
|
|
LANG: C.UTF-8
|
2020-02-12 15:35:54 +01:00
|
|
|
|
before_script:
|
|
|
|
|
- bash .gitlab-ci/show-execution-environment.sh
|
2019-06-24 16:55:36 +02:00
|
|
|
|
script:
|
2024-09-26 14:29:52 +02:00
|
|
|
|
- meson setup ${MESON_COMMON_OPTIONS}
|
2024-06-10 12:00:31 +02:00
|
|
|
|
--localstatedir=/var
|
|
|
|
|
-Db_lundef=false
|
|
|
|
|
-Dxattr=false
|
|
|
|
|
-Dsystemtap=disabled
|
|
|
|
|
-Ddtrace=disabled
|
|
|
|
|
_build
|
2023-08-16 13:57:47 +02:00
|
|
|
|
- meson compile -C _build
|
2019-06-24 16:55:36 +02:00
|
|
|
|
- bash -x ./.gitlab-ci/run-tests.sh
|
2019-12-10 13:45:51 +01:00
|
|
|
|
artifacts:
|
|
|
|
|
reports:
|
2022-10-19 20:08:15 +02:00
|
|
|
|
junit:
|
|
|
|
|
- _build/meson-logs/testlog.junit.xml
|
|
|
|
|
- _build/meson-logs/testlog-*.junit.xml
|
2019-12-10 13:45:51 +01:00
|
|
|
|
name: "glib-${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}"
|
|
|
|
|
when: always
|
2022-04-06 13:54:54 +02:00
|
|
|
|
expire_in: 1 week
|
2019-12-10 13:45:51 +01:00
|
|
|
|
paths:
|
|
|
|
|
- "_build/config.h"
|
|
|
|
|
- "_build/glib/glibconfig.h"
|
|
|
|
|
- "_build/meson-logs"
|
|
|
|
|
|
2024-02-19 19:05:50 +01:00
|
|
|
|
macos-arm64:
|
|
|
|
|
only:
|
|
|
|
|
- branches@GNOME/glib
|
|
|
|
|
# runner's maintainer
|
|
|
|
|
- branches@dehesselle/glib
|
|
|
|
|
except:
|
|
|
|
|
- tags
|
2019-12-10 13:45:51 +01:00
|
|
|
|
stage: build
|
|
|
|
|
tags:
|
2024-02-19 19:05:50 +01:00
|
|
|
|
- macosarm
|
2020-07-27 13:00:57 +02:00
|
|
|
|
needs: []
|
2023-08-03 23:37:18 +02:00
|
|
|
|
cache: []
|
2022-06-30 02:31:02 +02:00
|
|
|
|
variables:
|
|
|
|
|
GIT_SUBMODULE_STRATEGY: normal
|
2023-08-03 23:37:18 +02:00
|
|
|
|
# -Wno-overlength-strings
|
2022-07-12 15:16:23 +02:00
|
|
|
|
# libpcre2 gets built as a subproject, but the default Clang options on
|
|
|
|
|
# macOS limit string lengths to 4095B — pcre2_error.c has a string of length
|
|
|
|
|
# 4380B
|
2024-02-19 19:05:50 +01:00
|
|
|
|
CFLAGS: -Wno-overlength-strings
|
2023-08-03 23:37:18 +02:00
|
|
|
|
# redirect to the runner's volatile temporary directory
|
|
|
|
|
TMPDIR: /Users/Shared/work/tmp
|
|
|
|
|
# keep the user profile clean
|
2024-02-19 19:05:50 +01:00
|
|
|
|
PIP_CACHE_DIR: /Users/Shared/work/cache
|
2023-08-03 23:37:18 +02:00
|
|
|
|
PIPENV_CACHE_DIR: $PIP_CACHE_DIR
|
|
|
|
|
PYTHONPYCACHEPREFIX: $PIP_CACHE_DIR
|
2024-02-19 19:05:50 +01:00
|
|
|
|
# target macOS 11 Big Sur
|
|
|
|
|
SDKROOT: /opt/sdks/MacOSX11.3.sdk
|
2023-08-03 23:37:18 +02:00
|
|
|
|
# use the runner's ccache directory
|
|
|
|
|
CCACHE_DIR: /Users/Shared/work/ccache
|
2019-12-10 13:45:51 +01:00
|
|
|
|
before_script:
|
2020-02-12 15:35:54 +01:00
|
|
|
|
- bash .gitlab-ci/show-execution-environment.sh
|
2023-08-03 23:37:18 +02:00
|
|
|
|
- python3 -m venv .venv
|
2024-02-19 19:05:50 +01:00
|
|
|
|
- curl -L https://github.com/ccache/ccache/releases/download/v4.9.1/ccache-4.9.1-darwin.tar.gz | tar -C .venv/bin -xz --strip-components=1 ccache-4.9.1-darwin/ccache
|
2023-08-03 23:37:18 +02:00
|
|
|
|
- source .venv/bin/activate
|
2024-02-19 19:05:50 +01:00
|
|
|
|
- pip3 install meson==1.4.2 ninja==1.11.1.1 packaging==23.2
|
2019-12-10 13:45:51 +01:00
|
|
|
|
script:
|
2024-02-19 19:05:50 +01:00
|
|
|
|
# FIXME: These should use --wrap-mode=nodownload but the macOS CI machine
|
2024-09-13 00:05:41 +02:00
|
|
|
|
# isn't currently set up for that. See:
|
2020-01-20 16:30:44 +01:00
|
|
|
|
# - https://gitlab.gnome.org/GNOME/glib/merge_requests/388
|
|
|
|
|
# - https://gitlab.gnome.org/Infrastructure/Infrastructure/issues/225
|
2023-08-14 13:24:28 +02:00
|
|
|
|
- meson setup ${MESON_COMMON_OPTIONS}
|
2020-01-20 16:30:44 +01:00
|
|
|
|
--wrap-mode=default
|
2021-11-17 16:43:59 +01:00
|
|
|
|
--werror
|
2019-12-10 13:45:51 +01:00
|
|
|
|
_build
|
2023-08-16 13:57:47 +02:00
|
|
|
|
- meson compile -C _build
|
2022-02-18 00:01:35 +01:00
|
|
|
|
- .gitlab-ci/run-tests.sh
|
2019-06-24 16:55:36 +02:00
|
|
|
|
artifacts:
|
2019-04-05 21:53:11 +02:00
|
|
|
|
reports:
|
2022-10-19 20:08:15 +02:00
|
|
|
|
junit:
|
|
|
|
|
- _build/meson-logs/testlog.junit.xml
|
|
|
|
|
- _build/meson-logs/testlog-*.junit.xml
|
2018-05-24 17:14:25 +02:00
|
|
|
|
name: "glib-${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}"
|
|
|
|
|
when: always
|
2022-04-06 13:54:54 +02:00
|
|
|
|
expire_in: 1 week
|
2018-05-24 17:14:25 +02:00
|
|
|
|
paths:
|
2018-09-28 19:01:12 +02:00
|
|
|
|
- "_build/config.h"
|
|
|
|
|
- "_build/glib/glibconfig.h"
|
2018-05-24 17:14:25 +02:00
|
|
|
|
- "_build/meson-logs"
|
|
|
|
|
|
2018-04-27 17:04:52 +02:00
|
|
|
|
coverage:
|
2019-11-28 12:38:25 +01:00
|
|
|
|
extends: .only-default
|
2020-01-13 18:45:00 +01:00
|
|
|
|
image: $FEDORA_IMAGE
|
2018-04-27 17:04:52 +02:00
|
|
|
|
stage: coverage
|
2020-07-27 13:00:57 +02:00
|
|
|
|
needs: ['fedora-x86_64', 'msys2-mingw32']
|
2018-04-27 17:04:52 +02:00
|
|
|
|
artifacts:
|
2018-05-29 11:54:29 +02:00
|
|
|
|
name: "glib-${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}"
|
2022-04-06 13:54:54 +02:00
|
|
|
|
expire_in: 1 week
|
2022-07-14 21:51:51 +02:00
|
|
|
|
expose_as: 'Coverage Report'
|
2018-04-27 17:04:52 +02:00
|
|
|
|
paths:
|
2022-07-14 21:51:51 +02:00
|
|
|
|
- _coverage/coverage/index.html
|
|
|
|
|
- _coverage
|
2022-07-21 01:05:42 +02:00
|
|
|
|
reports:
|
|
|
|
|
coverage_report:
|
|
|
|
|
coverage_format: cobertura
|
|
|
|
|
path: _coverage/*-cobertura/cobertura-*.xml
|
2020-02-12 15:35:54 +01:00
|
|
|
|
before_script:
|
|
|
|
|
- bash .gitlab-ci/show-execution-environment.sh
|
2018-04-27 17:04:52 +02:00
|
|
|
|
script:
|
|
|
|
|
- bash -x ./.gitlab-ci/coverage-docker.sh
|
2018-05-25 00:43:03 +02:00
|
|
|
|
coverage: '/^\s+lines\.+:\s+([\d.]+\%)\s+/'
|
2018-04-27 17:04:52 +02:00
|
|
|
|
|
ci: Add scan-build job in a new ‘analysis’ pipeline stage
Use Meson’s support for running scan-build (Clang’s static analyser)
against the build, so that we get static analysis of each pipeline. Add
it in a new pipeline stage, after code coverage, so that we don’t waste
resources on it unless the unit tests pass — a static analysis build
takes perhaps 10× as long as a normal GCC build.
https://mesonbuild.com/howtox.html#use-clang-static-analyzer
Currently, the static analysis results are uploaded as artifacts, but
the job will always succeed (regardless of whether there are any bugs
found in the analysis).
Currently, a large number of reports are outputted by the analyser,
which need to be fixed before we can gate the pipeline on it.
Furthermore, in order to get scan-build to exit with a non-zero status
if any bugs are found, we need to depend on Meson ≥ 0.49.0, which
contains the fix https://github.com/mesonbuild/meson/issues/4334,
allowing us to add the following to .gitlab-ci.yml:
```
variables:
# Exit with a non-zero status if any bugs are found
SCANBUILD: "scan-build --status-bugs"
```
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2018-12-28 00:32:39 +01:00
|
|
|
|
scan-build:
|
2022-02-20 13:30:19 +01:00
|
|
|
|
extends:
|
2022-02-20 13:33:09 +01:00
|
|
|
|
- .build-linux
|
2024-01-23 19:18:54 +01:00
|
|
|
|
- .only-schedules-or-manual
|
2024-07-09 10:09:02 +02:00
|
|
|
|
- .build-gobject-introspection
|
2020-01-13 18:45:00 +01:00
|
|
|
|
image: $FEDORA_IMAGE
|
ci: Add scan-build job in a new ‘analysis’ pipeline stage
Use Meson’s support for running scan-build (Clang’s static analyser)
against the build, so that we get static analysis of each pipeline. Add
it in a new pipeline stage, after code coverage, so that we don’t waste
resources on it unless the unit tests pass — a static analysis build
takes perhaps 10× as long as a normal GCC build.
https://mesonbuild.com/howtox.html#use-clang-static-analyzer
Currently, the static analysis results are uploaded as artifacts, but
the job will always succeed (regardless of whether there are any bugs
found in the analysis).
Currently, a large number of reports are outputted by the analyser,
which need to be fixed before we can gate the pipeline on it.
Furthermore, in order to get scan-build to exit with a non-zero status
if any bugs are found, we need to depend on Meson ≥ 0.49.0, which
contains the fix https://github.com/mesonbuild/meson/issues/4334,
allowing us to add the following to .gitlab-ci.yml:
```
variables:
# Exit with a non-zero status if any bugs are found
SCANBUILD: "scan-build --status-bugs"
```
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2018-12-28 00:32:39 +01:00
|
|
|
|
stage: analysis
|
2020-07-27 13:00:57 +02:00
|
|
|
|
needs: []
|
2024-04-04 00:21:31 +02:00
|
|
|
|
variables:
|
2024-04-12 16:09:20 +02:00
|
|
|
|
# FIXME: Eventually we want static analysis on the tests and copylibs, for
|
|
|
|
|
# code quality, but for the moment it’s just busywork.
|
2024-04-04 01:28:06 +02:00
|
|
|
|
# FIXME: Disable the dead code checkers for now because they create a lot of
|
|
|
|
|
# noise and don’t indicate high severity problems.
|
2024-04-04 00:21:31 +02:00
|
|
|
|
SCAN_BUILD_FLAGS: >-
|
|
|
|
|
--exclude gio/tests/
|
|
|
|
|
--exclude girepository/tests/
|
|
|
|
|
--exclude glib/tests/
|
|
|
|
|
--exclude gmodule/tests/
|
|
|
|
|
--exclude gobject/tests/
|
|
|
|
|
--exclude gthread/tests/
|
2024-04-12 16:09:20 +02:00
|
|
|
|
--exclude girepository/cmph/
|
|
|
|
|
--exclude glib/libcharset/
|
|
|
|
|
--exclude gio/xdgmime/
|
2024-09-12 23:07:24 +02:00
|
|
|
|
--exclude meson-private/
|
2024-04-04 01:28:06 +02:00
|
|
|
|
-disable-checker deadcode.DeadStores
|
2024-04-12 16:35:12 +02:00
|
|
|
|
--status-bugs
|
2024-07-09 10:09:02 +02:00
|
|
|
|
before_script:
|
2024-09-12 22:46:31 +02:00
|
|
|
|
- !reference [".build-linux", "before_script"]
|
2024-07-09 10:09:02 +02:00
|
|
|
|
- !reference [".build-gobject-introspection", "before_script"]
|
ci: Add scan-build job in a new ‘analysis’ pipeline stage
Use Meson’s support for running scan-build (Clang’s static analyser)
against the build, so that we get static analysis of each pipeline. Add
it in a new pipeline stage, after code coverage, so that we don’t waste
resources on it unless the unit tests pass — a static analysis build
takes perhaps 10× as long as a normal GCC build.
https://mesonbuild.com/howtox.html#use-clang-static-analyzer
Currently, the static analysis results are uploaded as artifacts, but
the job will always succeed (regardless of whether there are any bugs
found in the analysis).
Currently, a large number of reports are outputted by the analyser,
which need to be fixed before we can gate the pipeline on it.
Furthermore, in order to get scan-build to exit with a non-zero status
if any bugs are found, we need to depend on Meson ≥ 0.49.0, which
contains the fix https://github.com/mesonbuild/meson/issues/4334,
allowing us to add the following to .gitlab-ci.yml:
```
variables:
# Exit with a non-zero status if any bugs are found
SCANBUILD: "scan-build --status-bugs"
```
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2018-12-28 00:32:39 +01:00
|
|
|
|
script:
|
2023-08-14 13:24:28 +02:00
|
|
|
|
- meson setup ${MESON_COMMON_OPTIONS}
|
ci: Add scan-build job in a new ‘analysis’ pipeline stage
Use Meson’s support for running scan-build (Clang’s static analyser)
against the build, so that we get static analysis of each pipeline. Add
it in a new pipeline stage, after code coverage, so that we don’t waste
resources on it unless the unit tests pass — a static analysis build
takes perhaps 10× as long as a normal GCC build.
https://mesonbuild.com/howtox.html#use-clang-static-analyzer
Currently, the static analysis results are uploaded as artifacts, but
the job will always succeed (regardless of whether there are any bugs
found in the analysis).
Currently, a large number of reports are outputted by the analyser,
which need to be fixed before we can gate the pipeline on it.
Furthermore, in order to get scan-build to exit with a non-zero status
if any bugs are found, we need to depend on Meson ≥ 0.49.0, which
contains the fix https://github.com/mesonbuild/meson/issues/4334,
allowing us to add the following to .gitlab-ci.yml:
```
variables:
# Exit with a non-zero status if any bugs are found
SCANBUILD: "scan-build --status-bugs"
```
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2018-12-28 00:32:39 +01:00
|
|
|
|
--werror
|
|
|
|
|
--default-library=both
|
|
|
|
|
--prefix=$HOME/glib-installed
|
2021-02-24 14:16:57 +01:00
|
|
|
|
--localstatedir=/var
|
ci: Add scan-build job in a new ‘analysis’ pipeline stage
Use Meson’s support for running scan-build (Clang’s static analyser)
against the build, so that we get static analysis of each pipeline. Add
it in a new pipeline stage, after code coverage, so that we don’t waste
resources on it unless the unit tests pass — a static analysis build
takes perhaps 10× as long as a normal GCC build.
https://mesonbuild.com/howtox.html#use-clang-static-analyzer
Currently, the static analysis results are uploaded as artifacts, but
the job will always succeed (regardless of whether there are any bugs
found in the analysis).
Currently, a large number of reports are outputted by the analyser,
which need to be fixed before we can gate the pipeline on it.
Furthermore, in order to get scan-build to exit with a non-zero status
if any bugs are found, we need to depend on Meson ≥ 0.49.0, which
contains the fix https://github.com/mesonbuild/meson/issues/4334,
allowing us to add the following to .gitlab-ci.yml:
```
variables:
# Exit with a non-zero status if any bugs are found
SCANBUILD: "scan-build --status-bugs"
```
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2018-12-28 00:32:39 +01:00
|
|
|
|
--libdir=lib
|
2024-04-12 20:35:05 +02:00
|
|
|
|
-Dglib_debug=enabled
|
2024-05-15 22:48:44 +02:00
|
|
|
|
-Dsystemtap=enabled
|
2024-05-15 22:09:46 +02:00
|
|
|
|
-Ddtrace=enabled
|
ci: Add scan-build job in a new ‘analysis’ pipeline stage
Use Meson’s support for running scan-build (Clang’s static analyser)
against the build, so that we get static analysis of each pipeline. Add
it in a new pipeline stage, after code coverage, so that we don’t waste
resources on it unless the unit tests pass — a static analysis build
takes perhaps 10× as long as a normal GCC build.
https://mesonbuild.com/howtox.html#use-clang-static-analyzer
Currently, the static analysis results are uploaded as artifacts, but
the job will always succeed (regardless of whether there are any bugs
found in the analysis).
Currently, a large number of reports are outputted by the analyser,
which need to be fixed before we can gate the pipeline on it.
Furthermore, in order to get scan-build to exit with a non-zero status
if any bugs are found, we need to depend on Meson ≥ 0.49.0, which
contains the fix https://github.com/mesonbuild/meson/issues/4334,
allowing us to add the following to .gitlab-ci.yml:
```
variables:
# Exit with a non-zero status if any bugs are found
SCANBUILD: "scan-build --status-bugs"
```
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2018-12-28 00:32:39 +01:00
|
|
|
|
-Dinstalled_tests=true
|
2023-11-28 19:00:35 +01:00
|
|
|
|
-Dintrospection=enabled
|
2019-06-12 15:31:42 +02:00
|
|
|
|
_scan_build
|
2024-04-04 00:21:31 +02:00
|
|
|
|
- SCANBUILD="$(pwd)/.gitlab-ci/scan-build.sh" ninja -C _scan_build scan-build
|
ci: Add scan-build job in a new ‘analysis’ pipeline stage
Use Meson’s support for running scan-build (Clang’s static analyser)
against the build, so that we get static analysis of each pipeline. Add
it in a new pipeline stage, after code coverage, so that we don’t waste
resources on it unless the unit tests pass — a static analysis build
takes perhaps 10× as long as a normal GCC build.
https://mesonbuild.com/howtox.html#use-clang-static-analyzer
Currently, the static analysis results are uploaded as artifacts, but
the job will always succeed (regardless of whether there are any bugs
found in the analysis).
Currently, a large number of reports are outputted by the analyser,
which need to be fixed before we can gate the pipeline on it.
Furthermore, in order to get scan-build to exit with a non-zero status
if any bugs are found, we need to depend on Meson ≥ 0.49.0, which
contains the fix https://github.com/mesonbuild/meson/issues/4334,
allowing us to add the following to .gitlab-ci.yml:
```
variables:
# Exit with a non-zero status if any bugs are found
SCANBUILD: "scan-build --status-bugs"
```
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2018-12-28 00:32:39 +01:00
|
|
|
|
artifacts:
|
|
|
|
|
name: "glib-${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}"
|
|
|
|
|
when: always
|
2022-04-06 13:54:54 +02:00
|
|
|
|
expire_in: 1 week
|
ci: Add scan-build job in a new ‘analysis’ pipeline stage
Use Meson’s support for running scan-build (Clang’s static analyser)
against the build, so that we get static analysis of each pipeline. Add
it in a new pipeline stage, after code coverage, so that we don’t waste
resources on it unless the unit tests pass — a static analysis build
takes perhaps 10× as long as a normal GCC build.
https://mesonbuild.com/howtox.html#use-clang-static-analyzer
Currently, the static analysis results are uploaded as artifacts, but
the job will always succeed (regardless of whether there are any bugs
found in the analysis).
Currently, a large number of reports are outputted by the analyser,
which need to be fixed before we can gate the pipeline on it.
Furthermore, in order to get scan-build to exit with a non-zero status
if any bugs are found, we need to depend on Meson ≥ 0.49.0, which
contains the fix https://github.com/mesonbuild/meson/issues/4334,
allowing us to add the following to .gitlab-ci.yml:
```
variables:
# Exit with a non-zero status if any bugs are found
SCANBUILD: "scan-build --status-bugs"
```
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2018-12-28 00:32:39 +01:00
|
|
|
|
paths:
|
2019-06-12 15:31:42 +02:00
|
|
|
|
- "_scan_build/meson-logs/scanbuild"
|
ci: Add scan-build job in a new ‘analysis’ pipeline stage
Use Meson’s support for running scan-build (Clang’s static analyser)
against the build, so that we get static analysis of each pipeline. Add
it in a new pipeline stage, after code coverage, so that we don’t waste
resources on it unless the unit tests pass — a static analysis build
takes perhaps 10× as long as a normal GCC build.
https://mesonbuild.com/howtox.html#use-clang-static-analyzer
Currently, the static analysis results are uploaded as artifacts, but
the job will always succeed (regardless of whether there are any bugs
found in the analysis).
Currently, a large number of reports are outputted by the analyser,
which need to be fixed before we can gate the pipeline on it.
Furthermore, in order to get scan-build to exit with a non-zero status
if any bugs are found, we need to depend on Meson ≥ 0.49.0, which
contains the fix https://github.com/mesonbuild/meson/issues/4334,
allowing us to add the following to .gitlab-ci.yml:
```
variables:
# Exit with a non-zero status if any bugs are found
SCANBUILD: "scan-build --status-bugs"
```
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2018-12-28 00:32:39 +01:00
|
|
|
|
|
2023-04-26 15:30:20 +02:00
|
|
|
|
.coverity:
|
2022-02-20 13:30:19 +01:00
|
|
|
|
extends:
|
2022-02-20 13:33:09 +01:00
|
|
|
|
- .build-linux
|
2024-01-25 17:07:46 +01:00
|
|
|
|
- .only-schedules-or-manual-in-default-branch
|
2024-07-09 10:09:02 +02:00
|
|
|
|
- .build-gobject-introspection
|
2020-07-27 13:39:24 +02:00
|
|
|
|
image: $COVERITY_IMAGE
|
|
|
|
|
stage: analysis
|
|
|
|
|
needs: []
|
|
|
|
|
variables:
|
|
|
|
|
# cov-build doesn’t like GLIB_DEPRECATED_ENUMERATOR
|
|
|
|
|
CFLAGS: '-DGLIB_DISABLE_DEPRECATION_WARNINGS'
|
2024-07-09 10:09:02 +02:00
|
|
|
|
before_script:
|
2024-09-12 22:46:31 +02:00
|
|
|
|
- !reference [".build-linux", "before_script"]
|
2024-07-09 10:09:02 +02:00
|
|
|
|
- !reference [".build-gobject-introspection", "before_script"]
|
2020-07-27 13:39:24 +02:00
|
|
|
|
script:
|
2023-08-14 13:24:28 +02:00
|
|
|
|
- meson setup ${MESON_COMMON_OPTIONS}
|
2020-07-27 13:39:24 +02:00
|
|
|
|
--werror
|
|
|
|
|
--default-library=both
|
|
|
|
|
--prefix=$HOME/glib-installed
|
2021-02-24 14:16:57 +01:00
|
|
|
|
--localstatedir=/var
|
2020-07-27 13:39:24 +02:00
|
|
|
|
--libdir=lib
|
2024-05-15 22:48:44 +02:00
|
|
|
|
-Dsystemtap=enabled
|
2024-05-15 22:09:46 +02:00
|
|
|
|
-Ddtrace=enabled
|
2020-07-27 13:39:24 +02:00
|
|
|
|
-Dinstalled_tests=true
|
2023-11-28 19:00:35 +01:00
|
|
|
|
-Dintrospection=enabled
|
2020-07-27 13:39:24 +02:00
|
|
|
|
_coverity_build
|
2023-08-16 13:57:47 +02:00
|
|
|
|
- $HOME/cov-analysis-linux64-*/bin/cov-build --dir cov-int meson compile -C _coverity_build
|
2020-07-27 13:39:24 +02:00
|
|
|
|
- tar cfz cov-int.tar.gz cov-int
|
|
|
|
|
- curl https://scan.coverity.com/builds?project=$COVERITY_SCAN_PROJECT_NAME
|
|
|
|
|
--form token=$COVERITY_SCAN_TOKEN --form email=$GITLAB_USER_EMAIL
|
|
|
|
|
--form file=@cov-int.tar.gz --form version="$CI_COMMIT_SHA"
|
|
|
|
|
--form description="$CI_COMMIT_SHA / $CI_COMMIT_TITLE / $CI_COMMIT_REF_NAME:$CI_PIPELINE_ID"
|
|
|
|
|
artifacts:
|
|
|
|
|
name: "glib-${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}"
|
|
|
|
|
when: always
|
2022-04-06 13:54:54 +02:00
|
|
|
|
expire_in: 1 week
|
2020-07-27 13:39:24 +02:00
|
|
|
|
paths:
|
|
|
|
|
- "cov-int/build-log.txt"
|
|
|
|
|
|
2018-04-27 17:04:52 +02:00
|
|
|
|
pages:
|
2024-01-25 21:31:34 +01:00
|
|
|
|
extends: .only-schedules
|
2018-04-27 17:04:52 +02:00
|
|
|
|
stage: deploy
|
2022-11-02 17:46:15 +01:00
|
|
|
|
needs: ['coverage', 'style-check-advisory']
|
2018-04-27 17:04:52 +02:00
|
|
|
|
script:
|
|
|
|
|
- mv _coverage/ public/
|
|
|
|
|
artifacts:
|
|
|
|
|
paths:
|
|
|
|
|
- public
|
2018-02-22 19:37:16 +01:00
|
|
|
|
|
2018-02-18 15:59:29 +01:00
|
|
|
|
dist-job:
|
2020-01-13 18:45:00 +01:00
|
|
|
|
image: $FEDORA_IMAGE
|
2018-02-18 15:59:29 +01:00
|
|
|
|
stage: build
|
|
|
|
|
only:
|
|
|
|
|
- tags
|
|
|
|
|
script:
|
2022-07-12 19:57:17 +02:00
|
|
|
|
# Ignore extra git security checks as we don't care in CI.
|
|
|
|
|
- git config --global --add safe.directory "${PWD}"
|
|
|
|
|
- git submodule update --init
|
|
|
|
|
- for m in $(git submodule foreach -q 'echo $path'); do git config --global --add safe.directory "${PWD}/${m}"; done
|
|
|
|
|
- meson subprojects download
|
2023-12-20 15:04:11 +01:00
|
|
|
|
- meson setup ${MESON_COMMON_OPTIONS} --buildtype release -Ddocumentation=true -Dman-pages=enabled _build
|
2023-08-16 13:57:47 +02:00
|
|
|
|
- meson dist -C _build
|
2024-01-04 18:41:30 +01:00
|
|
|
|
# Compile again to build the docs
|
|
|
|
|
- meson compile -C _build
|
2024-03-13 17:46:06 +01:00
|
|
|
|
- tar -c -J -f "glib-docs-$CI_COMMIT_TAG.tar.xz" -C _build/docs/reference/glib glib-2.0
|
|
|
|
|
- tar -c -J -f "gmodule-docs-$CI_COMMIT_TAG.tar.xz" -C _build/docs/reference/gmodule gmodule-2.0
|
|
|
|
|
- tar -c -J -f "gobject-docs-$CI_COMMIT_TAG.tar.xz" -C _build/docs/reference/gobject gobject-2.0
|
|
|
|
|
- tar -c -J -f "gio-docs-$CI_COMMIT_TAG.tar.xz" -C _build/docs/reference/gio gio-2.0
|
|
|
|
|
- tar -c -J -f "girepository-docs-$CI_COMMIT_TAG.tar.xz" -C _build/docs/reference/girepository girepository-2.0
|
2018-02-18 15:59:29 +01:00
|
|
|
|
artifacts:
|
|
|
|
|
paths:
|
2020-04-28 13:28:50 +02:00
|
|
|
|
- "${CI_PROJECT_DIR}/_build/glib-docs-$CI_COMMIT_TAG.tar.xz"
|
2023-12-12 15:59:42 +01:00
|
|
|
|
- "${CI_PROJECT_DIR}/_build/gmodule-docs-$CI_COMMIT_TAG.tar.xz"
|
2020-04-28 13:28:50 +02:00
|
|
|
|
- "${CI_PROJECT_DIR}/_build/gobject-docs-$CI_COMMIT_TAG.tar.xz"
|
|
|
|
|
- "${CI_PROJECT_DIR}/_build/gio-docs-$CI_COMMIT_TAG.tar.xz"
|
2024-02-12 18:01:15 +01:00
|
|
|
|
- "${CI_PROJECT_DIR}/_build/girepository-docs-$CI_COMMIT_TAG.tar.xz"
|
2018-02-18 15:59:29 +01:00
|
|
|
|
- "${CI_PROJECT_DIR}/_build/meson-dist/glib-*.tar.xz"
|
2022-10-31 02:46:31 +01:00
|
|
|
|
|
|
|
|
|
issue-bot:
|
|
|
|
|
stage: report
|
|
|
|
|
image: registry.gitlab.com/gitlab-org/distribution/issue-bot:latest
|
|
|
|
|
script: /issue-bot
|
|
|
|
|
rules:
|
|
|
|
|
- if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH && $CI_PIPELINE_SOURCE == "schedule"
|
|
|
|
|
when: on_failure
|