ci: Reindent yaml configuration
Most GNOME projects have settled on a 2-space indentation, so switch to that. This will ease the ongoing copy+paste between projects :-) Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1968>
This commit is contained in:
parent
537f754fb0
commit
d8b88c24d9
424
.gitlab-ci.yml
424
.gitlab-ci.yml
@ -1,259 +1,259 @@
|
|||||||
include:
|
include:
|
||||||
- remote: 'https://gitlab.gnome.org/GNOME/citemplates/raw/HEAD/flatpak/flatpak_ci_initiative.yml'
|
- remote: 'https://gitlab.gnome.org/GNOME/citemplates/raw/HEAD/flatpak/flatpak_ci_initiative.yml'
|
||||||
- remote: 'https://gitlab.freedesktop.org/freedesktop/ci-templates/-/raw/bbe5232986c9b98eb1efe62484e07216f7d1a4df/templates/fedora.yml'
|
- remote: 'https://gitlab.freedesktop.org/freedesktop/ci-templates/-/raw/bbe5232986c9b98eb1efe62484e07216f7d1a4df/templates/fedora.yml'
|
||||||
- remote: 'https://gitlab.freedesktop.org/freedesktop/ci-templates/-/raw/bbe5232986c9b98eb1efe62484e07216f7d1a4df/templates/ci-fairy.yml'
|
- remote: 'https://gitlab.freedesktop.org/freedesktop/ci-templates/-/raw/bbe5232986c9b98eb1efe62484e07216f7d1a4df/templates/ci-fairy.yml'
|
||||||
|
|
||||||
stages:
|
stages:
|
||||||
- pre_review
|
- pre_review
|
||||||
- prep
|
- prep
|
||||||
- review
|
- review
|
||||||
- build
|
- build
|
||||||
- test
|
- test
|
||||||
- analyze
|
- analyze
|
||||||
- deploy
|
- deploy
|
||||||
|
|
||||||
default:
|
default:
|
||||||
# Cancel jobs if newer commits are pushed to the branch
|
# Cancel jobs if newer commits are pushed to the branch
|
||||||
interruptible: true
|
interruptible: true
|
||||||
# Auto-retry jobs in case of infra failures
|
# Auto-retry jobs in case of infra failures
|
||||||
retry:
|
retry:
|
||||||
max: 1
|
max: 1
|
||||||
when:
|
when:
|
||||||
- 'runner_system_failure'
|
- 'runner_system_failure'
|
||||||
- 'stuck_or_timeout_failure'
|
- 'stuck_or_timeout_failure'
|
||||||
- 'scheduler_failure'
|
- 'scheduler_failure'
|
||||||
- 'api_failure'
|
- 'api_failure'
|
||||||
|
|
||||||
variables:
|
variables:
|
||||||
FDO_UPSTREAM_REPO: GNOME/gnome-shell
|
FDO_UPSTREAM_REPO: GNOME/gnome-shell
|
||||||
BUNDLE: "extensions-git.flatpak"
|
BUNDLE: "extensions-git.flatpak"
|
||||||
JS_LOG: "js-report.txt"
|
JS_LOG: "js-report.txt"
|
||||||
LINT_LOG: "eslint-report.xml"
|
LINT_LOG: "eslint-report.xml"
|
||||||
LINT_MR_LOG: "eslint-mr-report.xml"
|
LINT_MR_LOG: "eslint-mr-report.xml"
|
||||||
|
|
||||||
image: registry.gitlab.gnome.org/gnome/mutter/fedora/34:x86_64-2021-08-25.0
|
image: registry.gitlab.gnome.org/gnome/mutter/fedora/34:x86_64-2021-08-25.0
|
||||||
|
|
||||||
workflow:
|
workflow:
|
||||||
rules:
|
rules:
|
||||||
- if: '$CI_MERGE_REQUEST_IID'
|
- if: '$CI_MERGE_REQUEST_IID'
|
||||||
- if: '$CI_COMMIT_TAG'
|
- if: '$CI_COMMIT_TAG'
|
||||||
- if: '$CI_COMMIT_BRANCH'
|
- if: '$CI_COMMIT_BRANCH'
|
||||||
|
|
||||||
.pipeline_guard: &pipeline_guard
|
.pipeline_guard: &pipeline_guard
|
||||||
rules:
|
rules:
|
||||||
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
|
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
|
||||||
- if: '$CI_COMMIT_TAG'
|
- if: '$CI_COMMIT_TAG'
|
||||||
- if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
|
- if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
|
||||||
- if: '$CI_COMMIT_BRANCH =~ /^gnome-[0-9-]+$/'
|
- if: '$CI_COMMIT_BRANCH =~ /^gnome-[0-9-]+$/'
|
||||||
- when: 'manual'
|
- when: 'manual'
|
||||||
|
|
||||||
.gnome-shell.fedora:34:
|
.gnome-shell.fedora:34:
|
||||||
variables:
|
variables:
|
||||||
FDO_DISTRIBUTION_VERSION: 34
|
FDO_DISTRIBUTION_VERSION: 34
|
||||||
FDO_DISTRIBUTION_TAG: '2021-08-12.0'
|
FDO_DISTRIBUTION_TAG: '2021-08-12.0'
|
||||||
FDO_DISTRIBUTION_PACKAGES: >
|
FDO_DISTRIBUTION_PACKAGES: >
|
||||||
findutils mozjs78-devel nodejs npm meson
|
findutils mozjs78-devel nodejs npm meson
|
||||||
pkgconfig(gio-2.0) pkgconfig(gio-unix-2.0)
|
pkgconfig(gio-2.0) pkgconfig(gio-unix-2.0)
|
||||||
pkgconfig(gnome-autoar-0) pkgconfig(json-glib-1.0)
|
pkgconfig(gnome-autoar-0) pkgconfig(json-glib-1.0)
|
||||||
FDO_DISTRIBUTION_EXEC: |
|
FDO_DISTRIBUTION_EXEC: |
|
||||||
# For static analysis with eslint
|
# For static analysis with eslint
|
||||||
npm install -g eslint eslint-plugin-jsdoc &&
|
npm install -g eslint eslint-plugin-jsdoc &&
|
||||||
|
|
||||||
dnf group install -y 'Development Tools' \
|
dnf group install -y 'Development Tools' \
|
||||||
'C Development Tools and Libraries' &&
|
'C Development Tools and Libraries' &&
|
||||||
|
|
||||||
./.gitlab-ci/install-meson-project.sh \
|
./.gitlab-ci/install-meson-project.sh \
|
||||||
-Dman=false \
|
-Dman=false \
|
||||||
https://gitlab.gnome.org/GNOME/gnome-shell.git \
|
https://gitlab.gnome.org/GNOME/gnome-shell.git \
|
||||||
3.38.0 \
|
3.38.0 \
|
||||||
subprojects/extensions-tool/ \
|
subprojects/extensions-tool/ \
|
||||||
./generate-translations.sh &&
|
./generate-translations.sh &&
|
||||||
|
|
||||||
dnf clean all
|
dnf clean all
|
||||||
|
|
||||||
check_commit_log:
|
check_commit_log:
|
||||||
extends:
|
extends:
|
||||||
- .fdo.ci-fairy
|
- .fdo.ci-fairy
|
||||||
stage: pre_review
|
stage: pre_review
|
||||||
variables:
|
variables:
|
||||||
GIT_DEPTH: "100"
|
GIT_DEPTH: "100"
|
||||||
script:
|
script:
|
||||||
- if [[ x"$CI_MERGE_REQUEST_TARGET_BRANCH_NAME" != "x" ]] ;
|
- if [[ x"$CI_MERGE_REQUEST_TARGET_BRANCH_NAME" != "x" ]] ;
|
||||||
then
|
then
|
||||||
ci-fairy check-commits --junit-xml=commit-message-junit-report.xml ;
|
ci-fairy check-commits --junit-xml=commit-message-junit-report.xml ;
|
||||||
else
|
else
|
||||||
echo "Not a merge request" ;
|
echo "Not a merge request" ;
|
||||||
fi
|
fi
|
||||||
<<: *pipeline_guard
|
<<: *pipeline_guard
|
||||||
artifacts:
|
artifacts:
|
||||||
expire_in: 1 week
|
expire_in: 1 week
|
||||||
paths:
|
paths:
|
||||||
- commit-message-junit-report.xml
|
- commit-message-junit-report.xml
|
||||||
reports:
|
reports:
|
||||||
junit: commit-message-junit-report.xml
|
junit: commit-message-junit-report.xml
|
||||||
|
|
||||||
check-merge-request:
|
check-merge-request:
|
||||||
extends:
|
extends:
|
||||||
- .fdo.ci-fairy
|
- .fdo.ci-fairy
|
||||||
stage: pre_review
|
stage: pre_review
|
||||||
script:
|
script:
|
||||||
- if [[ x"$CI_MERGE_REQUEST_TARGET_BRANCH_NAME" != "x" ]] ;
|
- if [[ x"$CI_MERGE_REQUEST_TARGET_BRANCH_NAME" != "x" ]] ;
|
||||||
then
|
then
|
||||||
ci-fairy check-merge-request --require-allow-collaboration --junit-xml=check-merge-request-report.xml ;
|
ci-fairy check-merge-request --require-allow-collaboration --junit-xml=check-merge-request-report.xml ;
|
||||||
else
|
else
|
||||||
echo "Not a merge request" ;
|
echo "Not a merge request" ;
|
||||||
fi
|
fi
|
||||||
<<: *pipeline_guard
|
<<: *pipeline_guard
|
||||||
artifacts:
|
artifacts:
|
||||||
expire_in: 1 week
|
expire_in: 1 week
|
||||||
paths:
|
paths:
|
||||||
- check-merge-request-report.xml
|
- check-merge-request-report.xml
|
||||||
reports:
|
reports:
|
||||||
junit: check-merge-request-report.xml
|
junit: check-merge-request-report.xml
|
||||||
|
|
||||||
build-fedora-container:
|
build-fedora-container:
|
||||||
extends:
|
extends:
|
||||||
- .fdo.container-build@fedora@x86_64
|
- .fdo.container-build@fedora@x86_64
|
||||||
- .gnome-shell.fedora:34
|
- .gnome-shell.fedora:34
|
||||||
stage: prep
|
stage: prep
|
||||||
|
|
||||||
js_check:
|
js_check:
|
||||||
extends:
|
extends:
|
||||||
- .fdo.distribution-image@fedora
|
- .fdo.distribution-image@fedora
|
||||||
- .gnome-shell.fedora:34
|
- .gnome-shell.fedora:34
|
||||||
stage: review
|
stage: review
|
||||||
script:
|
script:
|
||||||
- find js -name '*.js' $(printf "! -wholename %s " $(cat .jscheckignore)) -exec js78 -c '{}' ';' 2>&1 | tee $JS_LOG
|
- find js -name '*.js' $(printf "! -wholename %s " $(cat .jscheckignore)) -exec js78 -c '{}' ';' 2>&1 | tee $JS_LOG
|
||||||
- (! grep -q . $JS_LOG)
|
- (! grep -q . $JS_LOG)
|
||||||
artifacts:
|
artifacts:
|
||||||
paths:
|
paths:
|
||||||
- ${JS_LOG}
|
- ${JS_LOG}
|
||||||
when: on_failure
|
when: on_failure
|
||||||
|
|
||||||
eslint:
|
eslint:
|
||||||
extends:
|
extends:
|
||||||
- .fdo.distribution-image@fedora
|
- .fdo.distribution-image@fedora
|
||||||
- .gnome-shell.fedora:34
|
- .gnome-shell.fedora:34
|
||||||
stage: review
|
stage: review
|
||||||
script:
|
script:
|
||||||
- export NODE_PATH=$(npm root -g)
|
- export NODE_PATH=$(npm root -g)
|
||||||
- ./.gitlab-ci/run-eslint --output-file ${LINT_LOG} --format junit
|
- ./.gitlab-ci/run-eslint --output-file ${LINT_LOG} --format junit
|
||||||
artifacts:
|
artifacts:
|
||||||
reports:
|
reports:
|
||||||
junit: ${LINT_LOG}
|
junit: ${LINT_LOG}
|
||||||
when: always
|
when: always
|
||||||
|
|
||||||
eslint_mr:
|
eslint_mr:
|
||||||
extends:
|
extends:
|
||||||
- .fdo.distribution-image@fedora
|
- .fdo.distribution-image@fedora
|
||||||
- .gnome-shell.fedora:34
|
- .gnome-shell.fedora:34
|
||||||
stage: review
|
stage: review
|
||||||
script:
|
script:
|
||||||
- export NODE_PATH=$(npm root -g)
|
- export NODE_PATH=$(npm root -g)
|
||||||
- ./.gitlab-ci/run-eslint --output-file ${LINT_MR_LOG} --format junit
|
- ./.gitlab-ci/run-eslint --output-file ${LINT_MR_LOG} --format junit
|
||||||
--remote ${CI_MERGE_REQUEST_PROJECT_URL}.git
|
--remote ${CI_MERGE_REQUEST_PROJECT_URL}.git
|
||||||
--branch ${CI_MERGE_REQUEST_TARGET_BRANCH_NAME}
|
--branch ${CI_MERGE_REQUEST_TARGET_BRANCH_NAME}
|
||||||
only:
|
only:
|
||||||
- merge_requests
|
- merge_requests
|
||||||
artifacts:
|
artifacts:
|
||||||
reports:
|
reports:
|
||||||
junit: ${LINT_MR_LOG}
|
junit: ${LINT_MR_LOG}
|
||||||
when: always
|
when: always
|
||||||
|
|
||||||
potfile_c_check:
|
potfile_c_check:
|
||||||
extends:
|
extends:
|
||||||
- .fdo.distribution-image@fedora
|
- .fdo.distribution-image@fedora
|
||||||
- .gnome-shell.fedora:34
|
- .gnome-shell.fedora:34
|
||||||
stage: review
|
stage: review
|
||||||
script:
|
script:
|
||||||
- ./.gitlab-ci/check-potfiles.sh
|
- ./.gitlab-ci/check-potfiles.sh
|
||||||
|
|
||||||
potfile_js_check:
|
potfile_js_check:
|
||||||
extends:
|
extends:
|
||||||
- .fdo.distribution-image@fedora
|
- .fdo.distribution-image@fedora
|
||||||
- .gnome-shell.fedora:34
|
- .gnome-shell.fedora:34
|
||||||
stage: review
|
stage: review
|
||||||
script:
|
script:
|
||||||
- js78 -m .gitlab-ci/check-potfiles.js
|
- js78 -m .gitlab-ci/check-potfiles.js
|
||||||
|
|
||||||
no_template_check:
|
no_template_check:
|
||||||
extends:
|
extends:
|
||||||
- .fdo.distribution-image@fedora
|
- .fdo.distribution-image@fedora
|
||||||
- .gnome-shell.fedora:34
|
- .gnome-shell.fedora:34
|
||||||
stage: review
|
stage: review
|
||||||
script:
|
script:
|
||||||
- ./.gitlab-ci/check-template-strings.sh
|
- ./.gitlab-ci/check-template-strings.sh
|
||||||
|
|
||||||
build:
|
build:
|
||||||
stage: build
|
stage: build
|
||||||
needs: ["check_commit_log"]
|
needs: ["check_commit_log"]
|
||||||
before_script:
|
before_script:
|
||||||
- .gitlab-ci/checkout-mutter.sh
|
- .gitlab-ci/checkout-mutter.sh
|
||||||
- meson mutter mutter/build --prefix=/usr
|
- meson mutter mutter/build --prefix=/usr
|
||||||
- meson install -C mutter/build
|
- meson install -C mutter/build
|
||||||
script:
|
script:
|
||||||
- meson . build -Dbuildtype=debugoptimized -Dman=false --werror
|
- meson . build -Dbuildtype=debugoptimized -Dman=false --werror
|
||||||
- meson compile -C build
|
- meson compile -C build
|
||||||
- meson install -C build
|
- meson install -C build
|
||||||
artifacts:
|
artifacts:
|
||||||
expire_in: 1 day
|
expire_in: 1 day
|
||||||
paths:
|
paths:
|
||||||
- mutter
|
- mutter
|
||||||
- build
|
- build
|
||||||
|
|
||||||
test:
|
test:
|
||||||
stage: test
|
stage: test
|
||||||
needs: ["build"]
|
needs: ["build"]
|
||||||
variables:
|
variables:
|
||||||
XDG_RUNTIME_DIR: "$CI_PROJECT_DIR/runtime-dir"
|
XDG_RUNTIME_DIR: "$CI_PROJECT_DIR/runtime-dir"
|
||||||
NO_AT_BRIDGE: "1"
|
NO_AT_BRIDGE: "1"
|
||||||
before_script:
|
before_script:
|
||||||
- meson install -C mutter/build
|
- meson install -C mutter/build
|
||||||
script:
|
script:
|
||||||
- dbus-run-session -- xvfb-run meson test -C build --no-rebuild
|
- dbus-run-session -- xvfb-run meson test -C build --no-rebuild
|
||||||
artifacts:
|
artifacts:
|
||||||
expire_in: 1 day
|
expire_in: 1 day
|
||||||
paths:
|
paths:
|
||||||
- build/meson-logs/testlog.txt
|
- build/meson-logs/testlog.txt
|
||||||
reports:
|
reports:
|
||||||
junit: build/meson-logs/testlog.junit.xml
|
junit: build/meson-logs/testlog.junit.xml
|
||||||
when: on_failure
|
when: on_failure
|
||||||
|
|
||||||
test-coverity:
|
test-coverity:
|
||||||
rules:
|
rules:
|
||||||
- if: '$CI_PIPELINE_SOURCE == "schedule" && $GNOME_SHELL_SCHEDULED_JOB == "coverity"'
|
- if: '$CI_PIPELINE_SOURCE == "schedule" && $GNOME_SHELL_SCHEDULED_JOB == "coverity"'
|
||||||
when: always
|
when: always
|
||||||
- when: manual
|
- when: manual
|
||||||
needs: ["build"]
|
needs: ["build"]
|
||||||
stage: analyze
|
stage: analyze
|
||||||
allow_failure: true
|
allow_failure: true
|
||||||
before_script:
|
before_script:
|
||||||
- meson compile -C mutter/build
|
- meson compile -C mutter/build
|
||||||
script:
|
script:
|
||||||
- .gitlab-ci/download-coverity-tarball.sh
|
- .gitlab-ci/download-coverity-tarball.sh
|
||||||
- CC=clang meson coverity-build -Dman=false
|
- CC=clang meson coverity-build -Dman=false
|
||||||
- ./coverity/cov-analysis-linux64-*/bin/cov-build --fs-capture-search js --dir cov-int meson compile -C coverity-build
|
- ./coverity/cov-analysis-linux64-*/bin/cov-build --fs-capture-search js --dir cov-int meson compile -C coverity-build
|
||||||
- tar czf cov-int.tar.gz cov-int
|
- tar czf cov-int.tar.gz cov-int
|
||||||
- curl https://scan.coverity.com/builds?project=GNOME+Shell
|
- curl https://scan.coverity.com/builds?project=GNOME+Shell
|
||||||
--form token=$COVERITY_TOKEN --form email=carlosg@gnome.org
|
--form token=$COVERITY_TOKEN --form email=carlosg@gnome.org
|
||||||
--form file=@cov-int.tar.gz --form version="`git describe --tags`"
|
--form file=@cov-int.tar.gz --form version="`git describe --tags`"
|
||||||
--form description="GitLab CI build"
|
--form description="GitLab CI build"
|
||||||
cache:
|
cache:
|
||||||
key: coverity-tarball
|
key: coverity-tarball
|
||||||
paths:
|
paths:
|
||||||
- coverity
|
- coverity
|
||||||
|
|
||||||
flatpak:
|
flatpak:
|
||||||
stage: build
|
stage: build
|
||||||
needs: ["check_commit_log"]
|
needs: ["check_commit_log"]
|
||||||
variables:
|
variables:
|
||||||
SUBPROJECT: "subprojects/extensions-app"
|
SUBPROJECT: "subprojects/extensions-app"
|
||||||
# Your manifest path
|
# Your manifest path
|
||||||
MANIFEST_PATH: "$SUBPROJECT/build-aux/flatpak/org.gnome.Extensions.json"
|
MANIFEST_PATH: "$SUBPROJECT/build-aux/flatpak/org.gnome.Extensions.json"
|
||||||
RUNTIME_REPO: "https://nightly.gnome.org/gnome-nightly.flatpakrepo"
|
RUNTIME_REPO: "https://nightly.gnome.org/gnome-nightly.flatpakrepo"
|
||||||
FLATPAK_MODULE: "gnome-extensions-app"
|
FLATPAK_MODULE: "gnome-extensions-app"
|
||||||
APP_ID: "org.gnome.Extensions.Devel"
|
APP_ID: "org.gnome.Extensions.Devel"
|
||||||
extends: .flatpak
|
extends: .flatpak
|
||||||
|
|
||||||
nightly:
|
nightly:
|
||||||
extends: '.publish_nightly'
|
extends: '.publish_nightly'
|
||||||
|
Loading…
Reference in New Issue
Block a user