mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-03-28 02:20:04 +01:00
Merge branch 'ci-fixups' into 'master'
Minor CI fixups See merge request GNOME/glib!1258
This commit is contained in:
commit
9f6b5235e4
@ -14,24 +14,22 @@ variables:
|
|||||||
G_MESSAGES_DEBUG: all
|
G_MESSAGES_DEBUG: all
|
||||||
MESON_COMMON_OPTIONS: "--buildtype debug --fatal-meson-warnings"
|
MESON_COMMON_OPTIONS: "--buildtype debug --fatal-meson-warnings"
|
||||||
|
|
||||||
.only-default: &only-default
|
.only-default:
|
||||||
only:
|
only:
|
||||||
- branches
|
- branches
|
||||||
except:
|
except:
|
||||||
- tags
|
- tags
|
||||||
|
|
||||||
style-check-diff:
|
style-check-diff:
|
||||||
<<: *only-default
|
extends: .only-default
|
||||||
image: registry.gitlab.gnome.org/gnome/glib/debian-stable:v5
|
image: registry.gitlab.gnome.org/gnome/glib/debian-stable:v5
|
||||||
stage: style-check
|
stage: style-check
|
||||||
allow_failure: true
|
allow_failure: true
|
||||||
script:
|
script:
|
||||||
- git remote add upstream https://gitlab.gnome.org/GNOME/glib.git
|
- .gitlab-ci/run-style-check-diff.sh
|
||||||
- git fetch upstream
|
|
||||||
- git diff -U0 --no-color $(diff --old-line-format='' --new-line-format='' <(git rev-list --first-parent upstream/${CI_MERGE_REQUEST_TARGET_BRANCH_NAME:-${CI_DEFAULT_BRANCH}}) <(git rev-list --first-parent HEAD) | head -1) | ./clang-format-diff.py -binary "clang-format-7" -p1
|
|
||||||
|
|
||||||
fedora-x86_64:
|
fedora-x86_64:
|
||||||
<<: *only-default
|
extends: .only-default
|
||||||
image: registry.gitlab.gnome.org/gnome/glib/fedora:v5
|
image: registry.gitlab.gnome.org/gnome/glib/fedora:v5
|
||||||
stage: build
|
stage: build
|
||||||
variables:
|
variables:
|
||||||
@ -71,7 +69,7 @@ fedora-x86_64:
|
|||||||
- "_coverage"
|
- "_coverage"
|
||||||
|
|
||||||
debian-stable-x86_64:
|
debian-stable-x86_64:
|
||||||
<<: *only-default
|
extends: .only-default
|
||||||
image: registry.gitlab.gnome.org/gnome/glib/debian-stable:v5
|
image: registry.gitlab.gnome.org/gnome/glib/debian-stable:v5
|
||||||
stage: build
|
stage: build
|
||||||
script:
|
script:
|
||||||
@ -99,7 +97,7 @@ debian-stable-x86_64:
|
|||||||
- "_build/${CI_JOB_NAME}-report.xml"
|
- "_build/${CI_JOB_NAME}-report.xml"
|
||||||
|
|
||||||
G_DISABLE_ASSERT:
|
G_DISABLE_ASSERT:
|
||||||
<<: *only-default
|
extends: .only-default
|
||||||
image: registry.gitlab.gnome.org/gnome/glib/fedora:v5
|
image: registry.gitlab.gnome.org/gnome/glib/fedora:v5
|
||||||
stage: build
|
stage: build
|
||||||
variables:
|
variables:
|
||||||
@ -126,7 +124,7 @@ G_DISABLE_ASSERT:
|
|||||||
- "_build/${CI_JOB_NAME}-report.xml"
|
- "_build/${CI_JOB_NAME}-report.xml"
|
||||||
|
|
||||||
valgrind:
|
valgrind:
|
||||||
<<: *only-default
|
extends: .only-default
|
||||||
image: registry.gitlab.gnome.org/gnome/glib/fedora:v5
|
image: registry.gitlab.gnome.org/gnome/glib/fedora:v5
|
||||||
stage: analysis
|
stage: analysis
|
||||||
variables:
|
variables:
|
||||||
@ -159,7 +157,7 @@ valgrind:
|
|||||||
- "_build/meson-logs"
|
- "_build/meson-logs"
|
||||||
|
|
||||||
.cross-template: &cross-template
|
.cross-template: &cross-template
|
||||||
<<: *only-default
|
extends: .only-default
|
||||||
stage: build
|
stage: build
|
||||||
artifacts:
|
artifacts:
|
||||||
name: "glib-${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}"
|
name: "glib-${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}"
|
||||||
@ -194,7 +192,7 @@ cross-mingw64:
|
|||||||
- ninja -C _build
|
- ninja -C _build
|
||||||
|
|
||||||
msys2-mingw32:
|
msys2-mingw32:
|
||||||
<<: *only-default
|
extends: .only-default
|
||||||
stage: build
|
stage: build
|
||||||
tags:
|
tags:
|
||||||
- win32
|
- win32
|
||||||
@ -215,7 +213,7 @@ msys2-mingw32:
|
|||||||
- _coverage/
|
- _coverage/
|
||||||
|
|
||||||
vs2017-x64:
|
vs2017-x64:
|
||||||
<<: *only-default
|
extends: .only-default
|
||||||
stage: build
|
stage: build
|
||||||
tags:
|
tags:
|
||||||
- win32
|
- win32
|
||||||
@ -297,7 +295,7 @@ freebsd-12-x86_64:
|
|||||||
- "_build/${CI_JOB_NAME}-report.xml"
|
- "_build/${CI_JOB_NAME}-report.xml"
|
||||||
|
|
||||||
coverage:
|
coverage:
|
||||||
<<: *only-default
|
extends: .only-default
|
||||||
image: registry.gitlab.gnome.org/gnome/glib/fedora:v5
|
image: registry.gitlab.gnome.org/gnome/glib/fedora:v5
|
||||||
stage: coverage
|
stage: coverage
|
||||||
artifacts:
|
artifacts:
|
||||||
@ -309,7 +307,7 @@ coverage:
|
|||||||
coverage: '/^\s+lines\.+:\s+([\d.]+\%)\s+/'
|
coverage: '/^\s+lines\.+:\s+([\d.]+\%)\s+/'
|
||||||
|
|
||||||
scan-build:
|
scan-build:
|
||||||
<<: *only-default
|
extends: .only-default
|
||||||
image: registry.gitlab.gnome.org/gnome/glib/fedora:v5
|
image: registry.gitlab.gnome.org/gnome/glib/fedora:v5
|
||||||
stage: analysis
|
stage: analysis
|
||||||
script:
|
script:
|
||||||
|
16
.gitlab-ci/run-style-check-diff.sh
Executable file
16
.gitlab-ci/run-style-check-diff.sh
Executable file
@ -0,0 +1,16 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set +e
|
||||||
|
|
||||||
|
# We need to add a new remote for the upstream master, since this script could
|
||||||
|
# be running in a personal fork of the repository which has out of date branches.
|
||||||
|
git remote add upstream https://gitlab.gnome.org/GNOME/glib.git
|
||||||
|
git fetch upstream
|
||||||
|
|
||||||
|
# Work out the newest common ancestor between the detached HEAD that this CI job
|
||||||
|
# has checked out, and the upstream target branch (which will typically be
|
||||||
|
# `upstream/master` or `upstream/glib-2-62`).
|
||||||
|
# `${CI_MERGE_REQUEST_TARGET_BRANCH_NAME}` is only defined if we’re running in
|
||||||
|
# a merge request pipeline; fall back to `${CI_DEFAULT_BRANCH}` otherwise.
|
||||||
|
newest_common_ancestor_sha=$(diff --old-line-format='' --new-line-format='' <(git rev-list --first-parent upstream/${CI_MERGE_REQUEST_TARGET_BRANCH_NAME:-${CI_DEFAULT_BRANCH}}) <(git rev-list --first-parent HEAD) | head -1)
|
||||||
|
git diff -U0 --no-color "${newest_common_ancestor_sha}" | ./clang-format-diff.py -binary "clang-format-7" -p1
|
Loading…
x
Reference in New Issue
Block a user