From 256e7888fd0c3c7f6c836ad67d3a4f980e700a31 Mon Sep 17 00:00:00 2001 From: Guilherme Gallo Date: Wed, 8 Mar 2023 13:34:00 -0300 Subject: [PATCH] ci: Fix release build use for performance jobs This commit ensures that we are using mesa release builds in performance jobs. To achieve that, some modifications were made on top of https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21492. - Append the `BUILDTYPE` variable into the S3 artifact name (MINIO_ARTIFACT_NAME environment variable) to allow for better artifact management. - The ./artifacts directory has been added to the list of artifact directories for build-common. This ensures that the debian-release and debian-arm64-release jobs are the only ones necessary for running performance jobs. These jobs only produce artifacts via prepare-artifacts.sh when we are under performance workflow. - Make lava-submit.sh behave similar to baremetal jobs regarding MINIO_ARTIFACT_NAME variable. For example, users can now easily differentiate between mesa-arm64.tar.zstd and mesa-arm64-release.tar.zstd by looking inside the `Downloading artifacts from s3` Gitlab section. Signed-off-by: Guilherme Gallo Part-of: --- .gitlab-ci/build/gitlab-ci.yml | 9 +++++---- .gitlab-ci/lava/lava-submit.sh | 11 ++++++++++- .gitlab-ci/test-source-dep.yml | 21 +++++++-------------- src/intel/ci/gitlab-ci.yml | 2 ++ 4 files changed, 24 insertions(+), 19 deletions(-) diff --git a/.gitlab-ci/build/gitlab-ci.yml b/.gitlab-ci/build/gitlab-ci.yml index ae07eb1..6ca1e3b 100644 --- a/.gitlab-ci/build/gitlab-ci.yml +++ b/.gitlab-ci/build/gitlab-ci.yml @@ -10,6 +10,7 @@ - _build/meson-logs/*.txt - _build/meson-logs/strace - shader-db + - artifacts # Just Linux .build-linux: @@ -221,14 +222,14 @@ debian-release: -D llvm=enabled GALLIUM_DRIVERS: "i915,iris,nouveau,kmsro,freedreno,r300,svga,swrast,v3d,vc4,virgl,etnaviv,panfrost,lima,zink,d3d12,crocus" VULKAN_DRIVERS: "amd,imagination-experimental,microsoft-experimental" - BUILDTYPE: "release" EXTRA_OPTION: > -D spirv-to-dxil=true -D osmesa=true -D tools=all -D intel-clc=enabled -D imagination-srv=true - MINIO_ARTIFACT_NAME: "mesa-amd64-rel" + BUILDTYPE: "release" + MINIO_ARTIFACT_NAME: "mesa-amd64-${BUILDTYPE}" script: - .gitlab-ci/meson/build.sh - 'if [ -n "$MESA_CI_PERFORMANCE_ENABLED" ]; then .gitlab-ci/prepare-artifacts.sh; fi' @@ -468,8 +469,8 @@ debian-arm64-release: extends: - debian-arm64 variables: - MINIO_ARTIFACT_NAME: mesa-arm64-rel - BUILDTYPE: "release" + BUILDTYPE: release + MINIO_ARTIFACT_NAME: mesa-arm64-${BUILDTYPE} C_ARGS: > -Wno-error=stringop-truncation script: diff --git a/.gitlab-ci/lava/lava-submit.sh b/.gitlab-ci/lava/lava-submit.sh index c8bbd8f..29d045a 100755 --- a/.gitlab-ci/lava/lava-submit.sh +++ b/.gitlab-ci/lava/lava-submit.sh @@ -30,6 +30,15 @@ section_end variables tar zcf job-rootfs-overlay.tar.gz -C results/job-rootfs-overlay/ . ci-fairy s3cp --token-file "${CI_JOB_JWT_FILE}" job-rootfs-overlay.tar.gz "https://${JOB_ROOTFS_OVERLAY_PATH}" +ARTIFACT_URL="${FDO_HTTP_CACHE_URI:-}https://${BUILD_PATH}" +# Make it take the mesa build from MINIO_ARTIFACT_NAME, if it is specified in +# the environment. This will make the LAVA behavior consistent with the +# baremetal jobs. +if [ -n "${MINIO_ARTIFACT_NAME}" ] +then + ARTIFACT_URL="${FDO_HTTP_CACHE_URI:-}https://${PIPELINE_ARTIFACTS_BASE}/${MINIO_ARTIFACT_NAME}.tar.zst" +fi + touch results/lava.log tail -f results/lava.log & PYTHONPATH=artifacts/ artifacts/lava/lava_job_submitter.py \ @@ -37,7 +46,7 @@ PYTHONPATH=artifacts/ artifacts/lava/lava_job_submitter.py \ --pipeline-info "$CI_JOB_NAME: $CI_PIPELINE_URL on $CI_COMMIT_REF_NAME ${CI_NODE_INDEX}/${CI_NODE_TOTAL}" \ --rootfs-url-prefix "https://${BASE_SYSTEM_HOST_PATH}" \ --kernel-url-prefix "https://${BASE_SYSTEM_HOST_PATH}" \ - --build-url "${FDO_HTTP_CACHE_URI:-}https://${BUILD_PATH}" \ + --build-url "${ARTIFACT_URL}" \ --job-rootfs-overlay-url "${FDO_HTTP_CACHE_URI:-}https://${JOB_ROOTFS_OVERLAY_PATH}" \ --job-timeout ${JOB_TIMEOUT:-30} \ --first-stage-init artifacts/ci-common/init-stage1.sh \ diff --git a/.gitlab-ci/test-source-dep.yml b/.gitlab-ci/test-source-dep.yml index ac6a784..328f0c7 100644 --- a/.gitlab-ci/test-source-dep.yml +++ b/.gitlab-ci/test-source-dep.yml @@ -331,12 +331,11 @@ allow_failure: true # see comment in .performance-rules, which we don't inherit this line from. variables: LAVA_JOB_PRIORITY: 40 - MINIO_ARTIFACT_NAME: "mesa-arm64-rel" + # Ensure that we are using the release build artifact + MINIO_ARTIFACT_NAME: mesa-arm64-release needs: - job: debian/arm64_test - - job: debian-arm64-release - # The mesa binary is fetched from S3 - artifacts: false + - debian-arm64-release .nouveau-rules: stage: nouveau @@ -558,13 +557,10 @@ allow_failure: true # see comment in .performance-rules, which we don't inherit this line from. variables: LAVA_JOB_PRIORITY: 40 - MINIO_ARTIFACT_NAME: "mesa-amd64-rel" + MINIO_ARTIFACT_NAME: "mesa-amd64-release" needs: - kernel+rootfs_amd64 - - debian-testing - - job: debian-release - # The release binary is fetched from S3 - artifacts: false + - debian-release .venus-rules: stage: layered-backends @@ -688,13 +684,10 @@ allow_failure: true # see comment in .performance-rules, which we don't inherit this line from. variables: LAVA_JOB_PRIORITY: 40 - MINIO_ARTIFACT_NAME: "mesa-amd64-rel" + MINIO_ARTIFACT_NAME: "mesa-amd64-release" needs: - kernel+rootfs_amd64 - - debian-testing - - job: debian-release - # The release binary is fetched from S3 - artifacts: false + - debian-release .anv-rules: stage: intel diff --git a/src/intel/ci/gitlab-ci.yml b/src/intel/ci/gitlab-ci.yml index cdeda44..599a494 100644 --- a/src/intel/ci/gitlab-ci.yml +++ b/src/intel/ci/gitlab-ci.yml @@ -297,6 +297,8 @@ iris-cml-traces: GIT_STRATEGY: none HWCI_FREQ_MAX: "true" LAVA_TAGS: "cbg-0" + # Ensure that we are using the release build artifact + MINIO_ARTIFACT_NAME: mesa-amd64-release iris-apl-traces-performance: extends: -- 2.7.4