2019-01-20 11:21:45 +00:00
|
|
|
variables:
|
2020-03-06 21:23:20 +00:00
|
|
|
FDO_UPSTREAM_REPO: mesa/mesa
|
2021-04-01 09:56:17 +00:00
|
|
|
MESA_TEMPLATES_COMMIT: &ci-templates-commit 290b79e0e78eab67a83766f4e9691be554fc4afd
|
CI: reduce bandwidth for git pull
Over the last 7 days, git pulls represented a total of 1.7 TB.
On those 1.7 TB, we can see:
- ~300 GB for the CI farm on hetzner
- ~730 GB for the CI farm on packet.net
- ~680 GB for the rest of the world
We can not really change the rest of the world*, but we can
certainly reduce the egress costs towards our CI farms.
Right now, the gitlab runners are not doing a good job at
caching the git trees for the various jobs we make, and
we end up with a lot of cache-misses. A typical pipeline
ends up with a good 2.8GB of git pull data. (a compressed
archive of the mesa folder accounts for 280MB)
In this patch, we implemented what was suggested in
https://gitlab.com/gitlab-org/gitlab/-/issues/215591#note_334642576
- we host a brand new MinIO server on packet
- jobs can upload files on 2 locations:
* git-cache/<namespace>/<project>/<branch-name>.tar.gz
* artifacts/<namespace>/<project>/<pipeline-id>/
- the authorization is handled by gitlab with short tokens
valid only for the time of the job is running
- whenever a job runs, the runner are configured to execute
(eval) $CI_PRE_CLONE_SCRIPT
- this variable is set globally to download the current cache
from the MinIO packet server, unpack it and replace the
possibly out of date cache found on the runner
- then git fetch is run by the runner, and only the delta
between the upstream tree and the local tree gets pulled.
We can rebuild the git cache in a schedule job (once a day
seems sufficient), and then we can stop the cache miss
entirely.
First results showed that instead of pulling 280MB of data
in my fork, I got a pull of only 250KB. That should help us.
* arguably, there are other farms in the rest of the world, so
hopefully we can change those too.
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5428>
2020-06-11 15:16:28 +00:00
|
|
|
CI_PRE_CLONE_SCRIPT: |-
|
|
|
|
set -o xtrace
|
2021-12-03 07:07:47 +00:00
|
|
|
wget -q -O download-git-cache.sh ${CI_PROJECT_URL}/-/raw/${CI_COMMIT_SHA}/.gitlab-ci/download-git-cache.sh
|
|
|
|
bash download-git-cache.sh
|
|
|
|
rm download-git-cache.sh
|
CI: reduce bandwidth for git pull
Over the last 7 days, git pulls represented a total of 1.7 TB.
On those 1.7 TB, we can see:
- ~300 GB for the CI farm on hetzner
- ~730 GB for the CI farm on packet.net
- ~680 GB for the rest of the world
We can not really change the rest of the world*, but we can
certainly reduce the egress costs towards our CI farms.
Right now, the gitlab runners are not doing a good job at
caching the git trees for the various jobs we make, and
we end up with a lot of cache-misses. A typical pipeline
ends up with a good 2.8GB of git pull data. (a compressed
archive of the mesa folder accounts for 280MB)
In this patch, we implemented what was suggested in
https://gitlab.com/gitlab-org/gitlab/-/issues/215591#note_334642576
- we host a brand new MinIO server on packet
- jobs can upload files on 2 locations:
* git-cache/<namespace>/<project>/<branch-name>.tar.gz
* artifacts/<namespace>/<project>/<pipeline-id>/
- the authorization is handled by gitlab with short tokens
valid only for the time of the job is running
- whenever a job runs, the runner are configured to execute
(eval) $CI_PRE_CLONE_SCRIPT
- this variable is set globally to download the current cache
from the MinIO packet server, unpack it and replace the
possibly out of date cache found on the runner
- then git fetch is run by the runner, and only the delta
between the upstream tree and the local tree gets pulled.
We can rebuild the git cache in a schedule job (once a day
seems sufficient), and then we can stop the cache miss
entirely.
First results showed that instead of pulling 280MB of data
in my fork, I got a pull of only 250KB. That should help us.
* arguably, there are other farms in the rest of the world, so
hopefully we can change those too.
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5428>
2020-06-11 15:16:28 +00:00
|
|
|
set +o xtrace
|
2022-02-23 15:44:33 +00:00
|
|
|
CI_JOB_JWT_FILE: /minio_jwt
|
2020-08-23 20:32:40 +00:00
|
|
|
MINIO_HOST: minio-packet.freedesktop.org
|
2021-06-10 15:24:48 +00:00
|
|
|
# per-pipeline artifact storage on MinIO
|
|
|
|
PIPELINE_ARTIFACTS_BASE: ${MINIO_HOST}/artifacts/${CI_PROJECT_PATH}/${CI_PIPELINE_ID}
|
2021-06-10 15:29:39 +00:00
|
|
|
# per-job artifact storage on MinIO
|
|
|
|
JOB_ARTIFACTS_BASE: ${PIPELINE_ARTIFACTS_BASE}/${CI_JOB_ID}
|
2021-06-12 09:19:36 +00:00
|
|
|
# reference images stored for traces
|
|
|
|
PIGLIT_REPLAY_REFERENCE_IMAGES_BASE: "${MINIO_HOST}/mesa-tracie-results/$FDO_UPSTREAM_REPO"
|
2021-08-27 17:06:16 +00:00
|
|
|
# Individual CI farm status, set to "offline" to disable jobs
|
|
|
|
# running on a particular CI farm (ie. for outages, etc):
|
2022-06-17 13:13:41 +00:00
|
|
|
FD_FARM: "online"
|
2022-05-19 05:36:33 +00:00
|
|
|
COLLABORA_FARM: "online"
|
2022-05-27 16:24:33 +00:00
|
|
|
MICROSOFT_FARM: "online"
|
2022-06-16 18:21:54 +00:00
|
|
|
LIMA_FARM: "offline"
|
2019-04-02 07:24:00 +00:00
|
|
|
|
2021-12-02 13:13:10 +00:00
|
|
|
default:
|
|
|
|
before_script:
|
|
|
|
- echo -e "\e[0Ksection_start:$(date +%s):unset_env_vars_section[collapsed=true]\r\e[0KUnsetting vulnerable environment variables"
|
|
|
|
- echo -n "${CI_JOB_JWT}" > "${CI_JOB_JWT_FILE}"
|
|
|
|
- unset CI_JOB_JWT
|
|
|
|
- echo -e "\e[0Ksection_end:$(date +%s):unset_env_vars_section\r\e[0K"
|
|
|
|
|
|
|
|
after_script:
|
|
|
|
- >
|
|
|
|
set +x
|
|
|
|
|
|
|
|
test -e "${CI_JOB_JWT_FILE}" &&
|
|
|
|
export CI_JOB_JWT="$(<${CI_JOB_JWT_FILE})" &&
|
|
|
|
rm "${CI_JOB_JWT_FILE}"
|
|
|
|
|
2019-04-02 07:24:00 +00:00
|
|
|
include:
|
2020-03-06 21:23:20 +00:00
|
|
|
- project: 'freedesktop/ci-templates'
|
2021-11-05 03:13:01 +00:00
|
|
|
ref: 34f4ade99434043f88e164933f570301fd18b125
|
2020-11-24 16:02:13 +00:00
|
|
|
file:
|
2020-11-18 17:23:29 +00:00
|
|
|
- '/templates/ci-fairy.yml'
|
2020-12-02 16:37:16 +00:00
|
|
|
- project: 'freedesktop/ci-templates'
|
2020-12-15 17:02:04 +00:00
|
|
|
ref: *ci-templates-commit
|
2020-12-02 16:37:16 +00:00
|
|
|
file:
|
2020-11-24 16:02:13 +00:00
|
|
|
- '/templates/debian.yml'
|
2021-05-12 14:42:37 +00:00
|
|
|
- '/templates/fedora.yml'
|
2021-11-09 21:38:33 +00:00
|
|
|
- local: '.gitlab-ci/image-tags.yml'
|
2021-06-10 10:10:10 +00:00
|
|
|
- local: '.gitlab-ci/lava/lava-gitlab-ci.yml'
|
2022-04-08 11:29:04 +00:00
|
|
|
- local: '.gitlab-ci/container/gitlab-ci.yml'
|
|
|
|
- local: '.gitlab-ci/build/gitlab-ci.yml'
|
|
|
|
- local: '.gitlab-ci/test/gitlab-ci.yml'
|
2019-10-30 19:39:08 +00:00
|
|
|
- local: '.gitlab-ci/test-source-dep.yml'
|
2021-02-18 19:12:56 +00:00
|
|
|
- local: 'src/amd/ci/gitlab-ci.yml'
|
2021-07-15 11:11:17 +00:00
|
|
|
- local: 'src/broadcom/ci/gitlab-ci.yml'
|
2020-06-12 11:23:44 +00:00
|
|
|
- local: 'src/etnaviv/ci/gitlab-ci.yml'
|
2021-02-18 19:12:56 +00:00
|
|
|
- local: 'src/freedreno/ci/gitlab-ci.yml'
|
2021-11-23 19:25:41 +00:00
|
|
|
- local: 'src/gallium/drivers/crocus/ci/gitlab-ci.yml'
|
2021-11-21 14:38:20 +00:00
|
|
|
- local: 'src/gallium/drivers/d3d12/ci/gitlab-ci.yml'
|
2021-05-17 22:06:34 +00:00
|
|
|
- local: 'src/gallium/drivers/i915/ci/gitlab-ci.yml'
|
2021-03-01 20:50:51 +00:00
|
|
|
- local: 'src/gallium/drivers/lima/ci/gitlab-ci.yml'
|
2021-02-18 19:12:56 +00:00
|
|
|
- local: 'src/gallium/drivers/llvmpipe/ci/gitlab-ci.yml'
|
2021-12-03 00:14:30 +00:00
|
|
|
- local: 'src/gallium/drivers/nouveau/ci/gitlab-ci.yml'
|
2021-03-01 20:50:51 +00:00
|
|
|
- local: 'src/gallium/drivers/radeonsi/ci/gitlab-ci.yml'
|
2021-02-18 19:12:56 +00:00
|
|
|
- local: 'src/gallium/drivers/softpipe/ci/gitlab-ci.yml'
|
|
|
|
- local: 'src/gallium/drivers/virgl/ci/gitlab-ci.yml'
|
|
|
|
- local: 'src/gallium/drivers/zink/ci/gitlab-ci.yml'
|
2021-03-18 19:58:04 +00:00
|
|
|
- local: 'src/gallium/frontends/lavapipe/ci/gitlab-ci.yml'
|
2021-12-06 09:01:52 +00:00
|
|
|
- local: 'src/intel/ci/gitlab-ci.yml'
|
2021-11-21 14:41:37 +00:00
|
|
|
- local: 'src/microsoft/ci/gitlab-ci.yml'
|
2021-07-05 07:25:57 +00:00
|
|
|
- local: 'src/panfrost/ci/gitlab-ci.yml'
|
2019-09-18 14:03:36 +00:00
|
|
|
|
2019-01-20 11:21:45 +00:00
|
|
|
stages:
|
2020-11-18 17:32:05 +00:00
|
|
|
- sanity
|
2020-08-06 15:10:08 +00:00
|
|
|
- container
|
CI: reduce bandwidth for git pull
Over the last 7 days, git pulls represented a total of 1.7 TB.
On those 1.7 TB, we can see:
- ~300 GB for the CI farm on hetzner
- ~730 GB for the CI farm on packet.net
- ~680 GB for the rest of the world
We can not really change the rest of the world*, but we can
certainly reduce the egress costs towards our CI farms.
Right now, the gitlab runners are not doing a good job at
caching the git trees for the various jobs we make, and
we end up with a lot of cache-misses. A typical pipeline
ends up with a good 2.8GB of git pull data. (a compressed
archive of the mesa folder accounts for 280MB)
In this patch, we implemented what was suggested in
https://gitlab.com/gitlab-org/gitlab/-/issues/215591#note_334642576
- we host a brand new MinIO server on packet
- jobs can upload files on 2 locations:
* git-cache/<namespace>/<project>/<branch-name>.tar.gz
* artifacts/<namespace>/<project>/<pipeline-id>/
- the authorization is handled by gitlab with short tokens
valid only for the time of the job is running
- whenever a job runs, the runner are configured to execute
(eval) $CI_PRE_CLONE_SCRIPT
- this variable is set globally to download the current cache
from the MinIO packet server, unpack it and replace the
possibly out of date cache found on the runner
- then git fetch is run by the runner, and only the delta
between the upstream tree and the local tree gets pulled.
We can rebuild the git cache in a schedule job (once a day
seems sufficient), and then we can stop the cache miss
entirely.
First results showed that instead of pulling 280MB of data
in my fork, I got a pull of only 250KB. That should help us.
* arguably, there are other farms in the rest of the world, so
hopefully we can change those too.
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5428>
2020-06-11 15:16:28 +00:00
|
|
|
- git-archive
|
2021-06-15 16:23:33 +00:00
|
|
|
- build-x86_64
|
2020-12-02 13:50:38 +00:00
|
|
|
- build-misc
|
2020-12-02 13:50:38 +00:00
|
|
|
- amd
|
2020-12-18 03:40:02 +00:00
|
|
|
- intel
|
2021-12-03 00:14:30 +00:00
|
|
|
- nouveau
|
2020-12-02 13:50:38 +00:00
|
|
|
- arm
|
2021-01-25 11:33:52 +00:00
|
|
|
- broadcom
|
2020-12-02 13:50:38 +00:00
|
|
|
- freedreno
|
2020-06-12 11:23:44 +00:00
|
|
|
- etnaviv
|
2020-12-02 13:57:47 +00:00
|
|
|
- software-renderer
|
2020-12-02 13:50:38 +00:00
|
|
|
- layered-backends
|
2020-12-05 09:15:38 +00:00
|
|
|
- deploy
|
2019-01-20 11:21:45 +00:00
|
|
|
|
2020-07-07 13:02:35 +00:00
|
|
|
# Generic rule to not run the job during scheduled pipelines
|
|
|
|
# ----------------------------------------------------------
|
|
|
|
.scheduled_pipelines-rules:
|
|
|
|
rules: &ignore_scheduled_pipelines
|
2020-09-08 15:44:40 +00:00
|
|
|
if: &is-scheduled-pipeline '$CI_PIPELINE_SOURCE == "schedule"'
|
2020-07-07 13:02:35 +00:00
|
|
|
when: never
|
|
|
|
|
2020-09-08 10:20:39 +00:00
|
|
|
# YAML anchors for rule conditions
|
|
|
|
# --------------------------------
|
|
|
|
.rules-anchors:
|
|
|
|
rules:
|
2021-12-16 11:03:18 +00:00
|
|
|
# Pipeline for forked project branch
|
|
|
|
- if: &is-forked-branch '$CI_COMMIT_BRANCH && $CI_PROJECT_NAMESPACE != "mesa"'
|
2020-09-08 15:52:24 +00:00
|
|
|
when: manual
|
2021-04-22 11:17:40 +00:00
|
|
|
# Forked project branch / pre-merge pipeline not for Marge bot
|
2021-12-16 11:09:10 +00:00
|
|
|
- if: &is-forked-branch-or-pre-merge-not-for-marge '$CI_PROJECT_NAMESPACE != "mesa" || ($GITLAB_USER_LOGIN != "marge-bot" && $CI_PIPELINE_SOURCE == "merge_request_event")'
|
2020-09-08 15:30:49 +00:00
|
|
|
when: manual
|
2021-04-26 20:16:55 +00:00
|
|
|
# Pipeline runs for the main branch of the upstream Mesa project
|
2021-12-16 11:03:18 +00:00
|
|
|
- if: &is-mesa-main '$CI_PROJECT_NAMESPACE == "mesa" && $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH && $CI_COMMIT_BRANCH'
|
2020-09-08 10:20:39 +00:00
|
|
|
when: always
|
2020-09-08 15:47:18 +00:00
|
|
|
# Post-merge pipeline
|
2021-12-16 11:03:18 +00:00
|
|
|
- if: &is-post-merge '$CI_PROJECT_NAMESPACE == "mesa" && $CI_COMMIT_BRANCH'
|
2020-09-08 15:47:18 +00:00
|
|
|
when: on_success
|
2020-09-08 10:36:11 +00:00
|
|
|
# Post-merge pipeline, not for Marge Bot
|
2021-12-16 11:03:18 +00:00
|
|
|
- if: &is-post-merge-not-for-marge '$CI_PROJECT_NAMESPACE == "mesa" && $GITLAB_USER_LOGIN != "marge-bot" && $CI_COMMIT_BRANCH'
|
2020-09-08 10:36:11 +00:00
|
|
|
when: on_success
|
2020-09-08 15:58:32 +00:00
|
|
|
# Pre-merge pipeline
|
2021-12-16 11:09:10 +00:00
|
|
|
- if: &is-pre-merge '$CI_PIPELINE_SOURCE == "merge_request_event"'
|
2020-09-08 15:58:32 +00:00
|
|
|
when: on_success
|
2020-09-08 10:31:08 +00:00
|
|
|
# Pre-merge pipeline for Marge Bot
|
2021-12-16 11:09:10 +00:00
|
|
|
- if: &is-pre-merge-for-marge '$GITLAB_USER_LOGIN == "marge-bot" && $CI_PIPELINE_SOURCE == "merge_request_event"'
|
2020-09-08 10:31:08 +00:00
|
|
|
when: on_success
|
2020-09-08 10:20:39 +00:00
|
|
|
|
|
|
|
|
2020-06-22 09:10:29 +00:00
|
|
|
.docs-base:
|
2020-11-18 17:23:29 +00:00
|
|
|
extends:
|
|
|
|
- .fdo.ci-fairy
|
|
|
|
- .ci-run-policy
|
2019-05-27 15:12:10 +00:00
|
|
|
script:
|
2021-06-14 21:55:21 +00:00
|
|
|
- apk --no-cache add graphviz doxygen
|
2022-03-02 11:58:58 +00:00
|
|
|
- pip3 install sphinx breathe mako sphinx_rtd_theme
|
2021-06-14 21:55:21 +00:00
|
|
|
- docs/doxygen-wrapper.py --out-dir=docs/doxygen_xml
|
2021-03-30 10:46:49 +00:00
|
|
|
- sphinx-build -W -b html docs public
|
2020-06-22 09:10:29 +00:00
|
|
|
|
|
|
|
pages:
|
|
|
|
extends: .docs-base
|
2020-06-22 09:10:40 +00:00
|
|
|
stage: deploy
|
2019-05-27 15:12:10 +00:00
|
|
|
artifacts:
|
|
|
|
paths:
|
|
|
|
- public
|
2020-08-06 15:12:11 +00:00
|
|
|
needs: []
|
2020-06-22 09:21:06 +00:00
|
|
|
rules:
|
2020-07-07 13:02:35 +00:00
|
|
|
- *ignore_scheduled_pipelines
|
2021-04-26 20:16:55 +00:00
|
|
|
- if: *is-mesa-main
|
2020-06-22 09:21:06 +00:00
|
|
|
changes: &docs-or-ci
|
|
|
|
- docs/**/*
|
|
|
|
- .gitlab-ci.yml
|
2020-07-01 15:41:06 +00:00
|
|
|
when: always
|
2020-06-22 09:21:06 +00:00
|
|
|
# Other cases default to never
|
2019-01-20 11:21:45 +00:00
|
|
|
|
2020-06-22 09:10:29 +00:00
|
|
|
test-docs:
|
|
|
|
extends: .docs-base
|
2020-07-21 14:13:37 +00:00
|
|
|
# Cancel job if a newer commit is pushed to the same branch
|
|
|
|
interruptible: true
|
2020-08-06 15:10:08 +00:00
|
|
|
stage: deploy
|
2020-12-03 17:25:54 +00:00
|
|
|
needs: []
|
|
|
|
rules:
|
|
|
|
- *ignore_scheduled_pipelines
|
|
|
|
- if: *is-forked-branch
|
|
|
|
changes: *docs-or-ci
|
|
|
|
when: manual
|
|
|
|
# Other cases default to never
|
|
|
|
|
|
|
|
test-docs-mr:
|
|
|
|
extends:
|
|
|
|
- test-docs
|
2020-11-20 10:05:56 +00:00
|
|
|
needs:
|
|
|
|
- sanity
|
2021-01-08 21:08:56 +00:00
|
|
|
artifacts:
|
|
|
|
expose_as: 'Documentation preview'
|
|
|
|
paths:
|
2021-02-10 11:20:25 +00:00
|
|
|
- public/
|
2020-06-22 09:13:05 +00:00
|
|
|
rules:
|
2020-12-03 17:25:54 +00:00
|
|
|
- if: *is-pre-merge
|
2020-09-01 09:44:54 +00:00
|
|
|
changes: *docs-or-ci
|
2021-01-08 21:08:56 +00:00
|
|
|
when: on_success
|
2020-06-22 09:13:05 +00:00
|
|
|
# Other cases default to never
|
2020-06-22 09:10:29 +00:00
|
|
|
|
2019-02-22 15:52:08 +00:00
|
|
|
# When to automatically run the CI
|
2019-09-06 15:35:52 +00:00
|
|
|
.ci-run-policy:
|
2019-09-26 07:27:27 +00:00
|
|
|
rules:
|
2020-07-07 13:02:35 +00:00
|
|
|
- *ignore_scheduled_pipelines
|
2020-04-03 10:50:11 +00:00
|
|
|
# If any files affecting the pipeline are changed, build/test jobs run
|
|
|
|
# automatically once all dependency jobs have passed
|
|
|
|
- changes: &all_paths
|
2020-01-13 08:45:57 +00:00
|
|
|
- VERSION
|
2020-05-14 20:51:38 +00:00
|
|
|
- bin/git_sha1_gen.py
|
|
|
|
- bin/install_megadrivers.py
|
|
|
|
- bin/meson_get_version.py
|
|
|
|
- bin/symbols-check.py
|
2020-01-13 08:45:57 +00:00
|
|
|
# GitLab CI
|
|
|
|
- .gitlab-ci.yml
|
|
|
|
- .gitlab-ci/**/*
|
|
|
|
# Meson
|
|
|
|
- meson*
|
|
|
|
- build-support/**/*
|
|
|
|
- subprojects/**/*
|
|
|
|
# Source code
|
|
|
|
- include/**/*
|
|
|
|
- src/**/*
|
|
|
|
when: on_success
|
2020-04-03 10:50:11 +00:00
|
|
|
# Otherwise, build/test jobs won't run
|
2020-01-13 08:45:57 +00:00
|
|
|
- when: never
|
2019-03-26 17:39:41 +00:00
|
|
|
retry:
|
|
|
|
max: 2
|
|
|
|
when:
|
|
|
|
- runner_system_failure
|
2019-02-22 15:52:08 +00:00
|
|
|
|
2020-01-13 08:45:57 +00:00
|
|
|
|
2019-09-06 15:35:52 +00:00
|
|
|
.ci-deqp-artifacts:
|
2019-06-28 23:35:32 +00:00
|
|
|
artifacts:
|
2020-03-06 11:35:17 +00:00
|
|
|
name: "mesa_${CI_JOB_NAME}"
|
2019-06-28 23:35:32 +00:00
|
|
|
when: always
|
|
|
|
untracked: false
|
|
|
|
paths:
|
|
|
|
# Watch out! Artifacts are relative to the build dir.
|
|
|
|
# https://gitlab.com/gitlab-org/gitlab-ce/commit/8788fb925706cad594adf6917a6c5f6587dd1521
|
|
|
|
- artifacts
|
2021-02-09 16:43:35 +00:00
|
|
|
- _build/meson-logs/*.txt
|
2021-03-04 11:58:56 +00:00
|
|
|
- _build/meson-logs/strace
|
2019-02-22 15:52:08 +00:00
|
|
|
|
2022-04-08 11:29:04 +00:00
|
|
|
.container-rules:
|
2019-10-14 22:04:14 +00:00
|
|
|
extends:
|
|
|
|
- .ci-run-policy
|
2020-04-03 10:50:11 +00:00
|
|
|
rules:
|
2020-07-07 13:02:35 +00:00
|
|
|
- *ignore_scheduled_pipelines
|
2020-06-29 09:33:13 +00:00
|
|
|
# Run pipeline by default in the main project if any CI pipeline
|
|
|
|
# configuration files were changed, to ensure docker images are up to date
|
2020-09-08 15:47:18 +00:00
|
|
|
- if: *is-post-merge
|
2020-06-29 09:33:13 +00:00
|
|
|
changes:
|
|
|
|
- .gitlab-ci.yml
|
|
|
|
- .gitlab-ci/**/*
|
|
|
|
when: on_success
|
2020-04-03 09:46:12 +00:00
|
|
|
# Run pipeline by default if it was triggered by Marge Bot, is for a
|
2020-06-29 09:33:13 +00:00
|
|
|
# merge request, and any files affecting the pipeline were changed
|
2020-09-08 10:31:08 +00:00
|
|
|
- if: *is-pre-merge-for-marge
|
2020-04-03 10:50:11 +00:00
|
|
|
changes:
|
|
|
|
*all_paths
|
|
|
|
when: on_success
|
2020-06-29 09:33:13 +00:00
|
|
|
# Run pipeline by default in the main project if it was not triggered by
|
|
|
|
# Marge Bot, and any files affecting the pipeline were changed
|
2020-09-08 10:36:11 +00:00
|
|
|
- if: *is-post-merge-not-for-marge
|
2020-04-03 10:50:11 +00:00
|
|
|
changes:
|
|
|
|
*all_paths
|
|
|
|
when: on_success
|
2020-06-29 09:33:13 +00:00
|
|
|
# Allow triggering jobs manually in other cases if any files affecting the
|
|
|
|
# pipeline were changed
|
2020-04-03 09:46:12 +00:00
|
|
|
- changes:
|
2020-04-03 10:50:11 +00:00
|
|
|
*all_paths
|
|
|
|
when: manual
|
|
|
|
# Otherwise, container jobs won't run
|
|
|
|
- when: never
|
CI: reduce bandwidth for git pull
Over the last 7 days, git pulls represented a total of 1.7 TB.
On those 1.7 TB, we can see:
- ~300 GB for the CI farm on hetzner
- ~730 GB for the CI farm on packet.net
- ~680 GB for the rest of the world
We can not really change the rest of the world*, but we can
certainly reduce the egress costs towards our CI farms.
Right now, the gitlab runners are not doing a good job at
caching the git trees for the various jobs we make, and
we end up with a lot of cache-misses. A typical pipeline
ends up with a good 2.8GB of git pull data. (a compressed
archive of the mesa folder accounts for 280MB)
In this patch, we implemented what was suggested in
https://gitlab.com/gitlab-org/gitlab/-/issues/215591#note_334642576
- we host a brand new MinIO server on packet
- jobs can upload files on 2 locations:
* git-cache/<namespace>/<project>/<branch-name>.tar.gz
* artifacts/<namespace>/<project>/<pipeline-id>/
- the authorization is handled by gitlab with short tokens
valid only for the time of the job is running
- whenever a job runs, the runner are configured to execute
(eval) $CI_PRE_CLONE_SCRIPT
- this variable is set globally to download the current cache
from the MinIO packet server, unpack it and replace the
possibly out of date cache found on the runner
- then git fetch is run by the runner, and only the delta
between the upstream tree and the local tree gets pulled.
We can rebuild the git cache in a schedule job (once a day
seems sufficient), and then we can stop the cache miss
entirely.
First results showed that instead of pulling 280MB of data
in my fork, I got a pull of only 250KB. That should help us.
* arguably, there are other farms in the rest of the world, so
hopefully we can change those too.
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5428>
2020-06-11 15:16:28 +00:00
|
|
|
|
|
|
|
# Git archive
|
|
|
|
|
|
|
|
make git archive:
|
2020-11-18 17:23:29 +00:00
|
|
|
extends:
|
|
|
|
- .fdo.ci-fairy
|
CI: reduce bandwidth for git pull
Over the last 7 days, git pulls represented a total of 1.7 TB.
On those 1.7 TB, we can see:
- ~300 GB for the CI farm on hetzner
- ~730 GB for the CI farm on packet.net
- ~680 GB for the rest of the world
We can not really change the rest of the world*, but we can
certainly reduce the egress costs towards our CI farms.
Right now, the gitlab runners are not doing a good job at
caching the git trees for the various jobs we make, and
we end up with a lot of cache-misses. A typical pipeline
ends up with a good 2.8GB of git pull data. (a compressed
archive of the mesa folder accounts for 280MB)
In this patch, we implemented what was suggested in
https://gitlab.com/gitlab-org/gitlab/-/issues/215591#note_334642576
- we host a brand new MinIO server on packet
- jobs can upload files on 2 locations:
* git-cache/<namespace>/<project>/<branch-name>.tar.gz
* artifacts/<namespace>/<project>/<pipeline-id>/
- the authorization is handled by gitlab with short tokens
valid only for the time of the job is running
- whenever a job runs, the runner are configured to execute
(eval) $CI_PRE_CLONE_SCRIPT
- this variable is set globally to download the current cache
from the MinIO packet server, unpack it and replace the
possibly out of date cache found on the runner
- then git fetch is run by the runner, and only the delta
between the upstream tree and the local tree gets pulled.
We can rebuild the git cache in a schedule job (once a day
seems sufficient), and then we can stop the cache miss
entirely.
First results showed that instead of pulling 280MB of data
in my fork, I got a pull of only 250KB. That should help us.
* arguably, there are other farms in the rest of the world, so
hopefully we can change those too.
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5428>
2020-06-11 15:16:28 +00:00
|
|
|
stage: git-archive
|
2020-07-07 13:02:35 +00:00
|
|
|
rules:
|
2020-09-08 15:44:40 +00:00
|
|
|
- if: *is-scheduled-pipeline
|
2020-07-07 13:02:35 +00:00
|
|
|
when: on_success
|
CI: reduce bandwidth for git pull
Over the last 7 days, git pulls represented a total of 1.7 TB.
On those 1.7 TB, we can see:
- ~300 GB for the CI farm on hetzner
- ~730 GB for the CI farm on packet.net
- ~680 GB for the rest of the world
We can not really change the rest of the world*, but we can
certainly reduce the egress costs towards our CI farms.
Right now, the gitlab runners are not doing a good job at
caching the git trees for the various jobs we make, and
we end up with a lot of cache-misses. A typical pipeline
ends up with a good 2.8GB of git pull data. (a compressed
archive of the mesa folder accounts for 280MB)
In this patch, we implemented what was suggested in
https://gitlab.com/gitlab-org/gitlab/-/issues/215591#note_334642576
- we host a brand new MinIO server on packet
- jobs can upload files on 2 locations:
* git-cache/<namespace>/<project>/<branch-name>.tar.gz
* artifacts/<namespace>/<project>/<pipeline-id>/
- the authorization is handled by gitlab with short tokens
valid only for the time of the job is running
- whenever a job runs, the runner are configured to execute
(eval) $CI_PRE_CLONE_SCRIPT
- this variable is set globally to download the current cache
from the MinIO packet server, unpack it and replace the
possibly out of date cache found on the runner
- then git fetch is run by the runner, and only the delta
between the upstream tree and the local tree gets pulled.
We can rebuild the git cache in a schedule job (once a day
seems sufficient), and then we can stop the cache miss
entirely.
First results showed that instead of pulling 280MB of data
in my fork, I got a pull of only 250KB. That should help us.
* arguably, there are other farms in the rest of the world, so
hopefully we can change those too.
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5428>
2020-06-11 15:16:28 +00:00
|
|
|
# ensure we are running on packet
|
|
|
|
tags:
|
|
|
|
- packet.net
|
|
|
|
script:
|
2020-12-04 13:55:54 +00:00
|
|
|
# Compactify the .git directory
|
|
|
|
- git gc --aggressive
|
CI: reduce bandwidth for git pull
Over the last 7 days, git pulls represented a total of 1.7 TB.
On those 1.7 TB, we can see:
- ~300 GB for the CI farm on hetzner
- ~730 GB for the CI farm on packet.net
- ~680 GB for the rest of the world
We can not really change the rest of the world*, but we can
certainly reduce the egress costs towards our CI farms.
Right now, the gitlab runners are not doing a good job at
caching the git trees for the various jobs we make, and
we end up with a lot of cache-misses. A typical pipeline
ends up with a good 2.8GB of git pull data. (a compressed
archive of the mesa folder accounts for 280MB)
In this patch, we implemented what was suggested in
https://gitlab.com/gitlab-org/gitlab/-/issues/215591#note_334642576
- we host a brand new MinIO server on packet
- jobs can upload files on 2 locations:
* git-cache/<namespace>/<project>/<branch-name>.tar.gz
* artifacts/<namespace>/<project>/<pipeline-id>/
- the authorization is handled by gitlab with short tokens
valid only for the time of the job is running
- whenever a job runs, the runner are configured to execute
(eval) $CI_PRE_CLONE_SCRIPT
- this variable is set globally to download the current cache
from the MinIO packet server, unpack it and replace the
possibly out of date cache found on the runner
- then git fetch is run by the runner, and only the delta
between the upstream tree and the local tree gets pulled.
We can rebuild the git cache in a schedule job (once a day
seems sufficient), and then we can stop the cache miss
entirely.
First results showed that instead of pulling 280MB of data
in my fork, I got a pull of only 250KB. That should help us.
* arguably, there are other farms in the rest of the world, so
hopefully we can change those too.
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5428>
2020-06-11 15:16:28 +00:00
|
|
|
# compress the current folder
|
|
|
|
- tar -cvzf ../$CI_PROJECT_NAME.tar.gz .
|
|
|
|
|
2021-12-02 13:10:26 +00:00
|
|
|
# login with the JWT token file
|
|
|
|
- ci-fairy minio login --token-file "${CI_JOB_JWT_FILE}"
|
2020-08-23 20:32:40 +00:00
|
|
|
- ci-fairy minio cp ../$CI_PROJECT_NAME.tar.gz minio://$MINIO_HOST/git-cache/$CI_PROJECT_NAMESPACE/$CI_PROJECT_NAME/$CI_PROJECT_NAME.tar.gz
|
CI: reduce bandwidth for git pull
Over the last 7 days, git pulls represented a total of 1.7 TB.
On those 1.7 TB, we can see:
- ~300 GB for the CI farm on hetzner
- ~730 GB for the CI farm on packet.net
- ~680 GB for the rest of the world
We can not really change the rest of the world*, but we can
certainly reduce the egress costs towards our CI farms.
Right now, the gitlab runners are not doing a good job at
caching the git trees for the various jobs we make, and
we end up with a lot of cache-misses. A typical pipeline
ends up with a good 2.8GB of git pull data. (a compressed
archive of the mesa folder accounts for 280MB)
In this patch, we implemented what was suggested in
https://gitlab.com/gitlab-org/gitlab/-/issues/215591#note_334642576
- we host a brand new MinIO server on packet
- jobs can upload files on 2 locations:
* git-cache/<namespace>/<project>/<branch-name>.tar.gz
* artifacts/<namespace>/<project>/<pipeline-id>/
- the authorization is handled by gitlab with short tokens
valid only for the time of the job is running
- whenever a job runs, the runner are configured to execute
(eval) $CI_PRE_CLONE_SCRIPT
- this variable is set globally to download the current cache
from the MinIO packet server, unpack it and replace the
possibly out of date cache found on the runner
- then git fetch is run by the runner, and only the delta
between the upstream tree and the local tree gets pulled.
We can rebuild the git cache in a schedule job (once a day
seems sufficient), and then we can stop the cache miss
entirely.
First results showed that instead of pulling 280MB of data
in my fork, I got a pull of only 250KB. That should help us.
* arguably, there are other farms in the rest of the world, so
hopefully we can change those too.
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5428>
2020-06-11 15:16:28 +00:00
|
|
|
|
|
|
|
|
2020-08-06 15:37:33 +00:00
|
|
|
# Sanity checks of MR settings and commit logs
|
2020-11-18 17:48:47 +00:00
|
|
|
sanity:
|
2020-11-18 17:23:29 +00:00
|
|
|
extends:
|
|
|
|
- .fdo.ci-fairy
|
2020-08-06 15:37:33 +00:00
|
|
|
stage: sanity
|
|
|
|
rules:
|
2020-12-10 11:48:32 +00:00
|
|
|
- if: *is-pre-merge
|
2020-08-06 15:37:33 +00:00
|
|
|
when: on_success
|
|
|
|
# Other cases default to never
|
2020-12-03 17:58:09 +00:00
|
|
|
variables:
|
|
|
|
GIT_STRATEGY: none
|
2020-08-06 15:37:33 +00:00
|
|
|
script:
|
2020-12-01 13:27:42 +00:00
|
|
|
# ci-fairy check-commits --junit-xml=check-commits.xml
|
2020-11-18 17:48:47 +00:00
|
|
|
- ci-fairy check-merge-request --require-allow-collaboration --junit-xml=check-merge-request.xml
|
|
|
|
artifacts:
|
|
|
|
when: on_failure
|
|
|
|
reports:
|
|
|
|
junit: check-*.xml
|
2020-08-06 15:37:33 +00:00
|
|
|
|
2022-06-16 22:26:53 +00:00
|
|
|
# Rules for tests that should not block merging, but should be available to
|
|
|
|
# optionally run with the "play" button in the UI in pre-merge non-marge
|
|
|
|
# pipelines.
|
2021-04-22 11:17:40 +00:00
|
|
|
.test-manual-mr:
|
|
|
|
rules:
|
|
|
|
- *ignore_scheduled_pipelines
|
|
|
|
- if: *is-forked-branch-or-pre-merge-not-for-marge
|
|
|
|
changes:
|
|
|
|
*all_paths
|
|
|
|
when: manual
|
|
|
|
- when: never
|
|
|
|
variables:
|
|
|
|
GIT_STRATEGY: none
|
2021-10-22 14:23:21 +00:00
|
|
|
JOB_TIMEOUT: 80
|
2021-04-22 11:17:40 +00:00
|
|
|
|