diff options
author | Andoni Morales Alastruey <ylatuya@gmail.com> | 2024-01-09 20:04:14 +0100 |
---|---|---|
committer | Andoni Morales Alastruey <ylatuya@gmail.com> | 2024-01-12 12:32:05 +0100 |
commit | 0d01cc70f13b9e487e7e932c3c78f8b4a3b05aeb (patch) | |
tree | 2afb1f821199f5efdecca5f8c0030a8d161ecec8 | |
parent | cc1937215ee5beb89c0749ad9f411d05c7446878 (diff) |
ci: cache pre-commit deps in runners
Rather than creating a single docker image reused by all users
that needs to be manually updated in case a pre-commit dependency
changes, cache pre-commit dependencies in each runner.
Fix #460
Part-of: <https://gitlab.freedesktop.org/gstreamer/cerbero/-/merge_requests/1322>
-rw-r--r-- | .gitlab-ci.yml | 5 | ||||
-rwxr-xr-x | ci/checks_setup.sh | 5 |
2 files changed, 4 insertions, 6 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 0477443a..7140ee37 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -23,7 +23,6 @@ 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 @@ -75,7 +74,7 @@ default: # 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.2' + FDO_DISTRIBUTION_TAG: '2023-01-12.0' FDO_DISTRIBUTION_VERSION: '37' FDO_DISTRIBUTION_PACKAGES: "git-core python3-pip" FDO_DISTRIBUTION_EXEC: ci/checks_setup.sh @@ -257,6 +256,8 @@ pre-commit checks: stage: 'check sources' script: pre-commit run --all-files + variables: + PRE_COMMIT_HOME: '/cache/${CI_PROJECT_NAMESPACE}/pre-commit' # # Cerbero Linux X86_64 build diff --git a/ci/checks_setup.sh b/ci/checks_setup.sh index 68526acb..1dcb56a6 100755 --- a/ci/checks_setup.sh +++ b/ci/checks_setup.sh @@ -2,7 +2,4 @@ set -e -python3 -m pip install pre-commit -echo "Pre-commit home": $PRE_COMMIT_HOME -mkdir $PRE_COMMIT_HOME -pre-commit install-hooks
\ No newline at end of file +python3 -m pip install pre-commit==3.6.0
\ No newline at end of file |