17ec681f3Smrgvariables:
27ec681f3Smrg  FDO_UPSTREAM_REPO: mesa/mesa
37ec681f3Smrg  MESA_TEMPLATES_COMMIT: &ci-templates-commit 290b79e0e78eab67a83766f4e9691be554fc4afd
47ec681f3Smrg  CI_PRE_CLONE_SCRIPT: |-
57ec681f3Smrg          set -o xtrace
67ec681f3Smrg          /usr/bin/wget -q -O- ${CI_PROJECT_URL}/-/raw/${CI_COMMIT_SHA}/.gitlab-ci/download-git-cache.sh | bash -
77ec681f3Smrg          set +o xtrace
87ec681f3Smrg  MINIO_HOST: minio-packet.freedesktop.org
97ec681f3Smrg  # per-pipeline artifact storage on MinIO
107ec681f3Smrg  PIPELINE_ARTIFACTS_BASE: ${MINIO_HOST}/artifacts/${CI_PROJECT_PATH}/${CI_PIPELINE_ID}
117ec681f3Smrg  # per-job artifact storage on MinIO
127ec681f3Smrg  JOB_ARTIFACTS_BASE: ${PIPELINE_ARTIFACTS_BASE}/${CI_JOB_ID}
137ec681f3Smrg  # reference images stored for traces
147ec681f3Smrg  PIGLIT_REPLAY_REFERENCE_IMAGES_BASE: "${MINIO_HOST}/mesa-tracie-results/$FDO_UPSTREAM_REPO"
157ec681f3Smrg  # Individual CI farm status, set to "offline" to disable jobs
167ec681f3Smrg  # running on a particular CI farm (ie. for outages, etc):
177ec681f3Smrg  FD_FARM: "online"
187ec681f3Smrg
197ec681f3Smrginclude:
207ec681f3Smrg  - project: 'freedesktop/ci-templates'
217ec681f3Smrg    ref: 79c325922670137e8f0a4dc5f6f097e0eb57c1af
227ec681f3Smrg    file:
237ec681f3Smrg      - '/templates/ci-fairy.yml'
247ec681f3Smrg  - project: 'freedesktop/ci-templates'
257ec681f3Smrg    ref: *ci-templates-commit
267ec681f3Smrg    file:
277ec681f3Smrg      - '/templates/debian.yml'
287ec681f3Smrg      - '/templates/fedora.yml'
297ec681f3Smrg  - local: '.gitlab-ci/lava/lava-gitlab-ci.yml'
307ec681f3Smrg  - local: '.gitlab-ci/test-source-dep.yml'
317ec681f3Smrg  - local: 'src/amd/ci/gitlab-ci.yml'
327ec681f3Smrg  - local: 'src/broadcom/ci/gitlab-ci.yml'
337ec681f3Smrg  - local: 'src/etnaviv/ci/gitlab-ci.yml'
347ec681f3Smrg  - local: 'src/freedreno/ci/gitlab-ci.yml'
357ec681f3Smrg  - local: 'src/gallium/drivers/i915/ci/gitlab-ci.yml'
367ec681f3Smrg  - local: 'src/gallium/drivers/iris/ci/gitlab-ci.yml'
377ec681f3Smrg  - local: 'src/gallium/drivers/lima/ci/gitlab-ci.yml'
387ec681f3Smrg  - local: 'src/gallium/drivers/llvmpipe/ci/gitlab-ci.yml'
397ec681f3Smrg  - local: 'src/gallium/drivers/radeonsi/ci/gitlab-ci.yml'
407ec681f3Smrg  - local: 'src/gallium/drivers/softpipe/ci/gitlab-ci.yml'
417ec681f3Smrg  - local: 'src/gallium/drivers/virgl/ci/gitlab-ci.yml'
427ec681f3Smrg  - local: 'src/gallium/drivers/zink/ci/gitlab-ci.yml'
437ec681f3Smrg  - local: 'src/gallium/frontends/lavapipe/ci/gitlab-ci.yml'
447ec681f3Smrg  - local: 'src/panfrost/ci/gitlab-ci.yml'
457ec681f3Smrg
467ec681f3Smrgstages:
477ec681f3Smrg  - sanity
487ec681f3Smrg  - container
497ec681f3Smrg  - git-archive
507ec681f3Smrg  - build-x86_64
517ec681f3Smrg  - build-misc
527ec681f3Smrg  - amd
537ec681f3Smrg  - intel
547ec681f3Smrg  - arm
557ec681f3Smrg  - broadcom
567ec681f3Smrg  - freedreno
577ec681f3Smrg  - etnaviv
587ec681f3Smrg  - software-renderer
597ec681f3Smrg  - layered-backends
607ec681f3Smrg  - deploy
617ec681f3Smrg
627ec681f3Smrg# Generic rule to not run the job during scheduled pipelines
637ec681f3Smrg# ----------------------------------------------------------
647ec681f3Smrg.scheduled_pipelines-rules:
657ec681f3Smrg  rules: &ignore_scheduled_pipelines
667ec681f3Smrg    if: &is-scheduled-pipeline '$CI_PIPELINE_SOURCE == "schedule"'
677ec681f3Smrg    when: never
687ec681f3Smrg
697ec681f3Smrg# YAML anchors for rule conditions
707ec681f3Smrg# --------------------------------
717ec681f3Smrg.rules-anchors:
727ec681f3Smrg  rules:
737ec681f3Smrg    # For Marge Bot
747ec681f3Smrg    - if: &is-for-marge '$GITLAB_USER_LOGIN == "marge-bot"'
757ec681f3Smrg      when: never
767ec681f3Smrg    # Forked project branch
777ec681f3Smrg    - if: &is-forked-branch '$CI_PROJECT_NAMESPACE != "mesa" && $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME != $CI_COMMIT_REF_NAME'
787ec681f3Smrg      when: manual
797ec681f3Smrg    # Forked project branch / pre-merge pipeline not for Marge bot
807ec681f3Smrg    - if: &is-forked-branch-or-pre-merge-not-for-marge '$CI_PROJECT_NAMESPACE != "mesa" || ($GITLAB_USER_LOGIN != "marge-bot" && $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME == $CI_COMMIT_REF_NAME)'
817ec681f3Smrg      when: manual
827ec681f3Smrg    # Pipeline runs for the main branch of the upstream Mesa project
837ec681f3Smrg    - if: &is-mesa-main '$CI_PROJECT_NAMESPACE == "mesa" && $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH && $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME != $CI_DEFAULT_BRANCH'
847ec681f3Smrg      when: always
857ec681f3Smrg    # Post-merge pipeline
867ec681f3Smrg    - if: &is-post-merge '$CI_PROJECT_NAMESPACE == "mesa" && $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME != $CI_COMMIT_REF_NAME'
877ec681f3Smrg      when: on_success
887ec681f3Smrg    # Post-merge pipeline, not for Marge Bot
897ec681f3Smrg    - if: &is-post-merge-not-for-marge '$CI_PROJECT_NAMESPACE == "mesa" && $GITLAB_USER_LOGIN != "marge-bot" && $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME != $CI_COMMIT_REF_NAME'
907ec681f3Smrg      when: on_success
917ec681f3Smrg    # Pre-merge pipeline
927ec681f3Smrg    - if: &is-pre-merge '$CI_MERGE_REQUEST_SOURCE_BRANCH_NAME == $CI_COMMIT_REF_NAME'
937ec681f3Smrg      when: on_success
947ec681f3Smrg    # Pre-merge pipeline for Marge Bot
957ec681f3Smrg    - if: &is-pre-merge-for-marge '$GITLAB_USER_LOGIN == "marge-bot" && $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME == $CI_COMMIT_REF_NAME'
967ec681f3Smrg      when: on_success
977ec681f3Smrg
987ec681f3Smrg
997ec681f3Smrg.docs-base:
1007ec681f3Smrg  extends:
1017ec681f3Smrg    - .fdo.ci-fairy
1027ec681f3Smrg    - .ci-run-policy
1037ec681f3Smrg  script:
1047ec681f3Smrg  - apk --no-cache add graphviz doxygen
1057ec681f3Smrg  - pip3 install "sphinx<4.0" breathe mako sphinx_rtd_theme
1067ec681f3Smrg  - docs/doxygen-wrapper.py --out-dir=docs/doxygen_xml
1077ec681f3Smrg  - sphinx-build -W -b html docs public
1087ec681f3Smrg
1097ec681f3Smrgpages:
1107ec681f3Smrg  extends: .docs-base
1117ec681f3Smrg  stage: deploy
1127ec681f3Smrg  artifacts:
1137ec681f3Smrg    paths:
1147ec681f3Smrg    - public
1157ec681f3Smrg  needs: []
1167ec681f3Smrg  rules:
1177ec681f3Smrg    - *ignore_scheduled_pipelines
1187ec681f3Smrg    - if: *is-mesa-main
1197ec681f3Smrg      changes: &docs-or-ci
1207ec681f3Smrg      - docs/**/*
1217ec681f3Smrg      - .gitlab-ci.yml
1227ec681f3Smrg      when: always
1237ec681f3Smrg    # Other cases default to never
1247ec681f3Smrg
1257ec681f3Smrgtest-docs:
1267ec681f3Smrg  extends: .docs-base
1277ec681f3Smrg  # Cancel job if a newer commit is pushed to the same branch
1287ec681f3Smrg  interruptible: true
1297ec681f3Smrg  stage: deploy
1307ec681f3Smrg  needs: []
1317ec681f3Smrg  rules:
1327ec681f3Smrg    - *ignore_scheduled_pipelines
1337ec681f3Smrg    - if: *is-forked-branch
1347ec681f3Smrg      changes: *docs-or-ci
1357ec681f3Smrg      when: manual
1367ec681f3Smrg    # Other cases default to never
1377ec681f3Smrg
1387ec681f3Smrgtest-docs-mr:
1397ec681f3Smrg  extends:
1407ec681f3Smrg    - test-docs
1417ec681f3Smrg  needs:
1427ec681f3Smrg    - sanity
1437ec681f3Smrg  artifacts:
1447ec681f3Smrg    expose_as: 'Documentation preview'
1457ec681f3Smrg    paths:
1467ec681f3Smrg    - public/
1477ec681f3Smrg  rules:
1487ec681f3Smrg    - if: *is-pre-merge
1497ec681f3Smrg      changes: *docs-or-ci
1507ec681f3Smrg      when: on_success
1517ec681f3Smrg    # Other cases default to never
1527ec681f3Smrg
1537ec681f3Smrg# When to automatically run the CI
1547ec681f3Smrg.ci-run-policy:
1557ec681f3Smrg  rules:
1567ec681f3Smrg    - *ignore_scheduled_pipelines
1577ec681f3Smrg    # If any files affecting the pipeline are changed, build/test jobs run
1587ec681f3Smrg    # automatically once all dependency jobs have passed
1597ec681f3Smrg    - changes: &all_paths
1607ec681f3Smrg      - VERSION
1617ec681f3Smrg      - bin/git_sha1_gen.py
1627ec681f3Smrg      - bin/install_megadrivers.py
1637ec681f3Smrg      - bin/meson_get_version.py
1647ec681f3Smrg      - bin/symbols-check.py
1657ec681f3Smrg      # GitLab CI
1667ec681f3Smrg      - .gitlab-ci.yml
1677ec681f3Smrg      - .gitlab-ci/**/*
1687ec681f3Smrg      # Meson
1697ec681f3Smrg      - meson*
1707ec681f3Smrg      - build-support/**/*
1717ec681f3Smrg      - subprojects/**/*
1727ec681f3Smrg      # Source code
1737ec681f3Smrg      - include/**/*
1747ec681f3Smrg      - src/**/*
1757ec681f3Smrg      when: on_success
1767ec681f3Smrg    # Otherwise, build/test jobs won't run
1777ec681f3Smrg    - when: never
1787ec681f3Smrg  retry:
1797ec681f3Smrg    max: 2
1807ec681f3Smrg    when:
1817ec681f3Smrg      - runner_system_failure
1827ec681f3Smrg
1837ec681f3Smrg
1847ec681f3Smrg.ci-deqp-artifacts:
1857ec681f3Smrg  artifacts:
1867ec681f3Smrg    name: "mesa_${CI_JOB_NAME}"
1877ec681f3Smrg    when: always
1887ec681f3Smrg    untracked: false
1897ec681f3Smrg    paths:
1907ec681f3Smrg      # Watch out!  Artifacts are relative to the build dir.
1917ec681f3Smrg      # https://gitlab.com/gitlab-org/gitlab-ce/commit/8788fb925706cad594adf6917a6c5f6587dd1521
1927ec681f3Smrg      - artifacts
1937ec681f3Smrg      - _build/meson-logs/*.txt
1947ec681f3Smrg      - _build/meson-logs/strace
1957ec681f3Smrg
1967ec681f3Smrg
1977ec681f3Smrg# Docker image tag helper templates
1987ec681f3Smrg
1997ec681f3Smrg.incorporate-templates-commit:
2007ec681f3Smrg  variables:
2017ec681f3Smrg    FDO_DISTRIBUTION_TAG: "${MESA_IMAGE_TAG}--${MESA_TEMPLATES_COMMIT}"
2027ec681f3Smrg
2037ec681f3Smrg.incorporate-base-tag+templates-commit:
2047ec681f3Smrg  variables:
2057ec681f3Smrg    FDO_BASE_IMAGE: "${CI_REGISTRY_IMAGE}/${MESA_BASE_IMAGE}:${MESA_BASE_TAG}--${MESA_TEMPLATES_COMMIT}"
2067ec681f3Smrg    FDO_DISTRIBUTION_TAG: "${MESA_IMAGE_TAG}--${MESA_BASE_TAG}--${MESA_TEMPLATES_COMMIT}"
2077ec681f3Smrg
2087ec681f3Smrg.set-image:
2097ec681f3Smrg  extends:
2107ec681f3Smrg    - .incorporate-templates-commit
2117ec681f3Smrg  variables:
2127ec681f3Smrg    MESA_IMAGE: "$CI_REGISTRY_IMAGE/${MESA_IMAGE_PATH}:${FDO_DISTRIBUTION_TAG}"
2137ec681f3Smrg  image: "$MESA_IMAGE"
2147ec681f3Smrg
2157ec681f3Smrg.set-image-base-tag:
2167ec681f3Smrg  extends:
2177ec681f3Smrg    - .set-image
2187ec681f3Smrg    - .incorporate-base-tag+templates-commit
2197ec681f3Smrg  variables:
2207ec681f3Smrg    MESA_IMAGE: "$CI_REGISTRY_IMAGE/${MESA_IMAGE_PATH}:${FDO_DISTRIBUTION_TAG}"
2217ec681f3Smrg
2227ec681f3Smrg
2237ec681f3Smrg# Build the CI docker images.
2247ec681f3Smrg#
2257ec681f3Smrg# MESA_IMAGE_TAG is the tag of the docker image used by later stage jobs. If the
2267ec681f3Smrg# image doesn't exist yet, the container stage job generates it.
2277ec681f3Smrg#
2287ec681f3Smrg# In order to generate a new image, one should generally change the tag.
2297ec681f3Smrg# While removing the image from the registry would also work, that's not
2307ec681f3Smrg# recommended except for ephemeral images during development: Replacing
2317ec681f3Smrg# an image after a significant amount of time might pull in newer
2327ec681f3Smrg# versions of gcc/clang or other packages, which might break the build
2337ec681f3Smrg# with older commits using the same tag.
2347ec681f3Smrg#
2357ec681f3Smrg# After merging a change resulting in generating a new image to the
2367ec681f3Smrg# main repository, it's recommended to remove the image from the source
2377ec681f3Smrg# repository's container registry, so that the image from the main
2387ec681f3Smrg# repository's registry will be used there as well.
2397ec681f3Smrg
2407ec681f3Smrg.container:
2417ec681f3Smrg  stage: container
2427ec681f3Smrg  extends:
2437ec681f3Smrg    - .ci-run-policy
2447ec681f3Smrg    - .incorporate-templates-commit
2457ec681f3Smrg  rules:
2467ec681f3Smrg    - *ignore_scheduled_pipelines
2477ec681f3Smrg    # Run pipeline by default in the main project if any CI pipeline
2487ec681f3Smrg    # configuration files were changed, to ensure docker images are up to date
2497ec681f3Smrg    - if: *is-post-merge
2507ec681f3Smrg      changes:
2517ec681f3Smrg      - .gitlab-ci.yml
2527ec681f3Smrg      - .gitlab-ci/**/*
2537ec681f3Smrg      when: on_success
2547ec681f3Smrg    # Run pipeline by default if it was triggered by Marge Bot, is for a
2557ec681f3Smrg    # merge request, and any files affecting the pipeline were changed
2567ec681f3Smrg    - if: *is-pre-merge-for-marge
2577ec681f3Smrg      changes:
2587ec681f3Smrg        *all_paths
2597ec681f3Smrg      when: on_success
2607ec681f3Smrg    # Run pipeline by default in the main project if it was not triggered by
2617ec681f3Smrg    # Marge Bot, and any files affecting the pipeline were changed
2627ec681f3Smrg    - if: *is-post-merge-not-for-marge
2637ec681f3Smrg      changes:
2647ec681f3Smrg        *all_paths
2657ec681f3Smrg      when: on_success
2667ec681f3Smrg    # Allow triggering jobs manually in other cases if any files affecting the
2677ec681f3Smrg    # pipeline were changed
2687ec681f3Smrg    - changes:
2697ec681f3Smrg        *all_paths
2707ec681f3Smrg      when: manual
2717ec681f3Smrg    # Otherwise, container jobs won't run
2727ec681f3Smrg    - when: never
2737ec681f3Smrg  variables:
2747ec681f3Smrg    FDO_DISTRIBUTION_VERSION: bullseye-slim
2757ec681f3Smrg    FDO_REPO_SUFFIX: $CI_JOB_NAME
2767ec681f3Smrg    FDO_DISTRIBUTION_EXEC: 'env FDO_CI_CONCURRENT=${FDO_CI_CONCURRENT} bash .gitlab-ci/container/${CI_JOB_NAME}.sh'
2777ec681f3Smrg    # no need to pull the whole repo to build the container image
2787ec681f3Smrg    GIT_STRATEGY: none
2797ec681f3Smrg
2807ec681f3Smrg.use-base-image:
2817ec681f3Smrg  extends:
2827ec681f3Smrg    - .container
2837ec681f3Smrg    - .incorporate-base-tag+templates-commit
2847ec681f3Smrg    # Don't want the .container rules
2857ec681f3Smrg    - .ci-run-policy
2867ec681f3Smrg
2877ec681f3Smrg# Debian 11 based x86 build image base
2887ec681f3Smrgdebian/x86_build-base:
2897ec681f3Smrg  extends:
2907ec681f3Smrg    - .fdo.container-build@debian
2917ec681f3Smrg    - .container
2927ec681f3Smrg  variables:
2937ec681f3Smrg    MESA_IMAGE_TAG: &debian-x86_build-base "2021-07-26-python"
2947ec681f3Smrg
2957ec681f3Smrg.use-debian/x86_build-base:
2967ec681f3Smrg  extends:
2977ec681f3Smrg    - .fdo.container-build@debian
2987ec681f3Smrg    - .use-base-image
2997ec681f3Smrg  variables:
3007ec681f3Smrg    MESA_BASE_IMAGE: "debian/x86_build-base"
3017ec681f3Smrg    MESA_BASE_TAG: *debian-x86_build-base
3027ec681f3Smrg    MESA_ARTIFACTS_BASE_TAG: *debian-x86_build-base
3037ec681f3Smrg  needs:
3047ec681f3Smrg    - debian/x86_build-base
3057ec681f3Smrg
3067ec681f3Smrg# Debian 11 based x86 main build image
3077ec681f3Smrgdebian/x86_build:
3087ec681f3Smrg  extends:
3097ec681f3Smrg    - .use-debian/x86_build-base
3107ec681f3Smrg  variables:
3117ec681f3Smrg    MESA_IMAGE_TAG: &debian-x86_build "2021-07-02-bump-libdrm"
3127ec681f3Smrg
3137ec681f3Smrg.use-debian/x86_build:
3147ec681f3Smrg  extends:
3157ec681f3Smrg    - .set-image-base-tag
3167ec681f3Smrg  variables:
3177ec681f3Smrg    MESA_BASE_TAG: *debian-x86_build-base
3187ec681f3Smrg    MESA_IMAGE_PATH: "debian/x86_build"
3197ec681f3Smrg    MESA_IMAGE_TAG: *debian-x86_build
3207ec681f3Smrg  needs:
3217ec681f3Smrg    - debian/x86_build
3227ec681f3Smrg
3237ec681f3Smrg# Debian 11 based i386 cross-build image
3247ec681f3Smrgdebian/i386_build:
3257ec681f3Smrg  extends:
3267ec681f3Smrg    - .use-debian/x86_build-base
3277ec681f3Smrg  variables:
3287ec681f3Smrg    MESA_IMAGE_TAG: &debian-i386_build "2021-07-02-bump-libdrm"
3297ec681f3Smrg
3307ec681f3Smrg.use-debian/i386_build:
3317ec681f3Smrg  extends:
3327ec681f3Smrg    - .set-image-base-tag
3337ec681f3Smrg  variables:
3347ec681f3Smrg    MESA_BASE_TAG: *debian-x86_build-base
3357ec681f3Smrg    MESA_IMAGE_PATH: "debian/i386_build"
3367ec681f3Smrg    MESA_IMAGE_TAG: *debian-i386_build
3377ec681f3Smrg  needs:
3387ec681f3Smrg    - debian/i386_build
3397ec681f3Smrg
3407ec681f3Smrg# Debian 11 based ppc64el cross-build image
3417ec681f3Smrgdebian/ppc64el_build:
3427ec681f3Smrg  extends:
3437ec681f3Smrg    - .use-debian/x86_build-base
3447ec681f3Smrg  variables:
3457ec681f3Smrg    MESA_IMAGE_TAG: &debian-ppc64el_build "2021-07-02-bump-libdrm"
3467ec681f3Smrg
3477ec681f3Smrg.use-debian/ppc64el_build:
3487ec681f3Smrg  extends:
3497ec681f3Smrg    - .set-image-base-tag
3507ec681f3Smrg  variables:
3517ec681f3Smrg    MESA_BASE_TAG: *debian-x86_build-base
3527ec681f3Smrg    MESA_IMAGE_PATH: "debian/ppc64el_build"
3537ec681f3Smrg    MESA_IMAGE_TAG: *debian-ppc64el_build
3547ec681f3Smrg  needs:
3557ec681f3Smrg    - debian/ppc64el_build
3567ec681f3Smrg
3577ec681f3Smrg# Debian 11 based s390x cross-build image
3587ec681f3Smrgdebian/s390x_build:
3597ec681f3Smrg  extends:
3607ec681f3Smrg    - .use-debian/x86_build-base
3617ec681f3Smrg  variables:
3627ec681f3Smrg    MESA_IMAGE_TAG: &debian-s390x_build "2021-07-02-bump-libdrm"
3637ec681f3Smrg
3647ec681f3Smrg.use-debian/s390x_build:
3657ec681f3Smrg  extends:
3667ec681f3Smrg    - .set-image-base-tag
3677ec681f3Smrg  variables:
3687ec681f3Smrg    MESA_BASE_TAG: *debian-x86_build-base
3697ec681f3Smrg    MESA_IMAGE_PATH: "debian/s390x_build"
3707ec681f3Smrg    MESA_IMAGE_TAG: *debian-s390x_build
3717ec681f3Smrg  needs:
3727ec681f3Smrg    - debian/s390x_build
3737ec681f3Smrg
3747ec681f3Smrg# Android NDK cross-build image
3757ec681f3Smrgdebian/android_build:
3767ec681f3Smrg  extends:
3777ec681f3Smrg    - .use-debian/x86_build-base
3787ec681f3Smrg  variables:
3797ec681f3Smrg    MESA_IMAGE_TAG: &debian-android_build "2021-10-26-static-libstdcxx"
3807ec681f3Smrg
3817ec681f3Smrg.use-debian/android_build:
3827ec681f3Smrg  extends:
3837ec681f3Smrg    - .set-image-base-tag
3847ec681f3Smrg  variables:
3857ec681f3Smrg    MESA_BASE_TAG: *debian-x86_build-base
3867ec681f3Smrg    MESA_IMAGE_PATH: "debian/android_build"
3877ec681f3Smrg    MESA_IMAGE_TAG: *debian-android_build
3887ec681f3Smrg  needs:
3897ec681f3Smrg    - debian/android_build
3907ec681f3Smrg
3917ec681f3Smrg# Debian 11 based x86 test image base
3927ec681f3Smrgdebian/x86_test-base:
3937ec681f3Smrg  extends: debian/x86_build-base
3947ec681f3Smrg  variables:
3957ec681f3Smrg    MESA_IMAGE_TAG: &debian-x86_test-base "2021-10-15-va"
3967ec681f3Smrg
3977ec681f3Smrg.use-debian/x86_test-base:
3987ec681f3Smrg  extends:
3997ec681f3Smrg    - .fdo.container-build@debian
4007ec681f3Smrg    - .use-base-image
4017ec681f3Smrg  variables:
4027ec681f3Smrg    MESA_BASE_IMAGE: "debian/x86_test-base"
4037ec681f3Smrg    MESA_BASE_TAG: *debian-x86_test-base
4047ec681f3Smrg  needs:
4057ec681f3Smrg    - debian/x86_test-base
4067ec681f3Smrg
4077ec681f3Smrg# Debian 11 based x86 test image for GL
4087ec681f3Smrgdebian/x86_test-gl:
4097ec681f3Smrg  extends: .use-debian/x86_test-base
4107ec681f3Smrg  variables:
4117ec681f3Smrg    FDO_DISTRIBUTION_EXEC: 'env KERNEL_URL=${KERNEL_URL} FDO_CI_CONCURRENT=${FDO_CI_CONCURRENT} bash .gitlab-ci/container/${CI_JOB_NAME}.sh'
4127ec681f3Smrg    KERNEL_URL: &kernel-rootfs-url "https://gitlab.freedesktop.org/gfx-ci/linux/-/archive/v5.15-for-mesa-ci-540a4af22d71/linux-v5.15-for-mesa-ci-540a4af22d71.tar.bz2"
4137ec681f3Smrg    MESA_IMAGE_TAG: &debian-x86_test-gl "2021-11-02-lazor"
4147ec681f3Smrg
4157ec681f3Smrg# Debian 11 based x86 test image for VK
4167ec681f3Smrgdebian/x86_test-vk:
4177ec681f3Smrg  extends: .use-debian/x86_test-base
4187ec681f3Smrg  variables:
4197ec681f3Smrg    MESA_IMAGE_TAG: &debian-x86_test-vk "2021-2021-10-15-va"
4207ec681f3Smrg
4217ec681f3Smrg# Debian 11 based ARM build image
4227ec681f3Smrgdebian/arm_build:
4237ec681f3Smrg  extends:
4247ec681f3Smrg    - .fdo.container-build@debian
4257ec681f3Smrg    - .container
4267ec681f3Smrg  tags:
4277ec681f3Smrg    - aarch64
4287ec681f3Smrg  variables:
4297ec681f3Smrg    MESA_IMAGE_TAG: &debian-arm_build "2021-07-26-python"
4307ec681f3Smrg
4317ec681f3Smrg.use-debian/arm_build:
4327ec681f3Smrg  extends:
4337ec681f3Smrg    - .set-image
4347ec681f3Smrg  variables:
4357ec681f3Smrg    MESA_IMAGE_PATH: "debian/arm_build"
4367ec681f3Smrg    MESA_IMAGE_TAG: *debian-arm_build
4377ec681f3Smrg    MESA_ARTIFACTS_TAG: *debian-arm_build
4387ec681f3Smrg  needs:
4397ec681f3Smrg    - debian/arm_build
4407ec681f3Smrg
4417ec681f3Smrg
4427ec681f3Smrg# Fedora 34 based x86 build image
4437ec681f3Smrgfedora/x86_build:
4447ec681f3Smrg  extends:
4457ec681f3Smrg    - .fdo.container-build@fedora
4467ec681f3Smrg    - .container
4477ec681f3Smrg  variables:
4487ec681f3Smrg    FDO_DISTRIBUTION_VERSION: 34
4497ec681f3Smrg    MESA_IMAGE_TAG: &fedora-x86_build "2021-07-08-bump-libdrm"
4507ec681f3Smrg
4517ec681f3Smrg.use-fedora/x86_build:
4527ec681f3Smrg  extends:
4537ec681f3Smrg    - .set-image
4547ec681f3Smrg  variables:
4557ec681f3Smrg    MESA_IMAGE_PATH: "fedora/x86_build"
4567ec681f3Smrg    MESA_IMAGE_TAG: *fedora-x86_build
4577ec681f3Smrg  needs:
4587ec681f3Smrg    - fedora/x86_build
4597ec681f3Smrg
4607ec681f3Smrg
4617ec681f3Smrg.kernel+rootfs:
4627ec681f3Smrg  extends:
4637ec681f3Smrg    - .ci-run-policy
4647ec681f3Smrg  stage: container
4657ec681f3Smrg  variables:
4667ec681f3Smrg    GIT_STRATEGY: fetch
4677ec681f3Smrg    KERNEL_URL: *kernel-rootfs-url
4687ec681f3Smrg    MESA_ROOTFS_TAG: &kernel-rootfs "2021-11-02-lazor"
4697ec681f3Smrg    DISTRIBUTION_TAG: &distribution-tag-arm "${MESA_ROOTFS_TAG}--${MESA_ARTIFACTS_TAG}--${MESA_TEMPLATES_COMMIT}"
4707ec681f3Smrg  script:
4717ec681f3Smrg    - .gitlab-ci/container/lava_build.sh
4727ec681f3Smrg
4737ec681f3Smrgkernel+rootfs_amd64:
4747ec681f3Smrg  extends:
4757ec681f3Smrg    - .use-debian/x86_build-base
4767ec681f3Smrg    - .kernel+rootfs
4777ec681f3Smrg  image: "$FDO_BASE_IMAGE"
4787ec681f3Smrg  variables:
4797ec681f3Smrg    DEBIAN_ARCH: "amd64"
4807ec681f3Smrg    DISTRIBUTION_TAG: &distribution-tag-amd64 "${MESA_ROOTFS_TAG}--${MESA_ARTIFACTS_BASE_TAG}--${MESA_TEMPLATES_COMMIT}"
4817ec681f3Smrg
4827ec681f3Smrgkernel+rootfs_arm64:
4837ec681f3Smrg  extends:
4847ec681f3Smrg    - .use-debian/arm_build
4857ec681f3Smrg    - .kernel+rootfs
4867ec681f3Smrg  tags:
4877ec681f3Smrg    - aarch64
4887ec681f3Smrg  variables:
4897ec681f3Smrg    DEBIAN_ARCH: "arm64"
4907ec681f3Smrg
4917ec681f3Smrgkernel+rootfs_armhf:
4927ec681f3Smrg  extends:
4937ec681f3Smrg    - kernel+rootfs_arm64
4947ec681f3Smrg  variables:
4957ec681f3Smrg    DEBIAN_ARCH: "armhf"
4967ec681f3Smrg
4977ec681f3Smrg# Cannot use anchors defined here from included files, so use extends: instead
4987ec681f3Smrg.use-kernel+rootfs-arm:
4997ec681f3Smrg  variables:
5007ec681f3Smrg    DISTRIBUTION_TAG: *distribution-tag-arm
5017ec681f3Smrg    MESA_ROOTFS_TAG: *kernel-rootfs
5027ec681f3Smrg
5037ec681f3Smrg.use-kernel+rootfs-amd64:
5047ec681f3Smrg  variables:
5057ec681f3Smrg    DISTRIBUTION_TAG: *distribution-tag-amd64
5067ec681f3Smrg    MESA_ROOTFS_TAG: *kernel-rootfs
5077ec681f3Smrg
5087ec681f3Smrg# x86 image with ARM64 & armhf kernel & rootfs for baremetal testing
5097ec681f3Smrgdebian/arm_test:
5107ec681f3Smrg  extends:
5117ec681f3Smrg    - .fdo.container-build@debian
5127ec681f3Smrg    - .container
5137ec681f3Smrg    # Don't want the .container rules
5147ec681f3Smrg    - .ci-run-policy
5157ec681f3Smrg  needs:
5167ec681f3Smrg    - kernel+rootfs_arm64
5177ec681f3Smrg    - kernel+rootfs_armhf
5187ec681f3Smrg  variables:
5197ec681f3Smrg    FDO_DISTRIBUTION_EXEC: 'env ARTIFACTS_PREFIX=https://${MINIO_HOST}/mesa-lava ARTIFACTS_SUFFIX=${MESA_ROOTFS_TAG}--${MESA_ARM_BUILD_TAG}--${MESA_TEMPLATES_COMMIT} CI_PROJECT_PATH=${CI_PROJECT_PATH} FDO_CI_CONCURRENT=${FDO_CI_CONCURRENT} FDO_UPSTREAM_REPO=${FDO_UPSTREAM_REPO} bash .gitlab-ci/container/${CI_JOB_NAME}.sh'
5207ec681f3Smrg    FDO_DISTRIBUTION_TAG: "${MESA_IMAGE_TAG}--${MESA_ROOTFS_TAG}--${MESA_ARM_BUILD_TAG}--${MESA_TEMPLATES_COMMIT}"
5217ec681f3Smrg    MESA_ARM_BUILD_TAG: *debian-arm_build
5227ec681f3Smrg    MESA_IMAGE_TAG: &debian-arm_test "2021-09-17-deqp"
5237ec681f3Smrg    MESA_ROOTFS_TAG: *kernel-rootfs
5247ec681f3Smrg
5257ec681f3Smrg.use-debian/arm_test:
5267ec681f3Smrg  image: "$CI_REGISTRY_IMAGE/${MESA_IMAGE_PATH}:${MESA_IMAGE_TAG}--${MESA_ROOTFS_TAG}--${MESA_ARM_BUILD_TAG}--${MESA_TEMPLATES_COMMIT}"
5277ec681f3Smrg  variables:
5287ec681f3Smrg    MESA_ARM_BUILD_TAG: *debian-arm_build
5297ec681f3Smrg    MESA_IMAGE_PATH: "debian/arm_test"
5307ec681f3Smrg    MESA_IMAGE_TAG: *debian-arm_test
5317ec681f3Smrg    MESA_ROOTFS_TAG: *kernel-rootfs
5327ec681f3Smrg  needs:
5337ec681f3Smrg    - debian/arm_test
5347ec681f3Smrg
5357ec681f3Smrg# Native Windows docker builds
5367ec681f3Smrg#
5377ec681f3Smrg# Unlike the above Linux-based builds - including MinGW builds which
5387ec681f3Smrg# cross-compile for Windows - which use the freedesktop ci-templates, we
5397ec681f3Smrg# cannot use the same scheme here. As Windows lacks support for
5407ec681f3Smrg# Docker-in-Docker, and Podman does not run natively on Windows, we have
5417ec681f3Smrg# to open-code much of the same ourselves.
5427ec681f3Smrg#
5437ec681f3Smrg# This is achieved by first running in a native Windows shell instance
5447ec681f3Smrg# (host PowerShell) in the container stage to build and push the image,
5457ec681f3Smrg# then in the build stage by executing inside Docker.
5467ec681f3Smrg
5477ec681f3Smrg.windows-docker-vs2019:
5487ec681f3Smrg  extends:
5497ec681f3Smrg    - .set-image
5507ec681f3Smrg  variables:
5517ec681f3Smrg    MESA_IMAGE: "$CI_REGISTRY_IMAGE/${MESA_IMAGE_PATH}:${MESA_IMAGE_TAG}"
5527ec681f3Smrg    MESA_IMAGE_PATH: "windows/x64_build"
5537ec681f3Smrg    MESA_IMAGE_TAG: "2021-06-24-zink-msvc"
5547ec681f3Smrg    MESA_UPSTREAM_IMAGE: "$CI_REGISTRY/$FDO_UPSTREAM_REPO/$MESA_IMAGE_PATH:${MESA_IMAGE_TAG}"
5557ec681f3Smrg
5567ec681f3Smrgwindows_build_vs2019:
5577ec681f3Smrg  extends:
5587ec681f3Smrg    - .container
5597ec681f3Smrg    - .windows-docker-vs2019
5607ec681f3Smrg  stage: container
5617ec681f3Smrg  variables:
5627ec681f3Smrg    GIT_STRATEGY: fetch # we do actually need the full repository though
5637ec681f3Smrg  timeout: 2h 30m # LLVM + piglit takes ages
5647ec681f3Smrg  tags:
5657ec681f3Smrg    - windows
5667ec681f3Smrg    - shell
5677ec681f3Smrg    - "1809"
5687ec681f3Smrg    - mesa
5697ec681f3Smrg  script:
5707ec681f3Smrg    - .\.gitlab-ci\windows\mesa_container.ps1 $CI_REGISTRY $CI_REGISTRY_USER $CI_REGISTRY_PASSWORD $MESA_IMAGE $MESA_UPSTREAM_IMAGE
5717ec681f3Smrg
5727ec681f3Smrg.use-windows_build_vs2019:
5737ec681f3Smrg  extends: .windows-docker-vs2019
5747ec681f3Smrg  image: "$MESA_IMAGE"
5757ec681f3Smrg  needs:
5767ec681f3Smrg    - windows_build_vs2019
5777ec681f3Smrg
5787ec681f3Smrg
5797ec681f3Smrg# Git archive
5807ec681f3Smrg
5817ec681f3Smrgmake git archive:
5827ec681f3Smrg  extends:
5837ec681f3Smrg    - .fdo.ci-fairy
5847ec681f3Smrg  stage: git-archive
5857ec681f3Smrg  rules:
5867ec681f3Smrg    - if: *is-scheduled-pipeline
5877ec681f3Smrg      when: on_success
5887ec681f3Smrg  # ensure we are running on packet
5897ec681f3Smrg  tags:
5907ec681f3Smrg    - packet.net
5917ec681f3Smrg  script:
5927ec681f3Smrg    # Compactify the .git directory
5937ec681f3Smrg    - git gc --aggressive
5947ec681f3Smrg    # compress the current folder
5957ec681f3Smrg    - tar -cvzf ../$CI_PROJECT_NAME.tar.gz .
5967ec681f3Smrg
5977ec681f3Smrg    # login with the JWT token
5987ec681f3Smrg    - ci-fairy minio login $CI_JOB_JWT
5997ec681f3Smrg    - 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
6007ec681f3Smrg
6017ec681f3Smrg
6027ec681f3Smrg# Sanity checks of MR settings and commit logs
6037ec681f3Smrgsanity:
6047ec681f3Smrg  extends:
6057ec681f3Smrg    - .fdo.ci-fairy
6067ec681f3Smrg  stage: sanity
6077ec681f3Smrg  rules:
6087ec681f3Smrg    - if: *is-pre-merge
6097ec681f3Smrg      when: on_success
6107ec681f3Smrg    # Other cases default to never
6117ec681f3Smrg  variables:
6127ec681f3Smrg    GIT_STRATEGY: none
6137ec681f3Smrg  script:
6147ec681f3Smrg    # ci-fairy check-commits --junit-xml=check-commits.xml
6157ec681f3Smrg    - ci-fairy check-merge-request --require-allow-collaboration --junit-xml=check-merge-request.xml
6167ec681f3Smrg  artifacts:
6177ec681f3Smrg    when: on_failure
6187ec681f3Smrg    reports:
6197ec681f3Smrg      junit: check-*.xml
6207ec681f3Smrg
6217ec681f3Smrg
6227ec681f3Smrg# BUILD
6237ec681f3Smrg
6247ec681f3Smrg# Shared between windows and Linux
6257ec681f3Smrg.build-common:
6267ec681f3Smrg  extends: .ci-run-policy
6277ec681f3Smrg  # Cancel job if a newer commit is pushed to the same branch
6287ec681f3Smrg  interruptible: true
6297ec681f3Smrg  artifacts:
6307ec681f3Smrg    name: "mesa_${CI_JOB_NAME}"
6317ec681f3Smrg    when: always
6327ec681f3Smrg    paths:
6337ec681f3Smrg      - _build/meson-logs/*.txt
6347ec681f3Smrg      - _build/meson-logs/strace
6357ec681f3Smrg      - shader-db
6367ec681f3Smrg
6377ec681f3Smrg# Just Linux
6387ec681f3Smrg.build-linux:
6397ec681f3Smrg  extends: .build-common
6407ec681f3Smrg  variables:
6417ec681f3Smrg    CCACHE_COMPILERCHECK: "content"
6427ec681f3Smrg    CCACHE_COMPRESS: "true"
6437ec681f3Smrg    CCACHE_DIR: /cache/mesa/ccache
6447ec681f3Smrg  # Use ccache transparently, and print stats before/after
6457ec681f3Smrg  before_script:
6467ec681f3Smrg    - export PATH="/usr/lib/ccache:$PATH"
6477ec681f3Smrg    - export CCACHE_BASEDIR="$PWD"
6487ec681f3Smrg    - ccache --show-stats
6497ec681f3Smrg  after_script:
6507ec681f3Smrg    - ccache --show-stats
6517ec681f3Smrg
6527ec681f3Smrg.build-windows:
6537ec681f3Smrg  extends: .build-common
6547ec681f3Smrg  tags:
6557ec681f3Smrg    - windows
6567ec681f3Smrg    - docker
6577ec681f3Smrg    - "1809"
6587ec681f3Smrg    - mesa
6597ec681f3Smrg  cache:
6607ec681f3Smrg    key: ${CI_JOB_NAME}
6617ec681f3Smrg    paths:
6627ec681f3Smrg      - subprojects/packagecache
6637ec681f3Smrg
6647ec681f3Smrg.meson-build:
6657ec681f3Smrg  extends:
6667ec681f3Smrg    - .build-linux
6677ec681f3Smrg    - .use-debian/x86_build
6687ec681f3Smrg  stage: build-x86_64
6697ec681f3Smrg  variables:
6707ec681f3Smrg    LLVM_VERSION: 11
6717ec681f3Smrg  script:
6727ec681f3Smrg    - .gitlab-ci/meson/build.sh
6737ec681f3Smrg
6747ec681f3Smrgdebian-testing:
6757ec681f3Smrg  extends:
6767ec681f3Smrg    - .meson-build
6777ec681f3Smrg    - .ci-deqp-artifacts
6787ec681f3Smrg  variables:
6797ec681f3Smrg    UNWIND: "enabled"
6807ec681f3Smrg    DRI_LOADERS: >
6817ec681f3Smrg      -D glx=dri
6827ec681f3Smrg      -D gbm=enabled
6837ec681f3Smrg      -D egl=enabled
6847ec681f3Smrg      -D platforms=x11
6857ec681f3Smrg    GALLIUM_ST: >
6867ec681f3Smrg      -D dri3=enabled
6877ec681f3Smrg      -D gallium-va=enabled
6887ec681f3Smrg    GALLIUM_DRIVERS: "swrast,virgl,radeonsi,zink,iris,i915"
6897ec681f3Smrg    VULKAN_DRIVERS: "swrast,amd"
6907ec681f3Smrg    BUILDTYPE: "debugoptimized"
6917ec681f3Smrg    EXTRA_OPTION: >
6927ec681f3Smrg      -D valgrind=false
6937ec681f3Smrg    MINIO_ARTIFACT_NAME: mesa-amd64
6947ec681f3Smrg  script:
6957ec681f3Smrg    - .gitlab-ci/meson/build.sh
6967ec681f3Smrg    - .gitlab-ci/prepare-artifacts.sh
6977ec681f3Smrg
6987ec681f3Smrgdebian-testing-asan:
6997ec681f3Smrg  extends:
7007ec681f3Smrg    - debian-testing
7017ec681f3Smrg  variables:
7027ec681f3Smrg    C_ARGS: >
7037ec681f3Smrg      -Wno-error=stringop-truncation
7047ec681f3Smrg    EXTRA_OPTION: >
7057ec681f3Smrg      -D b_sanitize=address
7067ec681f3Smrg      -D valgrind=false
7077ec681f3Smrg    MINIO_ARTIFACT_NAME: ""
7087ec681f3Smrg    ARTIFACTS_DEBUG_SYMBOLS: 1
7097ec681f3Smrg
7107ec681f3Smrgdebian-clover-testing:
7117ec681f3Smrg  extends:
7127ec681f3Smrg    - .meson-build
7137ec681f3Smrg    - .ci-deqp-artifacts
7147ec681f3Smrg  variables:
7157ec681f3Smrg    UNWIND: "enabled"
7167ec681f3Smrg    DRI_LOADERS: >
7177ec681f3Smrg      -D glx=disabled
7187ec681f3Smrg      -D egl=disabled
7197ec681f3Smrg      -D gbm=disabled
7207ec681f3Smrg    GALLIUM_ST: >
7217ec681f3Smrg      -D gallium-opencl=icd
7227ec681f3Smrg      -D opencl-spirv=true
7237ec681f3Smrg    GALLIUM_DRIVERS: "swrast"
7247ec681f3Smrg    BUILDTYPE: "debugoptimized"
7257ec681f3Smrg    EXTRA_OPTION: >
7267ec681f3Smrg      -D valgrind=false
7277ec681f3Smrg  script:
7287ec681f3Smrg    - .gitlab-ci/meson/build.sh
7297ec681f3Smrg    - .gitlab-ci/prepare-artifacts.sh
7307ec681f3Smrg
7317ec681f3Smrgdebian-gallium:
7327ec681f3Smrg  extends: .meson-build
7337ec681f3Smrg  variables:
7347ec681f3Smrg    UNWIND: "enabled"
7357ec681f3Smrg    DRI_LOADERS: >
7367ec681f3Smrg      -D glx=dri
7377ec681f3Smrg      -D gbm=enabled
7387ec681f3Smrg      -D egl=enabled
7397ec681f3Smrg      -D platforms=x11,wayland
7407ec681f3Smrg    GALLIUM_ST: >
7417ec681f3Smrg      -D dri3=enabled
7427ec681f3Smrg      -D gallium-extra-hud=true
7437ec681f3Smrg      -D gallium-vdpau=enabled
7447ec681f3Smrg      -D gallium-xvmc=enabled
7457ec681f3Smrg      -D gallium-omx=bellagio
7467ec681f3Smrg      -D gallium-va=enabled
7477ec681f3Smrg      -D gallium-xa=enabled
7487ec681f3Smrg      -D gallium-nine=true
7497ec681f3Smrg      -D gallium-opencl=disabled
7507ec681f3Smrg    GALLIUM_DRIVERS: "iris,nouveau,kmsro,r300,r600,freedreno,swr,swrast,svga,v3d,vc4,virgl,etnaviv,panfrost,lima,zink,d3d12,asahi,crocus"
7517ec681f3Smrg    VULKAN_DRIVERS: swrast
7527ec681f3Smrg    EXTRA_OPTION: >
7537ec681f3Smrg      -D osmesa=true
7547ec681f3Smrg      -D tools=all
7557ec681f3Smrg  script:
7567ec681f3Smrg    - .gitlab-ci/meson/build.sh
7577ec681f3Smrg    - .gitlab-ci/run-shader-db.sh
7587ec681f3Smrg
7597ec681f3Smrg# Test a release build with -Werror so new warnings don't sneak in.
7607ec681f3Smrgdebian-release:
7617ec681f3Smrg  extends: .meson-build
7627ec681f3Smrg  variables:
7637ec681f3Smrg    UNWIND: "enabled"
7647ec681f3Smrg    DRI_LOADERS: >
7657ec681f3Smrg      -D glx=dri
7667ec681f3Smrg      -D gbm=enabled
7677ec681f3Smrg      -D egl=enabled
7687ec681f3Smrg      -D platforms=x11,wayland
7697ec681f3Smrg    GALLIUM_ST: >
7707ec681f3Smrg      -D dri3=enabled
7717ec681f3Smrg      -D gallium-extra-hud=true
7727ec681f3Smrg      -D gallium-vdpau=enabled
7737ec681f3Smrg      -D gallium-xvmc=disabled
7747ec681f3Smrg      -D gallium-omx=disabled
7757ec681f3Smrg      -D gallium-va=enabled
7767ec681f3Smrg      -D gallium-xa=enabled
7777ec681f3Smrg      -D gallium-nine=false
7787ec681f3Smrg      -D gallium-opencl=disabled
7797ec681f3Smrg      -D llvm=false
7807ec681f3Smrg    GALLIUM_DRIVERS: "i915,iris,nouveau,kmsro,freedreno,r300,svga,swrast,v3d,vc4,virgl,etnaviv,panfrost,lima,zink,d3d12,crocus"
7817ec681f3Smrg    VULKAN_DRIVERS: "amd"
7827ec681f3Smrg    BUILDTYPE: "release"
7837ec681f3Smrg    EXTRA_OPTION: >
7847ec681f3Smrg      -D osmesa=true
7857ec681f3Smrg      -D tools=all
7867ec681f3Smrg  script:
7877ec681f3Smrg    - .gitlab-ci/meson/build.sh
7887ec681f3Smrg
7897ec681f3Smrgfedora-release:
7907ec681f3Smrg  extends:
7917ec681f3Smrg    - .meson-build
7927ec681f3Smrg    - .use-fedora/x86_build
7937ec681f3Smrg  variables:
7947ec681f3Smrg    BUILDTYPE: "release"
7957ec681f3Smrg    C_ARGS: >
7967ec681f3Smrg      -Wno-error=array-bounds
7977ec681f3Smrg      -Wno-error=maybe-uninitialized
7987ec681f3Smrg      -Wno-error=stringop-overread
7997ec681f3Smrg      -Wno-error=uninitialized
8007ec681f3Smrg    CPP_ARGS: >
8017ec681f3Smrg      -Wno-error=array-bounds
8027ec681f3Smrg    DRI_DRIVERS: "nouveau,i915,i965,r100,r200"
8037ec681f3Smrg    DRI_LOADERS: >
8047ec681f3Smrg      -D glx=dri
8057ec681f3Smrg      -D gbm=enabled
8067ec681f3Smrg      -D egl=enabled
8077ec681f3Smrg      -D glvnd=true
8087ec681f3Smrg      -D platforms=x11,wayland
8097ec681f3Smrg    EXTRA_OPTION: >
8107ec681f3Smrg      -D osmesa=true
8117ec681f3Smrg      -D selinux=true
8127ec681f3Smrg      -D tools=drm-shim,etnaviv,freedreno,glsl,intel,nir,nouveau,lima,panfrost
8137ec681f3Smrg    GALLIUM_DRIVERS: "crocus,etnaviv,freedreno,iris,kmsro,lima,nouveau,panfrost,r300,r600,radeonsi,svga,swrast,tegra,v3d,vc4,virgl,zink"
8147ec681f3Smrg    GALLIUM_ST: >
8157ec681f3Smrg      -D dri3=enabled
8167ec681f3Smrg      -D gallium-extra-hud=true
8177ec681f3Smrg      -D gallium-vdpau=enabled
8187ec681f3Smrg      -D gallium-xvmc=disabled
8197ec681f3Smrg      -D gallium-omx=disabled
8207ec681f3Smrg      -D gallium-va=enabled
8217ec681f3Smrg      -D gallium-xa=enabled
8227ec681f3Smrg      -D gallium-nine=false
8237ec681f3Smrg      -D gallium-opencl=icd
8247ec681f3Smrg      -D gles1=disabled
8257ec681f3Smrg      -D gles2=enabled
8267ec681f3Smrg      -D llvm=enabled
8277ec681f3Smrg      -D microsoft-clc=disabled
8287ec681f3Smrg      -D shared-llvm=enabled
8297ec681f3Smrg      -D vulkan-device-select-layer=true
8307ec681f3Smrg    LLVM_VERSION: ""
8317ec681f3Smrg    UNWIND: "disabled"
8327ec681f3Smrg    VULKAN_DRIVERS: "amd,broadcom,freedreno,intel"
8337ec681f3Smrg  script:
8347ec681f3Smrg    - .gitlab-ci/meson/build.sh
8357ec681f3Smrg
8367ec681f3Smrgdebian-android:
8377ec681f3Smrg  extends:
8387ec681f3Smrg    - .meson-cross
8397ec681f3Smrg    - .use-debian/android_build
8407ec681f3Smrg  variables:
8417ec681f3Smrg    UNWIND: "disabled"
8427ec681f3Smrg    C_ARGS: >
8437ec681f3Smrg      -Wno-error=absolute-value
8447ec681f3Smrg      -Wno-error=asm-operand-widths
8457ec681f3Smrg      -Wno-error=constant-conversion
8467ec681f3Smrg      -Wno-error=enum-conversion
8477ec681f3Smrg      -Wno-error=extern-initializer
8487ec681f3Smrg      -Wno-error=initializer-overrides
8497ec681f3Smrg      -Wno-error=missing-braces
8507ec681f3Smrg      -Wno-error=sometimes-uninitialized
8517ec681f3Smrg      -Wno-error=tautological-constant-out-of-range-compare
8527ec681f3Smrg      -Wno-error=unused-function
8537ec681f3Smrg      -Wno-error=unused-label
8547ec681f3Smrg    CPP_ARGS: >
8557ec681f3Smrg      -Wno-error=deprecated-declarations
8567ec681f3Smrg      -Wno-error=non-virtual-dtor
8577ec681f3Smrg    DRI_LOADERS: >
8587ec681f3Smrg      -D glx=disabled
8597ec681f3Smrg      -D gbm=disabled
8607ec681f3Smrg      -D egl=enabled
8617ec681f3Smrg      -D platforms=android
8627ec681f3Smrg    EXTRA_OPTION: >
8637ec681f3Smrg      -D android-stub=true
8647ec681f3Smrg      -D llvm=disabled
8657ec681f3Smrg      -D platform-sdk-version=29
8667ec681f3Smrg      -D valgrind=false
8677ec681f3Smrg    GALLIUM_ST: >
8687ec681f3Smrg      -D dri3=disabled
8697ec681f3Smrg      -D gallium-vdpau=disabled
8707ec681f3Smrg      -D gallium-xvmc=disabled
8717ec681f3Smrg      -D gallium-omx=disabled
8727ec681f3Smrg      -D gallium-va=disabled
8737ec681f3Smrg      -D gallium-xa=disabled
8747ec681f3Smrg      -D gallium-nine=false
8757ec681f3Smrg      -D gallium-opencl=disabled
8767ec681f3Smrg    LLVM_VERSION: ""
8777ec681f3Smrg    PKG_CONFIG_LIBDIR: "/disable/non/android/system/pc/files"
8787ec681f3Smrg  script:
8797ec681f3Smrg    - PKG_CONFIG_PATH=/usr/local/lib/aarch64-linux-android/pkgconfig/:/android-ndk-r21d/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/aarch64-linux-android/pkgconfig/ CROSS=aarch64-linux-android GALLIUM_DRIVERS=etnaviv,freedreno,lima,panfrost,vc4,v3d VULKAN_DRIVERS=freedreno,broadcom,virtio-experimental .gitlab-ci/meson/build.sh
8807ec681f3Smrg    # x86_64 build:
8817ec681f3Smrg    # Can't do Intel because gen_decoder.c currently requires libexpat, which
8827ec681f3Smrg    # is not a dependency that AOSP wants to accept.  Can't do Radeon because
8837ec681f3Smrg    # it requires LLVM, which we don't have an Android build of.
8847ec681f3Smrg    - PKG_CONFIG_PATH=/usr/local/lib/x86_64-linux-android/pkgconfig/:/android-ndk-r21d/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/x86_64-linux-android/pkgconfig/ CROSS=x86_64-linux-android GALLIUM_DRIVERS=iris VULKAN_DRIVERS=intel .gitlab-ci/meson/build.sh
8857ec681f3Smrg
8867ec681f3Smrg.meson-cross:
8877ec681f3Smrg  extends:
8887ec681f3Smrg    - .meson-build
8897ec681f3Smrg  stage: build-misc
8907ec681f3Smrg  variables:
8917ec681f3Smrg    UNWIND: "disabled"
8927ec681f3Smrg    DRI_LOADERS: >
8937ec681f3Smrg      -D glx=dri
8947ec681f3Smrg      -D gbm=enabled
8957ec681f3Smrg      -D egl=enabled
8967ec681f3Smrg      -D platforms=x11
8977ec681f3Smrg      -D osmesa=false
8987ec681f3Smrg    GALLIUM_ST: >
8997ec681f3Smrg      -D dri3=enabled
9007ec681f3Smrg      -D gallium-vdpau=disabled
9017ec681f3Smrg      -D gallium-xvmc=disabled
9027ec681f3Smrg      -D gallium-omx=disabled
9037ec681f3Smrg      -D gallium-va=disabled
9047ec681f3Smrg      -D gallium-xa=disabled
9057ec681f3Smrg      -D gallium-nine=false
9067ec681f3Smrg
9077ec681f3Smrg.meson-arm:
9087ec681f3Smrg  extends:
9097ec681f3Smrg    - .meson-cross
9107ec681f3Smrg    - .use-debian/arm_build
9117ec681f3Smrg  needs:
9127ec681f3Smrg    - debian/arm_build
9137ec681f3Smrg  variables:
9147ec681f3Smrg    VULKAN_DRIVERS: freedreno,broadcom
9157ec681f3Smrg    GALLIUM_DRIVERS: "etnaviv,freedreno,kmsro,lima,nouveau,panfrost,swrast,tegra,v3d,vc4"
9167ec681f3Smrg    BUILDTYPE: "debugoptimized"
9177ec681f3Smrg  tags:
9187ec681f3Smrg    - aarch64
9197ec681f3Smrg
9207ec681f3Smrgdebian-armhf:
9217ec681f3Smrg  extends:
9227ec681f3Smrg    - .meson-arm
9237ec681f3Smrg    - .ci-deqp-artifacts
9247ec681f3Smrg  variables:
9257ec681f3Smrg    CROSS: armhf
9267ec681f3Smrg    EXTRA_OPTION: >
9277ec681f3Smrg      -D llvm=disabled
9287ec681f3Smrg      -D valgrind=false
9297ec681f3Smrg    MINIO_ARTIFACT_NAME: mesa-armhf
9307ec681f3Smrg  script:
9317ec681f3Smrg    - .gitlab-ci/meson/build.sh
9327ec681f3Smrg    - .gitlab-ci/prepare-artifacts.sh
9337ec681f3Smrg
9347ec681f3Smrgdebian-arm64:
9357ec681f3Smrg  extends:
9367ec681f3Smrg    - .meson-arm
9377ec681f3Smrg    - .ci-deqp-artifacts
9387ec681f3Smrg  variables:
9397ec681f3Smrg    VULKAN_DRIVERS: "freedreno,broadcom,panfrost"
9407ec681f3Smrg    EXTRA_OPTION: >
9417ec681f3Smrg      -D llvm=disabled
9427ec681f3Smrg      -D valgrind=false
9437ec681f3Smrg    MINIO_ARTIFACT_NAME: mesa-arm64
9447ec681f3Smrg  script:
9457ec681f3Smrg    - .gitlab-ci/meson/build.sh
9467ec681f3Smrg    - .gitlab-ci/prepare-artifacts.sh
9477ec681f3Smrg
9487ec681f3Smrgdebian-arm64-asan:
9497ec681f3Smrg  extends:
9507ec681f3Smrg    - debian-arm64
9517ec681f3Smrg  variables:
9527ec681f3Smrg    C_ARGS: >
9537ec681f3Smrg      -Wno-error=stringop-truncation
9547ec681f3Smrg    EXTRA_OPTION: >
9557ec681f3Smrg      -D llvm=disabled
9567ec681f3Smrg      -D b_sanitize=address
9577ec681f3Smrg      -D valgrind=false
9587ec681f3Smrg    ARTIFACTS_DEBUG_SYMBOLS: 1
9597ec681f3Smrg    MINIO_ARTIFACT_NAME: mesa-arm64-asan
9607ec681f3Smrg    MESON_TEST_ARGS: "--no-suite mesa:compiler"
9617ec681f3Smrg
9627ec681f3Smrgdebian-arm64-build-test:
9637ec681f3Smrg  extends:
9647ec681f3Smrg    - .meson-arm
9657ec681f3Smrg    - .ci-deqp-artifacts
9667ec681f3Smrg  variables:
9677ec681f3Smrg    VULKAN_DRIVERS: "amd"
9687ec681f3Smrg    EXTRA_OPTION: >
9697ec681f3Smrg      -Dtools=panfrost
9707ec681f3Smrg  script:
9717ec681f3Smrg    - .gitlab-ci/meson/build.sh
9727ec681f3Smrg
9737ec681f3Smrgdebian-clang:
9747ec681f3Smrg  extends: .meson-build
9757ec681f3Smrg  variables:
9767ec681f3Smrg    UNWIND: "enabled"
9777ec681f3Smrg    C_ARGS: >
9787ec681f3Smrg      -Wno-error=absolute-value
9797ec681f3Smrg      -Wno-error=constant-conversion
9807ec681f3Smrg      -Wno-error=constant-logical-operand
9817ec681f3Smrg      -Wno-error=enum-conversion
9827ec681f3Smrg      -Wno-error=gnu-variable-sized-type-not-at-end
9837ec681f3Smrg      -Wno-error=implicit-const-int-float-conversion
9847ec681f3Smrg      -Wno-error=initializer-overrides
9857ec681f3Smrg      -Wno-error=misleading-indentation
9867ec681f3Smrg      -Wno-error=mismatched-tags
9877ec681f3Smrg      -Wno-error=missing-braces
9887ec681f3Smrg      -Wno-error=overloaded-virtual
9897ec681f3Smrg      -Wno-error=self-assign
9907ec681f3Smrg      -Wno-error=sometimes-uninitialized
9917ec681f3Smrg      -Wno-error=tautological-constant-compare
9927ec681f3Smrg      -Wno-error=tautological-constant-out-of-range-compare
9937ec681f3Smrg      -Wno-error=tautological-overlap-compare
9947ec681f3Smrg      -Wno-error=typedef-redefinition
9957ec681f3Smrg      -Wno-error=unused-function
9967ec681f3Smrg      -Wno-error=unused-private-field
9977ec681f3Smrg      -Wno-error=xor-used-as-pow
9987ec681f3Smrg    CPP_ARGS: >
9997ec681f3Smrg      -Wno-error=c99-designator
10007ec681f3Smrg      -Wno-error=constant-logical-operand
10017ec681f3Smrg      -Wno-error=deprecated-declarations
10027ec681f3Smrg      -Wno-error=implicit-const-int-float-conversion
10037ec681f3Smrg      -Wno-error=mismatched-tags
10047ec681f3Smrg      -Wno-error=missing-braces
10057ec681f3Smrg      -Wno-error=overloaded-virtual
10067ec681f3Smrg      -Wno-error=self-assign
10077ec681f3Smrg      -Wno-error=sometimes-uninitialized
10087ec681f3Smrg      -Wno-error=tautological-constant-out-of-range-compare
10097ec681f3Smrg      -Wno-error=unused-const-variable
10107ec681f3Smrg      -Wno-error=unused-private-field
10117ec681f3Smrg      -Wno-error=unused-value
10127ec681f3Smrg      -Wno-error=unused-variable
10137ec681f3Smrg    DRI_LOADERS: >
10147ec681f3Smrg      -D glvnd=true
10157ec681f3Smrg    DRI_DRIVERS: "auto"
10167ec681f3Smrg    GALLIUM_DRIVERS: "iris,nouveau,kmsro,r300,r600,freedreno,swr,swrast,svga,v3d,vc4,virgl,etnaviv,panfrost,lima,zink,radeonsi,tegra,d3d12,crocus"
10177ec681f3Smrg    VULKAN_DRIVERS: intel,amd,freedreno,broadcom,virtio-experimental
10187ec681f3Smrg    CC: clang
10197ec681f3Smrg    CXX: clang++
10207ec681f3Smrg
10217ec681f3Smrgwindows-vs2019:
10227ec681f3Smrg  extends:
10237ec681f3Smrg    - .build-windows
10247ec681f3Smrg    - .use-windows_build_vs2019
10257ec681f3Smrg    - .windows-build-rules
10267ec681f3Smrg  stage: build-misc
10277ec681f3Smrg  script:
10287ec681f3Smrg    - . .\.gitlab-ci\windows\mesa_build.ps1
10297ec681f3Smrg  artifacts:
10307ec681f3Smrg    paths:
10317ec681f3Smrg      - _build/meson-logs/*.txt
10327ec681f3Smrg      - _install/
10337ec681f3Smrg
10347ec681f3Smrgtest-d3d12-windows:
10357ec681f3Smrg  extends:
10367ec681f3Smrg    - .build-windows
10377ec681f3Smrg    - .use-windows_build_vs2019
10387ec681f3Smrg    - .windows-test-rules
10397ec681f3Smrg  stage: layered-backends
10407ec681f3Smrg  dependencies:
10417ec681f3Smrg    - windows-vs2019
10427ec681f3Smrg  needs:
10437ec681f3Smrg    - windows-vs2019
10447ec681f3Smrg  variables:
10457ec681f3Smrg    GIT_STRATEGY: none # testing doesn't build anything from source
10467ec681f3Smrg    GALLIUM_DRIVER: d3d12
10477ec681f3Smrg    PIGLIT_PROFILE: quick_gl
10487ec681f3Smrg    PIGLIT_TESTS: -x nv_copy_depth_to_color -x repeat-wait -x arb_timer_query@timestamp-get
10497ec681f3Smrg  script:
10507ec681f3Smrg    - . _install/piglit_run.ps1
10517ec681f3Smrg  artifacts:
10527ec681f3Smrg    when: on_failure
10537ec681f3Smrg    name: "mesa_${CI_JOB_NAME}"
10547ec681f3Smrg    paths:
10557ec681f3Smrg      - summary/
10567ec681f3Smrg
10577ec681f3Smrgdebian-clover:
10587ec681f3Smrg  extends: .meson-build
10597ec681f3Smrg  variables:
10607ec681f3Smrg    UNWIND: "enabled"
10617ec681f3Smrg    DRI_LOADERS: >
10627ec681f3Smrg      -D glx=disabled
10637ec681f3Smrg      -D egl=disabled
10647ec681f3Smrg      -D gbm=disabled
10657ec681f3Smrg    GALLIUM_DRIVERS: "r600,radeonsi"
10667ec681f3Smrg    GALLIUM_ST: >
10677ec681f3Smrg      -D dri3=disabled
10687ec681f3Smrg      -D gallium-vdpau=disabled
10697ec681f3Smrg      -D gallium-xvmc=disabled
10707ec681f3Smrg      -D gallium-omx=disabled
10717ec681f3Smrg      -D gallium-va=disabled
10727ec681f3Smrg      -D gallium-xa=disabled
10737ec681f3Smrg      -D gallium-nine=false
10747ec681f3Smrg      -D gallium-opencl=icd
10757ec681f3Smrg    EXTRA_OPTION: >
10767ec681f3Smrg      -D valgrind=false
10777ec681f3Smrg  script:
10787ec681f3Smrg    - LLVM_VERSION=9 GALLIUM_DRIVERS=r600,swrast .gitlab-ci/meson/build.sh
10797ec681f3Smrg    - .gitlab-ci/meson/build.sh
10807ec681f3Smrg
10817ec681f3Smrgdebian-vulkan:
10827ec681f3Smrg  extends: .meson-build
10837ec681f3Smrg  variables:
10847ec681f3Smrg    UNWIND: "disabled"
10857ec681f3Smrg    DRI_LOADERS: >
10867ec681f3Smrg      -D glx=disabled
10877ec681f3Smrg      -D gbm=disabled
10887ec681f3Smrg      -D egl=disabled
10897ec681f3Smrg      -D platforms=x11,wayland
10907ec681f3Smrg      -D osmesa=false
10917ec681f3Smrg    GALLIUM_ST: >
10927ec681f3Smrg      -D dri3=enabled
10937ec681f3Smrg      -D gallium-vdpau=disabled
10947ec681f3Smrg      -D gallium-xvmc=disabled
10957ec681f3Smrg      -D gallium-omx=disabled
10967ec681f3Smrg      -D gallium-va=disabled
10977ec681f3Smrg      -D gallium-xa=disabled
10987ec681f3Smrg      -D gallium-nine=false
10997ec681f3Smrg      -D gallium-opencl=disabled
11007ec681f3Smrg      -D b_sanitize=undefined
11017ec681f3Smrg      -D c_args=-fno-sanitize-recover=all
11027ec681f3Smrg      -D cpp_args=-fno-sanitize-recover=all
11037ec681f3Smrg    UBSAN_OPTIONS: "print_stacktrace=1"
11047ec681f3Smrg    VULKAN_DRIVERS: intel,amd,freedreno,broadcom,virtio-experimental
11057ec681f3Smrg    EXTRA_OPTION: >
11067ec681f3Smrg      -D vulkan-layers=device-select,overlay
11077ec681f3Smrg      -D build-aco-tests=true
11087ec681f3Smrg
11097ec681f3Smrgdebian-i386:
11107ec681f3Smrg  extends:
11117ec681f3Smrg    - .meson-cross
11127ec681f3Smrg    - .use-debian/i386_build
11137ec681f3Smrg  variables:
11147ec681f3Smrg    CROSS: i386
11157ec681f3Smrg    VULKAN_DRIVERS: intel,amd,swrast,virtio-experimental
11167ec681f3Smrg    GALLIUM_DRIVERS: "iris,nouveau,r300,r600,radeonsi,swrast,virgl,zink,crocus"
11177ec681f3Smrg    DRI_DRIVERS: "i915,i965,r100,r200,nouveau"
11187ec681f3Smrg    EXTRA_OPTION: >
11197ec681f3Smrg      -D vulkan-layers=device-select,overlay
11207ec681f3Smrg
11217ec681f3Smrgdebian-s390x:
11227ec681f3Smrg  extends:
11237ec681f3Smrg    - debian-ppc64el
11247ec681f3Smrg    - .use-debian/s390x_build
11257ec681f3Smrg    - .s390x-rules
11267ec681f3Smrg  tags:
11277ec681f3Smrg    - kvm
11287ec681f3Smrg  variables:
11297ec681f3Smrg    CROSS: s390x
11307ec681f3Smrg    GALLIUM_DRIVERS: "swrast,zink"
11317ec681f3Smrg    # The lp_test_blend test times out with LLVM 11
11327ec681f3Smrg    LLVM_VERSION: 9
11337ec681f3Smrg    VULKAN_DRIVERS: "swrast"
11347ec681f3Smrg
11357ec681f3Smrgdebian-ppc64el:
11367ec681f3Smrg  extends:
11377ec681f3Smrg    - .meson-cross
11387ec681f3Smrg    - .use-debian/ppc64el_build
11397ec681f3Smrg    - .ppc64el-rules
11407ec681f3Smrg  variables:
11417ec681f3Smrg    CROSS: ppc64el
11427ec681f3Smrg    GALLIUM_DRIVERS: "nouveau,radeonsi,swrast,virgl,zink"
11437ec681f3Smrg    VULKAN_DRIVERS: "amd,swrast"
11447ec681f3Smrg
11457ec681f3Smrgdebian-mingw32-x86_64:
11467ec681f3Smrg  extends: .meson-build
11477ec681f3Smrg  stage: build-misc
11487ec681f3Smrg  variables:
11497ec681f3Smrg    UNWIND: "disabled"
11507ec681f3Smrg    C_ARGS: >
11517ec681f3Smrg      -Wno-error=format
11527ec681f3Smrg      -Wno-error=format-extra-args
11537ec681f3Smrg    CPP_ARGS: $C_ARGS
11547ec681f3Smrg    DRI_DRIVERS: ""
11557ec681f3Smrg    GALLIUM_DRIVERS: "swrast"
11567ec681f3Smrg    EXTRA_OPTION: >
11577ec681f3Smrg      -Dllvm=disabled
11587ec681f3Smrg      -Dzlib=disabled
11597ec681f3Smrg      -Dosmesa=true
11607ec681f3Smrg      --cross-file=.gitlab-ci/x86_64-w64-mingw32
11617ec681f3Smrg
11627ec681f3Smrg.test:
11637ec681f3Smrg  extends:
11647ec681f3Smrg    - .ci-run-policy
11657ec681f3Smrg  # Cancel job if a newer commit is pushed to the same branch
11667ec681f3Smrg  interruptible: true
11677ec681f3Smrg  variables:
11687ec681f3Smrg    GIT_STRATEGY: none # testing doesn't build anything from source
11697ec681f3Smrg  before_script:
11707ec681f3Smrg    # Note: Build dir (and thus install) may be dirty due to GIT_STRATEGY
11717ec681f3Smrg    - rm -rf install
11727ec681f3Smrg    - tar -xf artifacts/install.tar
11737ec681f3Smrg    - LD_LIBRARY_PATH=install/lib find install/lib -name "*.so" -print -exec ldd {} \;
11747ec681f3Smrg  artifacts:
11757ec681f3Smrg    when: always
11767ec681f3Smrg    name: "mesa_${CI_JOB_NAME}"
11777ec681f3Smrg    paths:
11787ec681f3Smrg      - results/
11797ec681f3Smrg
11807ec681f3Smrg.use-debian/x86_test-gl:
11817ec681f3Smrg  extends:
11827ec681f3Smrg    - .test
11837ec681f3Smrg    - .set-image-base-tag
11847ec681f3Smrg  variables:
11857ec681f3Smrg    MESA_BASE_TAG: *debian-x86_test-base
11867ec681f3Smrg    MESA_IMAGE_PATH: "debian/x86_test-gl"
11877ec681f3Smrg    MESA_IMAGE_TAG: *debian-x86_test-gl
11887ec681f3Smrg  needs:
11897ec681f3Smrg    - debian/x86_test-gl
11907ec681f3Smrg
11917ec681f3Smrg.test-gl:
11927ec681f3Smrg  extends:
11937ec681f3Smrg    - .use-debian/x86_test-gl
11947ec681f3Smrg  needs:
11957ec681f3Smrg    - debian/x86_test-gl
11967ec681f3Smrg    - debian-testing
11977ec681f3Smrg
11987ec681f3Smrg.test-vk:
11997ec681f3Smrg  extends:
12007ec681f3Smrg    - .test
12017ec681f3Smrg    - .set-image-base-tag
12027ec681f3Smrg  variables:
12037ec681f3Smrg    MESA_BASE_TAG: *debian-x86_test-base
12047ec681f3Smrg    MESA_IMAGE_PATH: "debian/x86_test-vk"
12057ec681f3Smrg    MESA_IMAGE_TAG: *debian-x86_test-vk
12067ec681f3Smrg  needs:
12077ec681f3Smrg    - debian-testing
12087ec681f3Smrg    - debian/x86_test-vk
12097ec681f3Smrg
12107ec681f3Smrg.test-cl:
12117ec681f3Smrg  extends:
12127ec681f3Smrg    - .use-debian/x86_test-gl
12137ec681f3Smrg  needs:
12147ec681f3Smrg    - debian/x86_test-gl
12157ec681f3Smrg    - debian-clover-testing
12167ec681f3Smrg
12177ec681f3Smrg.vkd3d-proton-test:
12187ec681f3Smrg  artifacts:
12197ec681f3Smrg    when: on_failure
12207ec681f3Smrg    name: "mesa_${CI_JOB_NAME}"
12217ec681f3Smrg    paths:
12227ec681f3Smrg      - results/vkd3d-proton.log
12237ec681f3Smrg  script:
12247ec681f3Smrg    - ./install/vkd3d-proton/run.sh
12257ec681f3Smrg
12267ec681f3Smrg.piglit-test:
12277ec681f3Smrg  artifacts:
12287ec681f3Smrg    when: on_failure
12297ec681f3Smrg    name: "mesa_${CI_JOB_NAME}"
12307ec681f3Smrg    paths:
12317ec681f3Smrg      - results/summary/
12327ec681f3Smrg      - results/*.txt
12337ec681f3Smrg  variables:
12347ec681f3Smrg    PIGLIT_NO_WINDOW: 1
12357ec681f3Smrg  script:
12367ec681f3Smrg    - install/piglit/run.sh
12377ec681f3Smrg
12387ec681f3Smrg.piglit-traces-test:
12397ec681f3Smrg  extends:
12407ec681f3Smrg    - .piglit-test
12417ec681f3Smrg  cache:
12427ec681f3Smrg    key: ${CI_JOB_NAME}
12437ec681f3Smrg    paths:
12447ec681f3Smrg      - replayer-db/
12457ec681f3Smrg  artifacts:
12467ec681f3Smrg    when: on_failure
12477ec681f3Smrg    name: "mesa_${CI_JOB_NAME}"
12487ec681f3Smrg    reports:
12497ec681f3Smrg      junit: results/junit.xml
12507ec681f3Smrg  variables:
12517ec681f3Smrg    PIGLIT_PROFILES: replay
12527ec681f3Smrg    PIGLIT_REPLAY_UPLOAD_TO_MINIO: 1
12537ec681f3Smrg    PIGLIT_REPLAY_EXTRA_ARGS:  --keep-image --db-path ${CI_PROJECT_DIR}/replayer-db/ --minio_host=minio-packet.freedesktop.org --minio_bucket=mesa-tracie-public --role-session-name=${CI_PROJECT_PATH}:${CI_JOB_ID} --jwt=${CI_JOB_JWT}
12547ec681f3Smrg    PIGLIT_JUNIT_RESULTS: 1
12557ec681f3Smrg
12567ec681f3Smrg.deqp-test:
12577ec681f3Smrg  script:
12587ec681f3Smrg    - ./install/deqp-runner.sh
12597ec681f3Smrg  artifacts:
12607ec681f3Smrg    exclude:
12617ec681f3Smrg      - results/*.shader_cache
12627ec681f3Smrg    reports:
12637ec681f3Smrg      junit: results/junit.xml
12647ec681f3Smrg
12657ec681f3Smrg.deqp-test-vk:
12667ec681f3Smrg  extends:
12677ec681f3Smrg    - .deqp-test
12687ec681f3Smrg  variables:
12697ec681f3Smrg    DEQP_VER: vk
12707ec681f3Smrg
12717ec681f3Smrg.fossilize-test:
12727ec681f3Smrg  script:
12737ec681f3Smrg    - ./install/fossilize-runner.sh
12747ec681f3Smrg  artifacts:
12757ec681f3Smrg    when: on_failure
12767ec681f3Smrg    name: "mesa_${CI_JOB_NAME}"
12777ec681f3Smrg    paths:
12787ec681f3Smrg      - results/
12797ec681f3Smrg
12807ec681f3Smrg# Rules for tests that should not be present in MRs or the main
12817ec681f3Smrg# project's pipeline (don't block marge or report red on
12827ec681f3Smrg# mesa/mesa main) but should be present on pipelines in personal
12837ec681f3Smrg# branches (so you can opt in to running the flaky test when you want
12847ec681f3Smrg# to).
12857ec681f3Smrg.test-manual:
12867ec681f3Smrg  rules:
12877ec681f3Smrg    - *ignore_scheduled_pipelines
12887ec681f3Smrg    - if: *is-forked-branch
12897ec681f3Smrg      changes:
12907ec681f3Smrg        *all_paths
12917ec681f3Smrg      when: manual
12927ec681f3Smrg    - when: never
12937ec681f3Smrg  variables:
12947ec681f3Smrg    GIT_STRATEGY: none
12957ec681f3Smrg    JOB_TIMEOUT: 80
12967ec681f3Smrg
12977ec681f3Smrg# The above .test-manual rules doesn't allow the jobs to be available for MRs
12987ec681f3Smrg# but we should have an option to have manual jobs in MRs as well.
12997ec681f3Smrg.test-manual-mr:
13007ec681f3Smrg  rules:
13017ec681f3Smrg    - *ignore_scheduled_pipelines
13027ec681f3Smrg    - if: *is-forked-branch-or-pre-merge-not-for-marge
13037ec681f3Smrg      changes:
13047ec681f3Smrg        *all_paths
13057ec681f3Smrg      when: manual
13067ec681f3Smrg    - when: never
13077ec681f3Smrg  variables:
13087ec681f3Smrg    GIT_STRATEGY: none
13097ec681f3Smrg    JOB_TIMEOUT: 80
13107ec681f3Smrg
13117ec681f3Smrg.baremetal-test:
13127ec681f3Smrg  extends:
13137ec681f3Smrg    - .ci-run-policy
13147ec681f3Smrg    - .test
13157ec681f3Smrg  # Cancel job if a newer commit is pushed to the same branch
13167ec681f3Smrg  interruptible: true
13177ec681f3Smrg  stage: test
13187ec681f3Smrg  before_script:
13197ec681f3Smrg    # Use this instead of gitlab's artifacts download because it hits packet.net
13207ec681f3Smrg    # instead of fd.o.  Set FDO_HTTP_CACHE_URI to an http cache for your test lab to
13217ec681f3Smrg    # improve it even more (see https://docs.mesa3d.org/ci/bare-metal.html for
13227ec681f3Smrg    # setup).
13237ec681f3Smrg    - wget ${FDO_HTTP_CACHE_URI:-}https://${PIPELINE_ARTIFACTS_BASE}/${MINIO_ARTIFACT_NAME}.tar.gz -S --progress=dot:giga -O- | tar -xz
13247ec681f3Smrg  artifacts:
13257ec681f3Smrg    when: always
13267ec681f3Smrg    name: "mesa_${CI_JOB_NAME}"
13277ec681f3Smrg    paths:
13287ec681f3Smrg      - results/
13297ec681f3Smrg      - serial*.txt
13307ec681f3Smrg    exclude:
13317ec681f3Smrg      - results/*.shader_cache
13327ec681f3Smrg    reports:
13337ec681f3Smrg      junit: results/junit.xml
13347ec681f3Smrg
13357ec681f3Smrg.baremetal-test-armhf:
13367ec681f3Smrg  extends:
13377ec681f3Smrg    - .baremetal-test
13387ec681f3Smrg  variables:
13397ec681f3Smrg    MINIO_ARTIFACT_NAME: mesa-armhf
13407ec681f3Smrg
13417ec681f3Smrg.baremetal-arm64-asan-test:
13427ec681f3Smrg  variables:
13437ec681f3Smrg    DEQP_RUNNER_OPTIONS: "--env LD_PRELOAD=libasan.so.6"
13447ec681f3Smrg    MINIO_ARTIFACT_NAME: mesa-arm64-asan
13457ec681f3Smrg  needs:
13467ec681f3Smrg    - debian/arm_test
13477ec681f3Smrg    - job: debian-arm64-asan
13487ec681f3Smrg      artifacts: false
13497ec681f3Smrg
13507ec681f3Smrg.baremetal-deqp-test:
13517ec681f3Smrg  variables:
13527ec681f3Smrg    HWCI_TEST_SCRIPT: "/install/deqp-runner.sh"
13537ec681f3Smrg    FDO_CI_CONCURRENT: 0 # Default to number of CPUs
1354