286 lines · yaml
1variables:2 DRM_CI_PROJECT_PATH: &drm-ci-project-path mesa/mesa3 DRM_CI_COMMIT_SHA: &drm-ci-commit-sha d9849ac46623797a9f56fb9d46dc52460ac477de4 5 UPSTREAM_REPO: https://gitlab.freedesktop.org/drm/kernel.git6 TARGET_BRANCH: drm-next7 8 IGT_VERSION: f13702b8e4e847c56da3ef6f0969065d686049c59 10 DEQP_RUNNER_GIT_URL: https://gitlab.freedesktop.org/mesa/deqp-runner.git11 DEQP_RUNNER_GIT_TAG: v0.15.012 13 FDO_UPSTREAM_REPO: helen.fornazier/linux # The repo where the git-archive daily runs14 MESA_TEMPLATES_COMMIT: &ci-templates-commit d5aa3941aa03c2f716595116354fb81eb8012acb15 DRM_CI_PROJECT_URL: https://gitlab.freedesktop.org/${DRM_CI_PROJECT_PATH}16 CI_PRE_CLONE_SCRIPT: |-17 set -o xtrace18 curl -L --retry 4 -f --retry-all-errors --retry-delay 60 -s ${DRM_CI_PROJECT_URL}/-/raw/${DRM_CI_COMMIT_SHA}/.gitlab-ci/download-git-cache.sh -o download-git-cache.sh19 bash download-git-cache.sh20 rm download-git-cache.sh21 set +o xtrace22 S3_JWT_FILE: /s3_jwt23 S3_HOST: s3.freedesktop.org24 # This bucket is used to fetch the kernel image25 S3_KERNEL_BUCKET: mesa-rootfs26 # Bucket for git cache27 S3_GITCACHE_BUCKET: git-cache28 # Bucket for the pipeline artifacts pushed to S329 S3_ARTIFACTS_BUCKET: artifacts30 # per-pipeline artifact storage on MinIO31 PIPELINE_ARTIFACTS_BASE: ${S3_HOST}/${S3_ARTIFACTS_BUCKET}/${CI_PROJECT_PATH}/${CI_PIPELINE_ID}32 # per-job artifact storage on MinIO33 JOB_ARTIFACTS_BASE: ${PIPELINE_ARTIFACTS_BASE}/${CI_JOB_ID}34 # default kernel for rootfs before injecting the current kernel tree35 KERNEL_REPO: "gfx-ci/linux"36 KERNEL_TAG: "v6.6.21-mesa-f8ea"37 KERNEL_IMAGE_BASE: https://${S3_HOST}/${S3_KERNEL_BUCKET}/${KERNEL_REPO}/${KERNEL_TAG}38 PKG_REPO_REV: "3cc12a2a"39 LAVA_TAGS: subset-1-gfx40 LAVA_JOB_PRIORITY: 3041 ARTIFACTS_BASE_URL: https://${CI_PROJECT_ROOT_NAMESPACE}.${CI_PAGES_DOMAIN}/-/${CI_PROJECT_NAME}/-/jobs/${CI_JOB_ID}/artifacts42 # Python scripts for structured logger43 PYTHONPATH: "$PYTHONPATH:$CI_PROJECT_DIR/install"44 45default:46 id_tokens:47 S3_JWT:48 aud: https://s3.freedesktop.org49 before_script:50 - export SCRIPTS_DIR=$(mktemp -d)51 - curl -L -s --retry 4 -f --retry-all-errors --retry-delay 60 -O --output-dir "${SCRIPTS_DIR}" "${DRM_CI_PROJECT_URL}/-/raw/${DRM_CI_COMMIT_SHA}/.gitlab-ci/setup-test-env.sh"52 - source ${SCRIPTS_DIR}/setup-test-env.sh53 - echo -e "\e[0Ksection_start:$(date +%s):unset_env_vars_section[collapsed=true]\r\e[0KUnsetting vulnerable environment variables"54 - echo -n "${S3_JWT}" > "${S3_JWT_FILE}"55 - unset CI_JOB_JWT S3_JWT56 - echo -e "\e[0Ksection_end:$(date +%s):unset_env_vars_section\r\e[0K"57 58 - echo -e "\e[0Ksection_start:$(date +%s):drm_ci_download_section[collapsed=true]\r\e[0KDownloading mesa from $DRM_CI_PROJECT_URL/-/archive/$DRM_CI_COMMIT_SHA/mesa-$DRM_CI_COMMIT_SHA.tar.gz"59 - cd $CI_PROJECT_DIR60 - curl --output - $DRM_CI_PROJECT_URL/-/archive/$DRM_CI_COMMIT_SHA/mesa-$DRM_CI_COMMIT_SHA.tar.gz | tar -xz61 - mv mesa-$DRM_CI_COMMIT_SHA/.gitlab-ci* .62 - mv mesa-$DRM_CI_COMMIT_SHA/bin/ci .63 - rm -rf mesa-$DRM_CI_COMMIT_SHA/64 - echo -e "\e[0Ksection_end:$(date +%s):drm_ci_download_section\r\e[0K"65 66 after_script:67 - >68 set +x69 70 test -e "${S3_JWT_FILE}" &&71 export S3_JWT="$(<${S3_JWT_FILE})" &&72 rm "${S3_JWT_FILE}"73 74include:75 - project: 'freedesktop/ci-templates'76 ref: 16bc29078de5e0a067ff84a1a199a3760d3b381177 file:78 - '/templates/ci-fairy.yml'79 - project: 'freedesktop/ci-templates'80 ref: *ci-templates-commit81 file:82 - '/templates/alpine.yml'83 - '/templates/debian.yml'84 - '/templates/fedora.yml'85 - project: *drm-ci-project-path86 ref: *drm-ci-commit-sha87 file:88 - '/.gitlab-ci/container/gitlab-ci.yml'89 - '/.gitlab-ci/farm-rules.yml'90 - '/.gitlab-ci/lava/lava-gitlab-ci.yml'91 - '/.gitlab-ci/test-source-dep.yml'92 - '/.gitlab-ci/test/gitlab-ci.yml'93 - '/src/amd/ci/gitlab-ci-inc.yml'94 - '/src/freedreno/ci/gitlab-ci-inc.yml'95 - '/src/gallium/drivers/crocus/ci/gitlab-ci-inc.yml'96 - '/src/gallium/drivers/llvmpipe/ci/gitlab-ci-inc.yml'97 - '/src/gallium/drivers/nouveau/ci/gitlab-ci-inc.yml'98 - '/src/gallium/drivers/softpipe/ci/gitlab-ci-inc.yml'99 - '/src/gallium/drivers/virgl/ci/gitlab-ci-inc.yml'100 - '/src/gallium/drivers/zink/ci/gitlab-ci-inc.yml'101 - '/src/gallium/frontends/lavapipe/ci/gitlab-ci-inc.yml'102 - '/src/gallium/frontends/rusticl/ci/gitlab-ci.yml'103 - '/src/intel/ci/gitlab-ci-inc.yml'104 - '/src/microsoft/ci/gitlab-ci-inc.yml'105 - '/src/nouveau/ci/gitlab-ci-inc.yml'106 - '/src/virtio/ci/gitlab-ci-inc.yml'107 - drivers/gpu/drm/ci/image-tags.yml108 - drivers/gpu/drm/ci/container.yml109 - drivers/gpu/drm/ci/static-checks.yml110 - drivers/gpu/drm/ci/build.yml111 - drivers/gpu/drm/ci/test.yml112 - 'https://gitlab.freedesktop.org/gfx-ci/lab-status/-/raw/main/lab-status.yml'113 114 115stages:116 - sanity117 - container118 - code-validation119 - git-archive120 - build121 - amdgpu122 - i915123 - mediatek124 - meson125 - msm126 - panfrost127 - powervr128 - rockchip129 - software-driver130 131# YAML anchors for rule conditions132# --------------------------------133.rules-anchors:134 rules:135 # Pipeline for forked project branch136 - if: &is-forked-branch '$CI_COMMIT_BRANCH && $CI_PROJECT_NAMESPACE != "mesa"'137 when: manual138 # Forked project branch / pre-merge pipeline not for Marge bot139 - 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")'140 when: manual141 # Pipeline runs for the main branch of the upstream Mesa project142 - if: &is-mesa-main '$CI_PROJECT_NAMESPACE == "mesa" && $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH && $CI_COMMIT_BRANCH'143 when: always144 # Post-merge pipeline145 - if: &is-post-merge '$CI_PROJECT_NAMESPACE == "mesa" && $CI_COMMIT_BRANCH'146 when: on_success147 # Post-merge pipeline, not for Marge Bot148 - if: &is-post-merge-not-for-marge '$CI_PROJECT_NAMESPACE == "mesa" && $GITLAB_USER_LOGIN != "marge-bot" && $CI_COMMIT_BRANCH'149 when: on_success150 # Pre-merge pipeline151 - if: &is-pre-merge '$CI_PIPELINE_SOURCE == "merge_request_event"'152 when: on_success153 # Pre-merge pipeline for Marge Bot154 - if: &is-pre-merge-for-marge '$GITLAB_USER_LOGIN == "marge-bot" && $CI_PIPELINE_SOURCE == "merge_request_event"'155 when: on_success156 157.never-post-merge-rules:158 rules:159 - if: *is-post-merge160 when: never161 162# Rule to filter for only scheduled pipelines.163.scheduled_pipeline-rules:164 rules:165 - if: &is-scheduled-pipeline '$CI_PIPELINE_SOURCE == "schedule"'166 when: on_success167 168# Generic rule to not run the job during scheduled pipelines. Jobs that aren't169# something like a nightly run should include this rule.170.no_scheduled_pipelines-rules:171 rules:172 - if: *is-scheduled-pipeline173 when: never174 175# When to automatically run the CI for build jobs176.build-rules:177 rules:178 - !reference [.no_scheduled_pipelines-rules, rules]179 - !reference [.never-post-merge-rules, rules]180 # Run automatically once all dependency jobs have passed181 - when: on_success182 183# When to automatically run the CI for container jobs184.container+build-rules:185 rules:186 - !reference [.no_scheduled_pipelines-rules, rules]187 - !reference [.never-post-merge-rules, rules]188 - when: manual189 190.ci-deqp-artifacts:191 artifacts:192 name: "mesa_${CI_JOB_NAME}"193 when: always194 untracked: false195 paths:196 # Watch out! Artifacts are relative to the build dir.197 # https://gitlab.com/gitlab-org/gitlab-ce/commit/8788fb925706cad594adf6917a6c5f6587dd1521198 - artifacts199 - _build/meson-logs/*.txt200 - _build/meson-logs/strace201 202 203.container-rules:204 rules:205 - !reference [.no_scheduled_pipelines-rules, rules]206 - !reference [.never-post-merge-rules, rules]207 # Run pipeline by default in the main project if any CI pipeline208 # configuration files were changed, to ensure docker images are up to date209 - if: *is-post-merge210 changes:211 - drivers/gpu/drm/ci/**/*212 when: on_success213 # Run pipeline by default if it was triggered by Marge Bot, is for a214 # merge request, and any files affecting the pipeline were changed215 - if: *is-pre-merge-for-marge216 when: on_success217 # Run pipeline by default in the main project if it was not triggered by218 # Marge Bot, and any files affecting the pipeline were changed219 - if: *is-post-merge-not-for-marge220 when: on_success221 # Allow triggering jobs manually in other cases222 - when: manual223 224 225 226# Git archive227 228make git archive:229 extends:230 - .fdo.ci-fairy231 stage: git-archive232 rules:233 - !reference [.scheduled_pipeline-rules, rules]234 # ensure we are running on packet235 tags:236 - packet.net237 script:238 # Remove drm-ci files we just added239 - rm -rf .gitlab-ci.*240 - rm -rf ci241 242 # Compactify the .git directory243 - git gc --aggressive244 # compress the current folder245 - tar -cvzf ../$CI_PROJECT_NAME.tar.gz .246 247 # Use id_tokens for JWT auth248 - ci-fairy s3cp --token-file "${S3_JWT_FILE}" ../$CI_PROJECT_NAME.tar.gz https://$S3_HOST/${S3_GITCACHE_BUCKET}/$CI_PROJECT_NAMESPACE/$CI_PROJECT_NAME/$CI_PROJECT_NAME.tar.gz249 250 251# Sanity checks of MR settings and commit logs252sanity:253 extends:254 - .fdo.ci-fairy255 stage: sanity256 rules:257 - if: *is-pre-merge258 when: on_success259 # Other cases default to never260 variables:261 GIT_STRATEGY: none262 script:263 # ci-fairy check-commits --junit-xml=check-commits.xml264 - ci-fairy check-merge-request --require-allow-collaboration --junit-xml=check-merge-request.xml265 artifacts:266 when: on_failure267 reports:268 junit: check-*.xml269 270# Rules for tests that should not block merging, but should be available to271# optionally run with the "play" button in the UI in pre-merge non-marge272# pipelines. This should appear in "extends:" after any includes of273# test-source-dep.yml rules, so that these rules replace those.274.test-manual-mr:275 rules:276 - !reference [.no_scheduled_pipelines-rules, rules]277 - if: *is-forked-branch-or-pre-merge-not-for-marge278 when: manual279 variables:280 JOB_TIMEOUT: 80281 282 283# Jobs that need to pass before spending hardware resources on further testing284.required-for-hardware-jobs:285 needs: []286