ci/baremetal: Clean the directory we unpack artifacts into.
authorEmma Anholt <emma@anholt.net>
Tue, 13 Dec 2022 18:29:58 +0000 (10:29 -0800)
committerMarge Bot <emma+marge@anholt.net>
Wed, 14 Dec 2022 17:09:07 +0000 (17:09 +0000)
gitlab-runner reuses containers, and since we don't pull git, the working
directory doesn't get cleaned automatically.  You don't want to have stale
files from previous builds, particularly if someone's testing changes of
build options that might disable a driver.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20302>

.gitlab-ci/test/gitlab-ci.yml

index b06277c..c171c0c 100644 (file)
@@ -135,6 +135,8 @@ rustfmt:
     # improve it even more (see https://docs.mesa3d.org/ci/bare-metal.html for
     # setup).
     - echo -e "\e[0Ksection_start:$(date +%s):artifacts_download[collapsed=true]\r\e[0KDownloading artifacts from minio"
+    # Note: Build dir (and thus install) may be dirty due to GIT_STRATEGY
+    - rm -rf install
     - wget ${FDO_HTTP_CACHE_URI:-}https://${PIPELINE_ARTIFACTS_BASE}/${MINIO_ARTIFACT_NAME}.tar.zst -S --progress=dot:giga -O- | tar --zstd -x
     - echo -e "\e[0Ksection_end:$(date +%s):artifacts_download\r\e[0K"
   artifacts: