summaryrefslogtreecommitdiff
path: root/.gitlab-ci.yml
diff options
context:
space:
mode:
authorAndoni Morales Alastruey <ylatuya@gmail.com>2023-12-19 19:00:42 +0100
committerAndoni Morales Alastruey <ylatuya@gmail.com>2024-01-09 20:06:29 +0100
commitca12c120328b8aed25c8f6ae56f0045e1bf45592 (patch)
treee14a7c6d70c412023c16e4e377042015ddcb6810 /.gitlab-ci.yml
parentfa23acd86d80e3c3b5f8346e2a3941b8fe8c6786 (diff)
ci: add source checks using pre-commit
Part-of: <https://gitlab.freedesktop.org/gstreamer/cerbero/-/merge_requests/1315>
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r--.gitlab-ci.yml35
1 files changed, 35 insertions, 0 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index e04c73c4..8f037c6d 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -5,6 +5,7 @@ include:
stages:
- 'build docker'
+ - 'check sources'
- 'build'
# Use the resulting binaries
- 'integrate'
@@ -22,6 +23,7 @@ variables:
MESON_COMMIT:
description: "Overwrite the meson version installed on the CI images with the specified meson commit"
value: ""
+ PRE_COMMIT_HOME: '/pre-commit'
workflow:
# https://docs.gitlab.com/ee/ci/yaml/index.html#switch-between-branch-pipelines-and-merge-request-pipelines
@@ -65,6 +67,21 @@ default:
FDO_DISTRIBUTION_EXEC: ci/docker_setup.sh
FDO_UPSTREAM_REPO: gstreamer/cerbero
+.checks fedora image:
+ variables:
+ ###
+ # IMPORTANT
+ # These are the version tags for the docker images the CI runs against.
+ # If you are hacking on them or need a them to rebuild, its enough
+ # to change any part of the string of the image you want.
+ ###
+ FDO_DISTRIBUTION_TAG: '2023-12-19.1'
+ FDO_DISTRIBUTION_VERSION: '37'
+ FDO_DISTRIBUTION_PACKAGES: "git-core python3-pip"
+ FDO_DISTRIBUTION_EXEC: ci/checks_setup.sh
+ FDO_UPSTREAM_REPO: gstreamer/cerbero
+ FDO_REPO_SUFFIX: checks
+
.android fedora image:
variables:
###
@@ -108,6 +125,14 @@ fedora image:
variables:
GIT_STRATEGY: none
+checks fedora image:
+ stage: "build docker"
+ extends:
+ - .checks fedora image
+ - .fdo.container-build@fedora
+ variables:
+ GIT_STRATEGY: none
+
android fedora image:
stage: "build docker"
extends:
@@ -223,6 +248,16 @@ android fedora image:
script:
- ./ci/cerbero_setup.sh cerbero_script
+pre-commit checks:
+ extends:
+ - .checks fedora image
+ - .fdo.suffixed-image@fedora
+ needs:
+ - "checks fedora image"
+ stage: 'check sources'
+ script:
+ pre-commit run --all-files
+
#
# Cerbero Linux X86_64 build
#