mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-13 07:56:17 +01:00
ci: Factor out only/except properties from jobs
We can use a template to factor these out and make things a bit more maintainable. This should introduce no functional changes. Signed-off-by: Philip Withnall <withnall@endlessm.com>
This commit is contained in:
parent
efa7fa0375
commit
3156ea5be7
@ -14,6 +14,12 @@ variables:
|
||||
G_MESSAGES_DEBUG: all
|
||||
MESON_COMMON_OPTIONS: "--buildtype debug --fatal-meson-warnings"
|
||||
|
||||
.only-default: &only-default
|
||||
only:
|
||||
- branches
|
||||
except:
|
||||
- tags
|
||||
|
||||
style-check-diff:
|
||||
image: registry.gitlab.gnome.org/gnome/glib/debian-stable:v5
|
||||
stage: style-check
|
||||
@ -24,10 +30,9 @@ style-check-diff:
|
||||
- git diff -U0 --no-color ${CI_MERGE_REQUEST_TARGET_BRANCH_SHA} | ./clang-format-diff.py -binary "clang-format-7" -p1
|
||||
|
||||
fedora-x86_64:
|
||||
<<: *only-default
|
||||
image: registry.gitlab.gnome.org/gnome/glib/fedora:v4
|
||||
stage: build
|
||||
except:
|
||||
- tags
|
||||
variables:
|
||||
CFLAGS: "-coverage -ftest-coverage -fprofile-arcs"
|
||||
script:
|
||||
@ -65,10 +70,9 @@ fedora-x86_64:
|
||||
- "_coverage"
|
||||
|
||||
debian-stable-x86_64:
|
||||
<<: *only-default
|
||||
image: registry.gitlab.gnome.org/gnome/glib/debian-stable:v5
|
||||
stage: build
|
||||
except:
|
||||
- tags
|
||||
script:
|
||||
- meson ${MESON_COMMON_OPTIONS}
|
||||
--werror
|
||||
@ -94,10 +98,9 @@ debian-stable-x86_64:
|
||||
- "_build/${CI_JOB_NAME}-report.xml"
|
||||
|
||||
G_DISABLE_ASSERT:
|
||||
<<: *only-default
|
||||
image: registry.gitlab.gnome.org/gnome/glib/fedora:v4
|
||||
stage: build
|
||||
except:
|
||||
- tags
|
||||
variables:
|
||||
CPPFLAGS: "-DG_DISABLE_ASSERT"
|
||||
script:
|
||||
@ -122,10 +125,9 @@ G_DISABLE_ASSERT:
|
||||
- "_build/${CI_JOB_NAME}-report.xml"
|
||||
|
||||
valgrind:
|
||||
<<: *only-default
|
||||
image: registry.gitlab.gnome.org/gnome/glib/fedora:v4
|
||||
stage: analysis
|
||||
except:
|
||||
- tags
|
||||
variables:
|
||||
MESON_TEST_TIMEOUT_MULTIPLIER: 10
|
||||
script:
|
||||
@ -156,9 +158,8 @@ valgrind:
|
||||
- "_build/meson-logs"
|
||||
|
||||
.cross-template: &cross-template
|
||||
<<: *only-default
|
||||
stage: build
|
||||
except:
|
||||
- tags
|
||||
artifacts:
|
||||
name: "glib-${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}"
|
||||
when: always
|
||||
@ -192,9 +193,8 @@ cross-mingw64:
|
||||
- ninja -C _build
|
||||
|
||||
msys2-mingw32:
|
||||
<<: *only-default
|
||||
stage: build
|
||||
except:
|
||||
- tags
|
||||
tags:
|
||||
- win32
|
||||
variables:
|
||||
@ -214,9 +214,8 @@ msys2-mingw32:
|
||||
- _coverage/
|
||||
|
||||
vs2017-x64:
|
||||
<<: *only-default
|
||||
stage: build
|
||||
except:
|
||||
- tags
|
||||
tags:
|
||||
- win32
|
||||
script:
|
||||
@ -258,8 +257,6 @@ freebsd-11-x86_64:
|
||||
- meson ${MESON_COMMON_OPTIONS} -Db_lundef=false -Diconv=external -Dxattr=false _build
|
||||
- ninja -C _build
|
||||
- bash -x ./.gitlab-ci/run-tests.sh
|
||||
except:
|
||||
- tags
|
||||
artifacts:
|
||||
reports:
|
||||
junit: "_build/${CI_JOB_NAME}-report.xml"
|
||||
@ -299,10 +296,9 @@ freebsd-12-x86_64:
|
||||
- "_build/${CI_JOB_NAME}-report.xml"
|
||||
|
||||
coverage:
|
||||
<<: *only-default
|
||||
image: registry.gitlab.gnome.org/gnome/glib/fedora:v4
|
||||
stage: coverage
|
||||
except:
|
||||
- tags
|
||||
artifacts:
|
||||
name: "glib-${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}"
|
||||
paths:
|
||||
@ -312,10 +308,9 @@ coverage:
|
||||
coverage: '/^\s+lines\.+:\s+([\d.]+\%)\s+/'
|
||||
|
||||
scan-build:
|
||||
<<: *only-default
|
||||
image: registry.gitlab.gnome.org/gnome/glib/fedora:v4
|
||||
stage: analysis
|
||||
except:
|
||||
- tags
|
||||
script:
|
||||
- meson ${MESON_COMMON_OPTIONS}
|
||||
--werror
|
||||
|
Loading…
Reference in New Issue
Block a user