2023-11-27 23:20:44 +00:00
|
|
|
image: registry.gitlab.gnome.org/gnome/libsecret/master:v3
|
2023-01-14 21:35:41 +00:00
|
|
|
|
2018-06-01 10:42:48 +00:00
|
|
|
stages:
|
|
|
|
- build
|
|
|
|
- deploy
|
|
|
|
|
|
|
|
variables:
|
2021-03-10 15:40:40 +00:00
|
|
|
CPPCHECK_OPTIONS: "--enable=warning --enable=style --enable=performance --enable=portability --std=c99 --template='{id}:{file}:{line},{severity},{message}'"
|
2018-06-01 10:42:48 +00:00
|
|
|
|
2023-11-27 23:20:44 +00:00
|
|
|
.build:
|
|
|
|
parallel:
|
|
|
|
matrix:
|
|
|
|
- CRYPTO: libgcrypt
|
|
|
|
- CRYPTO: gnutls
|
|
|
|
- CRYPTO: disabled
|
|
|
|
|
2018-06-01 10:42:48 +00:00
|
|
|
fedora:Werror:
|
|
|
|
stage: build
|
2023-11-27 23:20:44 +00:00
|
|
|
extends:
|
|
|
|
- .build
|
2018-06-01 10:42:48 +00:00
|
|
|
before_script:
|
|
|
|
- dbus-uuidgen --ensure
|
|
|
|
script:
|
2023-11-27 23:20:44 +00:00
|
|
|
- meson _build -Dwerror=true -Dc_args=-Wno-error=deprecated-declarations -Dgtk_doc=false -Dcrypto=$CRYPTO
|
2021-08-04 08:39:38 +00:00
|
|
|
- meson compile -C _build
|
2021-08-12 17:18:47 +00:00
|
|
|
- eval `dbus-launch --sh-syntax`
|
2023-09-18 11:42:11 +00:00
|
|
|
- meson test -C _build --print-errorlogs
|
2020-03-10 12:53:44 +00:00
|
|
|
artifacts:
|
|
|
|
when: on_failure
|
|
|
|
paths:
|
|
|
|
- _build/meson-logs/testlog.txt
|
2018-06-01 10:42:48 +00:00
|
|
|
|
|
|
|
fedora:asan:
|
|
|
|
stage: build
|
2023-11-27 23:20:44 +00:00
|
|
|
extends:
|
|
|
|
- .build
|
2018-06-01 10:42:48 +00:00
|
|
|
before_script:
|
|
|
|
- dbus-uuidgen --ensure
|
|
|
|
script:
|
2023-10-18 07:08:58 +00:00
|
|
|
- export LSAN_OPTIONS=suppressions=$PWD/build/lsan.supp
|
2023-11-27 23:20:44 +00:00
|
|
|
- meson _build -Db_sanitize=address -Dgtk_doc=false -Dintrospection=false -Dcrypto=$CRYPTO
|
2021-08-04 08:39:38 +00:00
|
|
|
- meson compile -C _build
|
2018-06-01 10:42:48 +00:00
|
|
|
- eval `dbus-launch --sh-syntax`
|
2023-09-18 11:42:11 +00:00
|
|
|
- meson test -C _build --print-errorlogs
|
2020-03-10 12:53:44 +00:00
|
|
|
artifacts:
|
|
|
|
when: on_failure
|
|
|
|
paths:
|
|
|
|
- _build/meson-logs/testlog.txt
|
2018-06-01 10:42:48 +00:00
|
|
|
|
|
|
|
fedora:ubsan:
|
|
|
|
stage: build
|
2023-11-27 23:20:44 +00:00
|
|
|
extends:
|
|
|
|
- .build
|
2018-06-01 10:42:48 +00:00
|
|
|
before_script:
|
|
|
|
- dbus-uuidgen --ensure
|
|
|
|
script:
|
2023-11-27 23:20:44 +00:00
|
|
|
- meson _build -Db_sanitize=undefined -Dgtk_doc=false -Dcrypto=$CRYPTO
|
2021-08-04 08:39:38 +00:00
|
|
|
- meson compile -C _build
|
2018-06-01 10:42:48 +00:00
|
|
|
- eval `dbus-launch --sh-syntax`
|
2023-09-18 11:42:11 +00:00
|
|
|
- meson test -C _build --print-errorlogs
|
2020-03-10 12:53:44 +00:00
|
|
|
artifacts:
|
|
|
|
when: on_failure
|
|
|
|
paths:
|
|
|
|
- _build/meson-logs/testlog.txt
|
2018-06-01 10:42:48 +00:00
|
|
|
|
2021-03-10 15:40:40 +00:00
|
|
|
fedora-static-analyzers/test:
|
|
|
|
stage: build
|
2023-11-27 23:20:44 +00:00
|
|
|
extends:
|
|
|
|
- .build
|
2021-03-10 15:40:40 +00:00
|
|
|
before_script:
|
|
|
|
- dbus-uuidgen --ensure
|
|
|
|
script:
|
2023-11-27 23:20:44 +00:00
|
|
|
- meson _build -Dgtk_doc=false -Dcrypto=$CRYPTO
|
2021-03-10 15:40:40 +00:00
|
|
|
- meson compile -C _build --ninja-args scan-build
|
|
|
|
- cppcheck --force -q $CPPCHECK_OPTIONS libsecret/ egg/ tool/
|
|
|
|
artifacts:
|
|
|
|
when: on_failure
|
|
|
|
paths:
|
|
|
|
- _build/meson-logs/testlog.txt
|
|
|
|
|
2018-06-01 10:42:48 +00:00
|
|
|
fedora:coverage:
|
|
|
|
stage: build
|
|
|
|
before_script:
|
|
|
|
- dbus-uuidgen --ensure
|
|
|
|
script:
|
2022-02-02 12:19:14 +00:00
|
|
|
- meson _build -Db_coverage=true -Dtpm2=true -Dgtk_doc=false
|
2021-08-04 08:39:38 +00:00
|
|
|
- meson compile -C _build
|
2018-06-01 10:42:48 +00:00
|
|
|
- eval `dbus-launch --sh-syntax`
|
2021-08-12 17:18:47 +00:00
|
|
|
- export XDG_CONFIG_HOME=$HOME/.config
|
|
|
|
- /usr/share/swtpm/swtpm-create-user-config-files --root
|
|
|
|
- mkdir -p ${XDG_CONFIG_HOME}/mytpm1
|
|
|
|
- swtpm_setup --tpm2 --tpmstate $XDG_CONFIG_HOME/mytpm1 --createek --allow-signing --decryption --create-ek-cert --create-platform-cert --lock-nvram --overwrite --display
|
|
|
|
- swtpm socket --tpm2 --tpmstate dir=$XDG_CONFIG_HOME/mytpm1 --flags startup-clear --ctrl type=tcp,port=2322 --server type=tcp,port=2321 --daemon
|
|
|
|
- 'tpm2-abrmd --logger=stdout --tcti=swtpm: --session --allow-root --flush-all &'
|
|
|
|
- 'export TCTI=tabrmd:bus_type=session'
|
2023-09-18 11:42:11 +00:00
|
|
|
- meson test -C _build --print-errorlogs
|
2019-06-05 09:46:15 +00:00
|
|
|
- ninja coverage-html -C _build
|
2018-06-01 10:42:48 +00:00
|
|
|
coverage: '/^\s+lines.+:\s+([\d.]+\%)\s+/'
|
|
|
|
artifacts:
|
|
|
|
name: "libsecret-${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}"
|
2020-03-10 12:53:44 +00:00
|
|
|
when: on_success
|
2018-06-01 10:42:48 +00:00
|
|
|
paths:
|
2019-06-05 09:46:15 +00:00
|
|
|
- _build/meson-logs/coveragereport/
|
2019-06-09 06:27:03 +00:00
|
|
|
# https://github.com/linux-test-project/lcov/issues/58
|
|
|
|
allow_failure: true
|
2018-06-01 10:42:48 +00:00
|
|
|
|
2022-02-02 12:19:14 +00:00
|
|
|
reference:
|
|
|
|
stage: build
|
|
|
|
variables:
|
|
|
|
MESON_ARGS: >-
|
|
|
|
-Dgtk_doc=true
|
|
|
|
-Dvapi=false
|
|
|
|
-Dmanpage=false
|
|
|
|
script:
|
|
|
|
- meson ${MESON_ARGS} _build
|
|
|
|
- ninja -C _build
|
|
|
|
- mv _build/docs/reference/libsecret/libsecret-1 _reference
|
|
|
|
artifacts:
|
|
|
|
paths:
|
|
|
|
- _reference
|
|
|
|
|
2018-06-01 10:42:48 +00:00
|
|
|
pages:
|
|
|
|
stage: deploy
|
|
|
|
script:
|
2021-08-12 17:15:30 +00:00
|
|
|
- mkdir public
|
|
|
|
- mv _build/meson-logs/coveragereport public/coverage
|
2022-02-02 12:19:14 +00:00
|
|
|
- mv _reference/* public/
|
2018-06-01 10:42:48 +00:00
|
|
|
artifacts:
|
2019-06-09 07:31:03 +00:00
|
|
|
when: on_success
|
2018-06-01 10:42:48 +00:00
|
|
|
paths:
|
|
|
|
- public
|
2019-06-09 07:31:03 +00:00
|
|
|
# https://github.com/linux-test-project/lcov/issues/58
|
|
|
|
allow_failure: true
|