mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-11 20:06:18 +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
|
||||
MESON_COMMON_OPTIONS: "--buildtype debug --fatal-meson-warnings"
|
||||
|
||||
.only-default: &only-default
|
||||
.only-default:
|
||||
only:
|
||||
- branches
|
||||
except:
|
||||
- tags
|
||||
|
||||
style-check-diff:
|
||||
<<: *only-default
|
||||
extends: .only-default
|
||||
image: registry.gitlab.gnome.org/gnome/glib/debian-stable:v5
|
||||
stage: style-check
|
||||
allow_failure: true
|
||||
script:
|
||||
- git remote add upstream https://gitlab.gnome.org/GNOME/glib.git
|
||||
- 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
|
||||
- .gitlab-ci/run-style-check-diff.sh
|
||||
|
||||
fedora-x86_64:
|
||||
<<: *only-default
|
||||
extends: .only-default
|
||||
image: registry.gitlab.gnome.org/gnome/glib/fedora:v5
|
||||
stage: build
|
||||
variables:
|
||||
@ -71,7 +69,7 @@ fedora-x86_64:
|
||||
- "_coverage"
|
||||
|
||||
debian-stable-x86_64:
|
||||
<<: *only-default
|
||||
extends: .only-default
|
||||
image: registry.gitlab.gnome.org/gnome/glib/debian-stable:v5
|
||||
stage: build
|
||||
script:
|
||||
@ -99,7 +97,7 @@ debian-stable-x86_64:
|
||||
- "_build/${CI_JOB_NAME}-report.xml"
|
||||
|
||||
G_DISABLE_ASSERT:
|
||||
<<: *only-default
|
||||
extends: .only-default
|
||||
image: registry.gitlab.gnome.org/gnome/glib/fedora:v5
|
||||
stage: build
|
||||
variables:
|
||||
@ -126,7 +124,7 @@ G_DISABLE_ASSERT:
|
||||
- "_build/${CI_JOB_NAME}-report.xml"
|
||||
|
||||
valgrind:
|
||||
<<: *only-default
|
||||
extends: .only-default
|
||||
image: registry.gitlab.gnome.org/gnome/glib/fedora:v5
|
||||
stage: analysis
|
||||
variables:
|
||||
@ -159,7 +157,7 @@ valgrind:
|
||||
- "_build/meson-logs"
|
||||
|
||||
.cross-template: &cross-template
|
||||
<<: *only-default
|
||||
extends: .only-default
|
||||
stage: build
|
||||
artifacts:
|
||||
name: "glib-${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}"
|
||||
@ -194,7 +192,7 @@ cross-mingw64:
|
||||
- ninja -C _build
|
||||
|
||||
msys2-mingw32:
|
||||
<<: *only-default
|
||||
extends: .only-default
|
||||
stage: build
|
||||
tags:
|
||||
- win32
|
||||
@ -215,7 +213,7 @@ msys2-mingw32:
|
||||
- _coverage/
|
||||
|
||||
vs2017-x64:
|
||||
<<: *only-default
|
||||
extends: .only-default
|
||||
stage: build
|
||||
tags:
|
||||
- win32
|
||||
@ -297,7 +295,7 @@ freebsd-12-x86_64:
|
||||
- "_build/${CI_JOB_NAME}-report.xml"
|
||||
|
||||
coverage:
|
||||
<<: *only-default
|
||||
extends: .only-default
|
||||
image: registry.gitlab.gnome.org/gnome/glib/fedora:v5
|
||||
stage: coverage
|
||||
artifacts:
|
||||
@ -309,7 +307,7 @@ coverage:
|
||||
coverage: '/^\s+lines\.+:\s+([\d.]+\%)\s+/'
|
||||
|
||||
scan-build:
|
||||
<<: *only-default
|
||||
extends: .only-default
|
||||
image: registry.gitlab.gnome.org/gnome/glib/fedora:v5
|
||||
stage: analysis
|
||||
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…
Reference in New Issue
Block a user