mirror of
https://gitlab.gnome.org/GNOME/libsecret.git
synced 2025-01-10 22:18:52 +00:00
Merge branch 'wip/dueno/gitlab-ci' into 'master'
build: Enable gitlab-ci See merge request GNOME/libsecret!1
This commit is contained in:
commit
d5788bd015
76
.gitlab-ci.yml
Normal file
76
.gitlab-ci.yml
Normal file
@ -0,0 +1,76 @@
|
||||
stages:
|
||||
- build
|
||||
- deploy
|
||||
|
||||
variables:
|
||||
DEPENDENCIES: dbus-x11 gcc gjs make python3-dbus python3-gobject redhat-rpm-config
|
||||
|
||||
fedora:Werror:
|
||||
image: fedora:rawhide
|
||||
stage: build
|
||||
before_script:
|
||||
- dnf install -y 'dnf-command(builddep)'
|
||||
- dnf builddep -y libsecret
|
||||
- dnf install -y $DEPENDENCIES
|
||||
- dbus-uuidgen --ensure
|
||||
script:
|
||||
- ./autogen.sh --disable-dependency-tracking --enable-strict
|
||||
- make -j$(nproc) V=1
|
||||
- eval `dbus-launch --sh-syntax`
|
||||
- make -j$(nproc) V=1 distcheck
|
||||
|
||||
fedora:asan:
|
||||
image: fedora:rawhide
|
||||
stage: build
|
||||
before_script:
|
||||
- dnf install -y 'dnf-command(builddep)'
|
||||
- dnf builddep -y libsecret
|
||||
- dnf install -y $DEPENDENCIES libasan
|
||||
- dbus-uuidgen --ensure
|
||||
script:
|
||||
- ./autogen.sh --disable-dependency-tracking CFLAGS='-fsanitize=address -g -fno-common -U_FORTIFY_SOURCE' CXXFLAGS='-fsanitize=address -g -fno-common -U_FORTIFY_SOURCE' LDFLAGS='-fsanitize=address -g -fno-common -U_FORTIFY_SOURCE' LIBS='-lasan -ldl -lpthread'
|
||||
- make -j$(nproc) V=1
|
||||
- eval `dbus-launch --sh-syntax`
|
||||
- make -j$(nproc) V=1 DISABLE_HARD_ERRORS=1 XFAIL_TESTS="\$(JS_TESTS) \$(PY_TESTS)"
|
||||
|
||||
fedora:ubsan:
|
||||
image: fedora:rawhide
|
||||
stage: build
|
||||
before_script:
|
||||
- dnf install -y 'dnf-command(builddep)'
|
||||
- dnf builddep -y libsecret
|
||||
- dnf install -y $DEPENDENCIES libubsan
|
||||
- dbus-uuidgen --ensure
|
||||
script:
|
||||
- ./autogen.sh --disable-dependency-tracking CFLAGS='-fsanitize=undefined -g -fno-common -U_FORTIFY_SOURCE' CXXFLAGS='-fsanitize=undefined -g -fno-common -U_FORTIFY_SOURCE' LDFLAGS='-fsanitize=undefined -g -fno-common -U_FORTIFY_SOURCE' LIBS='-lubsan -ldl -lpthread'
|
||||
- make -j$(nproc) V=1
|
||||
- eval `dbus-launch --sh-syntax`
|
||||
- make -j$(nproc) V=1 check
|
||||
|
||||
fedora:coverage:
|
||||
image: fedora:rawhide
|
||||
stage: build
|
||||
before_script:
|
||||
- dnf install -y 'dnf-command(builddep)'
|
||||
- dnf builddep -y libsecret
|
||||
- dnf install -y $DEPENDENCIES lcov
|
||||
- dbus-uuidgen --ensure
|
||||
script:
|
||||
- ./autogen.sh --disable-dependency-tracking --enable-coverage
|
||||
- make -j$(nproc) V=1
|
||||
- eval `dbus-launch --sh-syntax`
|
||||
- make -j$(nproc) V=1 check
|
||||
- make coverage
|
||||
coverage: '/^\s+lines.+:\s+([\d.]+\%)\s+/'
|
||||
artifacts:
|
||||
name: "libsecret-${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}"
|
||||
paths:
|
||||
- build/coverage/
|
||||
|
||||
pages:
|
||||
stage: deploy
|
||||
script:
|
||||
- mv build/coverage/ public/
|
||||
artifacts:
|
||||
paths:
|
||||
- public
|
@ -43,6 +43,7 @@ class Driver:
|
||||
self.trs = open(args.trs_file, "w")
|
||||
self.color_tests = args.color_tests
|
||||
self.expect_failure = args.expect_failure
|
||||
self.enable_hard_errors = args.enable_hard_errors
|
||||
|
||||
def report(self, code, *args):
|
||||
CODES = {
|
||||
@ -92,7 +93,10 @@ class Driver:
|
||||
self.report("SKIP", *args)
|
||||
|
||||
def report_error(self, description=""):
|
||||
self.report("ERROR", "", description)
|
||||
if self.enable_hard_errors:
|
||||
self.report("ERROR", "", description)
|
||||
else:
|
||||
self.result_fail(description)
|
||||
|
||||
def process(self, output):
|
||||
pass
|
||||
|
@ -39,16 +39,6 @@ static const SecretSchema MOCK_SCHEMA = {
|
||||
}
|
||||
};
|
||||
|
||||
static const SecretSchema PRIME_SCHEMA = {
|
||||
"org.mock.Prime",
|
||||
SECRET_SCHEMA_NONE,
|
||||
{
|
||||
{ "number", SECRET_SCHEMA_ATTRIBUTE_INTEGER },
|
||||
{ "string", SECRET_SCHEMA_ATTRIBUTE_STRING },
|
||||
{ "prime", SECRET_SCHEMA_ATTRIBUTE_BOOLEAN },
|
||||
}
|
||||
};
|
||||
|
||||
static const SecretSchema NO_NAME_SCHEMA = {
|
||||
"unused.Schema.Name",
|
||||
SECRET_SCHEMA_DONT_MATCH_NAME,
|
||||
|
@ -37,16 +37,6 @@ static const SecretSchema MOCK_SCHEMA = {
|
||||
}
|
||||
};
|
||||
|
||||
static const SecretSchema PRIME_SCHEMA = {
|
||||
"org.mock.Prime",
|
||||
SECRET_SCHEMA_NONE,
|
||||
{
|
||||
{ "number", SECRET_SCHEMA_ATTRIBUTE_INTEGER },
|
||||
{ "string", SECRET_SCHEMA_ATTRIBUTE_STRING },
|
||||
{ "prime", SECRET_SCHEMA_ATTRIBUTE_BOOLEAN },
|
||||
}
|
||||
};
|
||||
|
||||
static const SecretSchema NO_NAME_SCHEMA = {
|
||||
"unused.Schema.Name",
|
||||
SECRET_SCHEMA_DONT_MATCH_NAME,
|
||||
|
@ -39,25 +39,6 @@ static const SecretSchema MOCK_SCHEMA = {
|
||||
}
|
||||
};
|
||||
|
||||
static const SecretSchema PRIME_SCHEMA = {
|
||||
"org.mock.Prime",
|
||||
SECRET_SCHEMA_NONE,
|
||||
{
|
||||
{ "number", SECRET_SCHEMA_ATTRIBUTE_INTEGER },
|
||||
{ "string", SECRET_SCHEMA_ATTRIBUTE_STRING },
|
||||
{ "prime", SECRET_SCHEMA_ATTRIBUTE_BOOLEAN },
|
||||
}
|
||||
};
|
||||
|
||||
static const SecretSchema NO_NAME_SCHEMA = {
|
||||
"unused.Schema.Name",
|
||||
SECRET_SCHEMA_DONT_MATCH_NAME,
|
||||
{
|
||||
{ "number", SECRET_SCHEMA_ATTRIBUTE_INTEGER },
|
||||
{ "string", SECRET_SCHEMA_ATTRIBUTE_STRING },
|
||||
}
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
SecretService *service;
|
||||
} Test;
|
||||
|
Loading…
Reference in New Issue
Block a user