2020-02-05 18:03:25 +00:00
|
|
|
include:
|
|
|
|
- local: '.gitlab-ci/libfprint-templates.yaml'
|
|
|
|
- project: 'wayland/ci-templates'
|
|
|
|
ref: master
|
|
|
|
file: '/templates/fedora.yml'
|
2020-09-02 14:27:53 +00:00
|
|
|
- remote: 'https://gitlab.gnome.org/GNOME/citemplates/-/raw/master/flatpak/flatpak_ci_initiative.yml'
|
2020-02-05 18:03:25 +00:00
|
|
|
|
2019-12-05 12:56:12 +00:00
|
|
|
variables:
|
2020-02-05 18:03:25 +00:00
|
|
|
extends: .libfprint_common_variables
|
2020-03-20 09:50:43 +00:00
|
|
|
FDO_DISTRIBUTION_TAG: latest
|
|
|
|
FDO_DISTRIBUTION_VERSION: rawhide
|
|
|
|
FEDORA_IMAGE: "$CI_REGISTRY/libfprint/$CI_PROJECT_NAME/fedora/$FDO_DISTRIBUTION_VERSION:$FDO_DISTRIBUTION_TAG"
|
2019-12-05 12:56:12 +00:00
|
|
|
BUNDLE: "org.freedesktop.libfprint.Demo.flatpak"
|
|
|
|
LAST_ABI_BREAK: "056ea541ddc97f5806cffbd99a12dc87e4da3546"
|
|
|
|
|
2018-05-31 10:18:17 +00:00
|
|
|
stages:
|
2019-11-25 18:08:31 +00:00
|
|
|
- check-source
|
2018-05-31 10:18:17 +00:00
|
|
|
- build
|
2018-10-23 08:37:44 +00:00
|
|
|
- test
|
2020-03-13 09:07:54 +00:00
|
|
|
- flatpak
|
2018-05-31 10:18:17 +00:00
|
|
|
|
2019-12-05 12:56:12 +00:00
|
|
|
image: "$FEDORA_IMAGE"
|
2018-05-31 10:18:17 +00:00
|
|
|
|
2018-10-23 08:37:44 +00:00
|
|
|
.build_one_driver_template: &build_one_driver
|
2018-05-31 10:18:17 +00:00
|
|
|
script:
|
2018-09-28 13:55:56 +00:00
|
|
|
# Build with a driver that doesn't need imaging, or nss
|
2019-12-04 13:28:12 +00:00
|
|
|
- meson --werror -Ddrivers=$driver . _build
|
2018-09-28 13:55:56 +00:00
|
|
|
- ninja -C _build
|
2018-10-08 14:50:30 +00:00
|
|
|
- rm -rf _build/
|
2018-10-23 08:37:44 +00:00
|
|
|
|
|
|
|
.build_template: &build
|
|
|
|
script:
|
2018-09-28 13:55:56 +00:00
|
|
|
# And build with everything
|
2019-12-04 13:28:12 +00:00
|
|
|
- meson --werror -Ddrivers=all . _build
|
2018-05-31 10:18:17 +00:00
|
|
|
- ninja -C _build
|
|
|
|
- ninja -C _build install
|
|
|
|
|
2019-08-05 17:18:43 +00:00
|
|
|
.build_template: &check_abi
|
|
|
|
script:
|
|
|
|
- ./.ci/check-abi ${LAST_ABI_BREAK} $(git rev-parse HEAD)
|
|
|
|
|
2018-10-23 08:37:44 +00:00
|
|
|
build:
|
|
|
|
stage: build
|
2019-12-05 12:58:39 +00:00
|
|
|
except:
|
|
|
|
variables:
|
|
|
|
- $CI_PIPELINE_SOURCE == "schedule"
|
2019-07-01 15:31:57 +00:00
|
|
|
variables:
|
|
|
|
driver: virtual_image
|
2018-10-23 08:37:44 +00:00
|
|
|
<<: *build_one_driver
|
|
|
|
<<: *build
|
2019-08-16 07:33:57 +00:00
|
|
|
# <<: *check_abi
|
2020-05-11 17:09:33 +00:00
|
|
|
artifacts:
|
|
|
|
expose_as: "HTML Documentation"
|
|
|
|
paths:
|
2021-04-09 20:33:27 +00:00
|
|
|
- _build/doc/html
|
|
|
|
- _build/doc/html/index.html
|
2020-05-11 17:09:33 +00:00
|
|
|
expire_in: 1 week
|
2018-10-23 08:37:44 +00:00
|
|
|
|
2019-07-01 15:31:57 +00:00
|
|
|
test:
|
|
|
|
stage: test
|
2019-12-05 12:58:39 +00:00
|
|
|
except:
|
|
|
|
variables:
|
|
|
|
- $CI_PIPELINE_SOURCE == "schedule"
|
2019-07-01 15:31:57 +00:00
|
|
|
script:
|
2020-09-29 09:04:40 +00:00
|
|
|
- meson --werror -Ddrivers=all -Db_coverage=true -Dsdcp_virt_binary=/usr/local/bin/sdcp_virt_device . _build
|
2019-07-01 15:31:57 +00:00
|
|
|
- ninja -C _build
|
2021-04-01 16:01:29 +00:00
|
|
|
- meson test -C _build --print-errorlogs --no-stdsplit --timeout-multiplier 3
|
2019-12-12 17:47:31 +00:00
|
|
|
- ninja -C _build coverage
|
2020-03-26 23:00:07 +00:00
|
|
|
- cat _build/meson-logs/coverage.txt
|
2019-12-12 17:47:31 +00:00
|
|
|
artifacts:
|
2021-04-09 20:33:27 +00:00
|
|
|
expose_as: 'Coverage Report'
|
2019-12-12 17:47:31 +00:00
|
|
|
paths:
|
|
|
|
- _build/meson-logs
|
2021-04-09 20:33:27 +00:00
|
|
|
- _build/meson-logs/coveragereport/index.html
|
2019-12-12 17:47:31 +00:00
|
|
|
expire_in: 1 week
|
2020-05-13 15:47:34 +00:00
|
|
|
coverage: '/^TOTAL.*\s+(\d+\%)$/'
|
2019-07-01 15:31:57 +00:00
|
|
|
|
2019-11-26 18:17:26 +00:00
|
|
|
test_valgrind:
|
|
|
|
stage: test
|
2019-12-05 12:58:39 +00:00
|
|
|
except:
|
|
|
|
variables:
|
|
|
|
- $CI_PIPELINE_SOURCE == "schedule"
|
2019-11-26 18:17:26 +00:00
|
|
|
script:
|
2020-09-29 09:04:40 +00:00
|
|
|
- meson -Ddrivers=all -Dsdcp_virt_binary=/usr/local/bin/sdcp_virt_device . _build
|
2019-11-26 18:17:26 +00:00
|
|
|
- ninja -C _build
|
2021-04-01 16:01:29 +00:00
|
|
|
- meson test -C _build --print-errorlogs --no-stdsplit --setup=valgrind
|
2021-04-13 15:19:06 +00:00
|
|
|
artifacts:
|
|
|
|
expose_as: 'Valgrind test logs'
|
|
|
|
paths:
|
|
|
|
- _build/meson-logs
|
|
|
|
- _build/meson-logs/testlog-valgrind.txt
|
|
|
|
expire_in: 1 week
|
|
|
|
|
2019-11-26 18:17:26 +00:00
|
|
|
|
2020-05-04 12:16:06 +00:00
|
|
|
test_scan_build:
|
|
|
|
stage: test
|
|
|
|
except:
|
|
|
|
variables:
|
|
|
|
- $CI_PIPELINE_SOURCE == "schedule"
|
|
|
|
allow_failure: true
|
|
|
|
script:
|
|
|
|
- meson -Ddrivers=all . _build
|
2021-06-22 17:54:42 +00:00
|
|
|
# Wrapper to add --status-bugs and disable malloc checker
|
2020-05-04 12:16:06 +00:00
|
|
|
- SCANBUILD=$CI_PROJECT_DIR/.gitlab-ci/scan-build ninja -C _build scan-build
|
|
|
|
artifacts:
|
|
|
|
paths:
|
|
|
|
- _build/meson-logs
|
|
|
|
expire_in: 1 week
|
|
|
|
|
2019-11-19 15:32:46 +00:00
|
|
|
test_indent:
|
2019-11-25 18:08:31 +00:00
|
|
|
stage: check-source
|
2019-12-05 12:58:39 +00:00
|
|
|
except:
|
|
|
|
variables:
|
|
|
|
- $CI_PIPELINE_SOURCE == "schedule"
|
2019-11-19 15:32:46 +00:00
|
|
|
script:
|
2020-06-02 10:28:09 +00:00
|
|
|
- scripts/uncrustify.sh
|
|
|
|
- git diff
|
|
|
|
- "! git status -s | grep -q ."
|
2019-11-19 15:32:46 +00:00
|
|
|
|
2021-01-19 14:55:56 +00:00
|
|
|
test_unsupported_list:
|
|
|
|
stage: check-source
|
|
|
|
except:
|
|
|
|
variables:
|
|
|
|
- $CI_PIPELINE_SOURCE == "schedule"
|
|
|
|
allow_failure: true
|
|
|
|
script:
|
|
|
|
- tests/hwdb-check-unsupported.py
|
|
|
|
|
2020-09-14 11:47:10 +00:00
|
|
|
flatpak:
|
2020-09-02 14:27:53 +00:00
|
|
|
stage: flatpak
|
|
|
|
extends: .flatpak
|
|
|
|
image: registry.gitlab.gnome.org/gnome/gnome-runtime-images/gnome:3.36
|
|
|
|
variables:
|
|
|
|
MANIFEST_PATH: "demo/org.freedesktop.libfprint.Demo.json"
|
|
|
|
FLATPAK_MODULE: "libfprint"
|
|
|
|
APP_ID: "org.freedesktop.libfprint.Demo"
|
2020-09-14 11:47:10 +00:00
|
|
|
rules:
|
|
|
|
- if: '$CI_PROJECT_PATH != "libfprint/libfprint"'
|
|
|
|
when: never
|
|
|
|
- if: '$CI_PIPELINE_SOURCE == "schedule"'
|
|
|
|
when: never
|
|
|
|
- if: '$CI_COMMIT_BRANCH == "master"'
|
|
|
|
when: always
|
|
|
|
- if: '$CI_COMMIT_TAG'
|
|
|
|
when: always
|
|
|
|
# For any other (commit), allow manual run.
|
|
|
|
# This excludes MRs which would create a duplicate pipeline
|
|
|
|
- if: '$CI_COMMIT_BRANCH'
|
|
|
|
when: manual
|
|
|
|
allow_failure: true
|
2019-12-05 13:23:35 +00:00
|
|
|
|
|
|
|
# CONTAINERS creation stage
|
2020-03-20 10:15:16 +00:00
|
|
|
container_fedora_build:
|
2020-03-20 09:50:43 +00:00
|
|
|
extends: .fdo.container-build@fedora
|
2019-12-05 13:23:35 +00:00
|
|
|
only:
|
|
|
|
variables:
|
|
|
|
- $CI_PIPELINE_SOURCE == "schedule" && $CRON_TASK == "BUILD_CI_IMAGES"
|
|
|
|
variables:
|
|
|
|
GIT_STRATEGY: none # no need to pull the whole tree for rebuilding the image
|
|
|
|
# a list of packages to install
|
2021-06-16 08:52:29 +00:00
|
|
|
FDO_DISTRIBUTION_PACKAGES:
|
|
|
|
$LIBFPRINT_DEPENDENCIES
|
|
|
|
vala
|
|
|
|
libpcap-devel
|
|
|
|
libudev-devel
|
2020-09-29 10:54:15 +00:00
|
|
|
mbedtls-devel
|
2021-06-16 08:52:29 +00:00
|
|
|
FDO_DISTRIBUTION_EXEC: |
|
|
|
|
git clone https://github.com/martinpitt/umockdev.git && \
|
|
|
|
cd umockdev && \
|
|
|
|
meson _build --prefix=/usr && \
|
|
|
|
ninja -C _build && ninja -C _build install
|
2020-09-29 10:54:15 +00:00
|
|
|
cd /tmp
|
|
|
|
mkdir -p /usr/local/bin
|
|
|
|
git clone https://github.com/benzea/SecureDeviceConnectionProtocol.git
|
|
|
|
# Don't bother with cmake
|
|
|
|
gcc -l mbedcrypto -I SecureDeviceConnectionProtocol/src/include \
|
|
|
|
SecureDeviceConnectionProtocol/src/test/virt_device.c \
|
|
|
|
SecureDeviceConnectionProtocol/src/client/client.c \
|
|
|
|
SecureDeviceConnectionProtocol/src/test/helpers.c \
|
|
|
|
SecureDeviceConnectionProtocol/src/test/testkeys.c \
|
|
|
|
-o /usr/local/bin/sdcp_virt_device
|
|
|
|
rm -rf SecureDeviceConnectionProtocol
|