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:
|
2022-12-30 21:45:13 +01:00
|
|
|
|
FEDORA_IMAGE: "registry.gitlab.gnome.org/gnome/glib/fedora:v20"
|
2022-11-24 13:10:07 +01:00
|
|
|
|
COVERITY_IMAGE: "registry.gitlab.gnome.org/gnome/glib/coverity:v7"
|
|
|
|
|
DEBIAN_IMAGE: "registry.gitlab.gnome.org/gnome/glib/debian-stable:v14"
|
2022-12-30 21:45:13 +01:00
|
|
|
|
MINGW_IMAGE: "registry.gitlab.gnome.org/gnome/glib/mingw:v10"
|
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
|
|
|
|
|
2019-11-28 12:38:25 +01:00
|
|
|
|
.only-default:
|
2019-11-27 12:06:32 +01:00
|
|
|
|
only:
|
|
|
|
|
- branches
|
|
|
|
|
except:
|
|
|
|
|
- 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
|
|
|
|
|
|
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
|
|
|
|
|
2022-11-02 17:46:15 +01:00
|
|
|
|
style-check-advisory:
|
2020-11-10 09:53:00 +01:00
|
|
|
|
extends: .only-default
|
|
|
|
|
image: $DEBIAN_IMAGE
|
|
|
|
|
stage: style-check
|
|
|
|
|
allow_failure: true
|
|
|
|
|
script:
|
2020-11-17 15:52:25 +01:00
|
|
|
|
- .gitlab-ci/run-style-check-diff.sh
|
2022-10-27 10:30:06 +02:00
|
|
|
|
- .gitlab-ci/run-check-todos.sh
|
|
|
|
|
|
|
|
|
|
sh-and-py-check:
|
|
|
|
|
extends: .only-default
|
|
|
|
|
image: $DEBIAN_IMAGE
|
|
|
|
|
stage: style-check
|
|
|
|
|
allow_failure: false
|
|
|
|
|
script:
|
2020-11-10 09:53:00 +01:00
|
|
|
|
- .gitlab-ci/run-shellcheck.sh
|
|
|
|
|
- .gitlab-ci/run-black.sh
|
|
|
|
|
- .gitlab-ci/run-flake8.sh
|
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:
|
|
|
|
|
extends: .only-default
|
|
|
|
|
image: $DEBIAN_IMAGE
|
|
|
|
|
stage: style-check
|
|
|
|
|
allow_failure: false
|
|
|
|
|
script:
|
|
|
|
|
- .gitlab-ci/run-reuse.sh
|
|
|
|
|
variables:
|
|
|
|
|
# The submodules are needed for `reuse lint` to work properly
|
|
|
|
|
GIT_SUBMODULE_STRATEGY: "normal"
|
|
|
|
|
|
2018-06-22 17:08:06 +02:00
|
|
|
|
fedora-x86_64:
|
2022-02-20 13:36:40 +01:00
|
|
|
|
extends:
|
|
|
|
|
- .build-linux
|
|
|
|
|
- .only-default
|
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:
|
2022-11-18 14:33:20 +01:00
|
|
|
|
CFLAGS: "-coverage -ftest-coverage -fprofile-arcs"
|
2018-02-18 15:59:29 +01:00
|
|
|
|
script:
|
2022-05-05 20:24:30 +02:00
|
|
|
|
- meson ${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
|
|
|
|
|
-Dsystemtap=true
|
|
|
|
|
-Ddtrace=true
|
|
|
|
|
-Dinstalled_tests=true
|
2019-07-09 21:51:32 +02:00
|
|
|
|
-Dgtk_doc=true
|
2018-09-26 16:56:10 +02:00
|
|
|
|
_build
|
2018-06-05 19:58:48 +02:00
|
|
|
|
- ninja -C _build
|
2018-04-27 17:04:52 +02:00
|
|
|
|
- mkdir -p _coverage
|
2022-04-28 12:57:45 +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
|
2022-04-28 12:57:45 +02:00
|
|
|
|
- lcov --config-file .lcovrc --directory _build --capture --output-file "_coverage/${CI_JOB_NAME}.lcov"
|
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"
|
2019-12-13 19:54:28 +01:00
|
|
|
|
- "_build/docs/reference/glib/glib-undeclared.txt"
|
|
|
|
|
- "_build/docs/reference/glib/glib-undocumented.txt"
|
|
|
|
|
- "_build/docs/reference/glib/glib-unused.txt"
|
|
|
|
|
- "_build/docs/reference/gobject/gobject-undeclared.txt"
|
|
|
|
|
- "_build/docs/reference/gobject/gobject-undocumented.txt"
|
|
|
|
|
- "_build/docs/reference/gobject/gobject-unused.txt"
|
|
|
|
|
- "_build/docs/reference/gio/gio-undeclared.txt"
|
|
|
|
|
- "_build/docs/reference/gio/gio-undocumented.txt"
|
|
|
|
|
- "_build/docs/reference/gio/gio-unused.txt"
|
2018-06-05 20:01:53 +02:00
|
|
|
|
- "_coverage"
|
2018-02-18 15:59:29 +01:00
|
|
|
|
|
2019-04-30 15:01:56 +02:00
|
|
|
|
debian-stable-x86_64:
|
2022-02-20 13:36:40 +01:00
|
|
|
|
extends:
|
|
|
|
|
- .build-linux
|
|
|
|
|
- .only-default
|
2020-01-13 18:45:00 +01:00
|
|
|
|
image: $DEBIAN_IMAGE
|
2019-04-30 15:01:56 +02:00
|
|
|
|
stage: build
|
2020-07-27 13:00:57 +02:00
|
|
|
|
needs: []
|
2019-04-30 15:01:56 +02:00
|
|
|
|
script:
|
|
|
|
|
- meson ${MESON_COMMON_OPTIONS}
|
|
|
|
|
--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
|
|
|
|
|
-Dsystemtap=true
|
|
|
|
|
-Ddtrace=true
|
|
|
|
|
_build
|
|
|
|
|
- ninja -C _build
|
|
|
|
|
- .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"
|
|
|
|
|
|
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
|
2022-02-20 13:30:19 +01:00
|
|
|
|
- .only-schedules
|
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
|
|
|
|
|
- meson ${MESON_COMMON_OPTIONS}
|
|
|
|
|
--werror
|
|
|
|
|
--prefix=/usr --libdir=/usr/lib64
|
|
|
|
|
-Dinstalled_tests=true
|
|
|
|
|
-Ddefault_library=both
|
|
|
|
|
-Ddtrace=false
|
|
|
|
|
_build
|
|
|
|
|
- ninja -C _build
|
|
|
|
|
- sudo ninja -C _build install
|
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
|
2022-02-20 13:30:19 +01:00
|
|
|
|
- .only-schedules
|
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: []
|
2019-03-05 12:02:24 +01:00
|
|
|
|
script:
|
|
|
|
|
- meson ${MESON_COMMON_OPTIONS}
|
|
|
|
|
--werror
|
|
|
|
|
-Dsystemtap=true
|
|
|
|
|
-Ddtrace=true
|
|
|
|
|
-Dinstalled_tests=true
|
2020-04-08 21:14:31 +02:00
|
|
|
|
-Dglib_assert=false
|
2019-03-05 12:02:24 +01:00
|
|
|
|
_build
|
|
|
|
|
- ninja -C _build
|
2019-04-05 21:53:11 +02:00
|
|
|
|
- bash -x ./.gitlab-ci/run-tests.sh
|
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
|
2022-02-20 13:30:19 +01:00
|
|
|
|
- .only-schedules
|
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
|
2018-06-26 18:23:09 +02:00
|
|
|
|
script:
|
|
|
|
|
- meson ${MESON_COMMON_OPTIONS}
|
|
|
|
|
--werror
|
|
|
|
|
-Dsystemtap=true
|
|
|
|
|
-Ddtrace=true
|
|
|
|
|
-Dinstalled_tests=true
|
|
|
|
|
_build
|
|
|
|
|
- ninja -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
|
2022-04-26 16:50:36 +02:00
|
|
|
|
- meson ${MESON_COMMON_OPTIONS} --cross-file=.gitlab-ci/cross_file_android_arm64_31.txt _build
|
2018-06-26 19:18:29 +02:00
|
|
|
|
- ninja -C _build
|
|
|
|
|
|
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
|
2021-10-07 18:06:30 +02:00
|
|
|
|
- meson ${MESON_COMMON_OPTIONS} --cross-file=/opt/cross_file_mingw64.txt _build
|
2018-05-20 21:17:48 +02:00
|
|
|
|
- ninja -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
|
|
|
|
|
2018-02-22 19:37:16 +01:00
|
|
|
|
msys2-mingw32:
|
2019-11-28 12:38:25 +01:00
|
|
|
|
extends: .only-default
|
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"
|
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
|
2018-04-27 17:04:52 +02:00
|
|
|
|
- _coverage/
|
|
|
|
|
|
2022-10-29 04:14:29 +02:00
|
|
|
|
msys2-clang64:
|
|
|
|
|
extends: .only-schedules
|
|
|
|
|
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
|
|
|
|
|
|
2018-05-24 19:18:25 +02:00
|
|
|
|
vs2017-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:
|
|
|
|
|
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.
|
2022-05-06 14:46:53 +02:00
|
|
|
|
- .gitlab-ci/test-msvc.bat ${MESON_COMMON_OPTIONS}
|
|
|
|
|
--wrap-mode=default
|
|
|
|
|
--python.platlibdir=C:\Python37\site-packages
|
|
|
|
|
--python.purelibdir=C:\Python37\site-packages
|
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
|
|
|
|
|
2022-01-14 17:01:16 +01:00
|
|
|
|
vs2017-x64-static:
|
|
|
|
|
extends: .only-default
|
|
|
|
|
stage: build
|
|
|
|
|
tags:
|
|
|
|
|
- win32-ps
|
|
|
|
|
needs: []
|
2023-02-15 19:23:04 +01:00
|
|
|
|
variables:
|
|
|
|
|
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.
|
2022-05-06 14:46:53 +02:00
|
|
|
|
- .gitlab-ci/test-msvc.bat ${MESON_COMMON_OPTIONS}
|
|
|
|
|
--wrap-mode=default
|
|
|
|
|
--default-library=static
|
|
|
|
|
--python.platlibdir=C:\Python37\site-packages
|
|
|
|
|
--python.purelibdir=C:\Python37\site-packages
|
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
|
|
|
|
|
|
2021-09-02 19:53:26 +02:00
|
|
|
|
freebsd-12-x86_64:
|
2022-02-20 13:47:27 +01:00
|
|
|
|
# The FreeBSD 13 build is run on each commit, so the FreeBSD 12 build can be
|
|
|
|
|
# run less regularly to save CI resources. The chance of a regression on
|
|
|
|
|
# FreeBSD 12 and not FreeBSD 13 is tiny.
|
|
|
|
|
extends: .only-schedules
|
2018-05-24 17:14:25 +02:00
|
|
|
|
stage: build
|
|
|
|
|
tags:
|
|
|
|
|
# To run a FreeBSD builder, install gitlab-runner package and start both
|
|
|
|
|
# gitlab-runner and dbus service because we need /var/lib/dbus/machine-id.
|
|
|
|
|
# To compile GLib, you still have to install the following packages:
|
|
|
|
|
# desktop-file-utils gettext libiconv meson pkgconf python3 shared-mime-info
|
2021-09-02 19:53:26 +02:00
|
|
|
|
- freebsd-12
|
2020-07-27 13:00:57 +02:00
|
|
|
|
needs: []
|
2018-05-24 17:14:25 +02:00
|
|
|
|
variables:
|
|
|
|
|
# CPPFLAGS is required because libintl doesn't use pkg-config.
|
|
|
|
|
CPPFLAGS: -I/usr/local/include
|
|
|
|
|
# FIXME: Workaround meson inability to set LD_LIBRARY_PATH.
|
|
|
|
|
# https://github.com/mesonbuild/meson/issues/1383
|
|
|
|
|
# https://github.com/mesonbuild/meson/issues/1635
|
|
|
|
|
# https://github.com/mesonbuild/meson/issues/2881
|
|
|
|
|
LDFLAGS: -L/usr/local/lib -Wl,--disable-new-dtags
|
2021-09-02 19:53:26 +02:00
|
|
|
|
# FreeBSD supports C.UTF-8 locale since 12.1.
|
|
|
|
|
LANG: C.UTF-8
|
2020-02-12 15:35:54 +01:00
|
|
|
|
before_script:
|
|
|
|
|
- bash .gitlab-ci/show-execution-environment.sh
|
2018-05-24 17:14:25 +02:00
|
|
|
|
script:
|
|
|
|
|
# We cannot use -Wl,--no-undefined because GLib uses 'environ' variable.
|
|
|
|
|
# FreeBSD supports xattr, but its API is different from Linux xattr.
|
|
|
|
|
# FIXME: extattr(2) support: https://gitlab.gnome.org/GNOME/glib/issues/1404
|
2021-03-10 18:47:18 +01:00
|
|
|
|
# localstatedir is needed for access to /var/lib/dbus/machine-id
|
meson: simplify iconv lookups using Meson's builtin dependency lookup
iconv is complicated to look up. That complexity now resides in
Meson, since 0.60.0, via a `dependency('iconv')` lookup, so use that
instead.
No effort is made to support the old option for which type of iconv to
use. It was a false choice, because if only one was available, then
that's the only one you can use, and if both are available, the external
iconv shadows the builtin one and renders the builtin one unusable,
so there is still only one you can use.
This meant that when configuring glib with -Diconv=libc on systems that
had an external iconv, the configure check would detect a valid libc
iconv, try to use it, and then fail during the build because iconv.h
belongs to the external iconv and generates machine code using the
external iconv ABI, but fails to link to the iconv `find_library()`.
Meson handles this transparently.
2022-06-07 22:14:04 +02:00
|
|
|
|
- meson ${MESON_COMMON_OPTIONS} --localstatedir=/var -Db_lundef=false -Dxattr=false _build
|
2018-05-24 17:14:25 +02:00
|
|
|
|
- ninja -C _build
|
2019-04-05 21:53:11 +02:00
|
|
|
|
- bash -x ./.gitlab-ci/run-tests.sh
|
2018-05-24 17:14:25 +02:00
|
|
|
|
artifacts:
|
2019-06-24 16:55:36 +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-06-24 16:55:36 +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-06-24 16:55:36 +02:00
|
|
|
|
paths:
|
|
|
|
|
- "_build/config.h"
|
|
|
|
|
- "_build/glib/glibconfig.h"
|
|
|
|
|
- "_build/meson-logs"
|
|
|
|
|
|
2021-09-02 19:53:26 +02:00
|
|
|
|
freebsd-13-x86_64:
|
2023-02-06 15:58:47 +01:00
|
|
|
|
extends: .only-origin
|
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:
|
meson: simplify iconv lookups using Meson's builtin dependency lookup
iconv is complicated to look up. That complexity now resides in
Meson, since 0.60.0, via a `dependency('iconv')` lookup, so use that
instead.
No effort is made to support the old option for which type of iconv to
use. It was a false choice, because if only one was available, then
that's the only one you can use, and if both are available, the external
iconv shadows the builtin one and renders the builtin one unusable,
so there is still only one you can use.
This meant that when configuring glib with -Diconv=libc on systems that
had an external iconv, the configure check would detect a valid libc
iconv, try to use it, and then fail during the build because iconv.h
belongs to the external iconv and generates machine code using the
external iconv ABI, but fails to link to the iconv `find_library()`.
Meson handles this transparently.
2022-06-07 22:14:04 +02:00
|
|
|
|
- meson ${MESON_COMMON_OPTIONS} --localstatedir=/var -Db_lundef=false -Dxattr=false _build
|
2019-06-24 16:55:36 +02:00
|
|
|
|
- ninja -C _build
|
|
|
|
|
- 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"
|
|
|
|
|
|
2021-02-12 20:41:11 +01:00
|
|
|
|
macos:
|
2022-02-20 13:44:45 +01:00
|
|
|
|
extends: .only-origin
|
2019-12-10 13:45:51 +01:00
|
|
|
|
stage: build
|
|
|
|
|
tags:
|
|
|
|
|
- macos
|
2020-07-27 13:00:57 +02:00
|
|
|
|
needs: []
|
2022-06-30 02:31:02 +02:00
|
|
|
|
variables:
|
|
|
|
|
GIT_SUBMODULE_STRATEGY: normal
|
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
|
|
|
|
|
CFLAGS: '-Wno-overlength-strings'
|
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
|
2022-11-24 13:10:07 +01:00
|
|
|
|
- pip3 install --user meson==0.60.1
|
2019-12-10 13:45:51 +01:00
|
|
|
|
- pip3 install --user ninja
|
|
|
|
|
- export PATH=/Users/gitlabrunner/Library/Python/3.7/bin:$PATH
|
|
|
|
|
script:
|
2020-01-20 16:30:44 +01:00
|
|
|
|
# FIXME: Use --wrap-mode=default so we download dependencies each time,
|
|
|
|
|
# until the macOS runner is a VM where we can use a pre-made image which
|
|
|
|
|
# already contains the dependencies. See:
|
|
|
|
|
# - https://gitlab.gnome.org/GNOME/glib/merge_requests/388
|
|
|
|
|
# - https://gitlab.gnome.org/Infrastructure/Infrastructure/issues/225
|
2019-12-10 13:45:51 +01:00
|
|
|
|
- meson ${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
|
|
|
|
|
- ninja -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
|
2022-02-20 13:30:19 +01:00
|
|
|
|
- .only-schedules
|
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: []
|
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:
|
|
|
|
|
- meson ${MESON_COMMON_OPTIONS}
|
|
|
|
|
--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
|
|
|
|
|
-Dsystemtap=true
|
|
|
|
|
-Ddtrace=true
|
|
|
|
|
-Dinstalled_tests=true
|
2019-06-12 15:31:42 +02:00
|
|
|
|
_scan_build
|
|
|
|
|
- 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
|
|
|
|
|
2020-07-27 13:39:24 +02:00
|
|
|
|
coverity:
|
2022-02-20 13:30:19 +01:00
|
|
|
|
extends:
|
2022-02-20 13:33:09 +01:00
|
|
|
|
- .build-linux
|
2022-02-20 13:30:19 +01:00
|
|
|
|
- .only-schedules
|
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'
|
|
|
|
|
script:
|
|
|
|
|
- meson ${MESON_COMMON_OPTIONS}
|
|
|
|
|
--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
|
|
|
|
|
-Dsystemtap=true
|
|
|
|
|
-Ddtrace=true
|
|
|
|
|
-Dinstalled_tests=true
|
|
|
|
|
_coverity_build
|
|
|
|
|
- $HOME/cov-analysis-linux64-*/bin/cov-build --dir cov-int ninja -C _coverity_build
|
|
|
|
|
- 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:
|
|
|
|
|
stage: deploy
|
2018-06-05 19:39:26 +02:00
|
|
|
|
only:
|
2021-06-07 14:18:19 +02:00
|
|
|
|
- main
|
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
|
2022-05-05 20:24:30 +02:00
|
|
|
|
- meson ${MESON_COMMON_OPTIONS} --buildtype release -Dgtk_doc=true -Dman=true _build
|
2018-02-18 15:59:29 +01:00
|
|
|
|
- cd _build
|
|
|
|
|
- ninja dist
|
2018-06-18 15:47:39 +02:00
|
|
|
|
- ninja glib-doc gobject-doc gio-doc
|
2020-04-28 14:36:29 +02:00
|
|
|
|
- tar -c -J -f "glib-docs-$CI_COMMIT_TAG.tar.xz" -C docs/reference/glib html
|
|
|
|
|
- tar -c -J -f "gobject-docs-$CI_COMMIT_TAG.tar.xz" -C docs/reference/gobject html
|
|
|
|
|
- tar -c -J -f "gio-docs-$CI_COMMIT_TAG.tar.xz" -C docs/reference/gio html
|
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"
|
|
|
|
|
- "${CI_PROJECT_DIR}/_build/gobject-docs-$CI_COMMIT_TAG.tar.xz"
|
|
|
|
|
- "${CI_PROJECT_DIR}/_build/gio-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
|