Mesa (master): gitlab-ci: Place files from the Mesa repo into the build tarball

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Mar 26 09:56:02 UTC 2020


Module: Mesa
Branch: master
Commit: 92f3c51560f9eb2387b1d929f694244c0b7bd577
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=92f3c51560f9eb2387b1d929f694244c0b7bd577

Author: Tomeu Vizoso <tomeu.vizoso at collabora.com>
Date:   Tue Mar 24 12:58:30 2020 +0100

gitlab-ci: Place files from the Mesa repo into the build tarball

There's some files from the .gitlab-ci directory that are needed in the
test stage and that, because the Mesa repository isn't checked out in
that stage, need to be made available through other means.

Because those files are going to be needed in LAVA devices, place them
ino the tarball containing the built files so it's available to both
gitlab-ci runners and LAVA devices.

Before those files were passed in the artifacts of the Gitlab CI job,
but this commit places them into the built tarball so scripts later in
the pipeline don't need to account for this discrepancy.

Signed-off-by: Tomeu Vizoso <tomeu.vizoso at collabora.com>
Reviewed-by: Eric Anholt <eric at anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4295>

---

 .gitlab-ci.yml                    | 26 +++++++++++++-------------
 .gitlab-ci/bare-metal/fastboot.sh |  5 ++---
 .gitlab-ci/bare-metal/init.sh     |  2 +-
 .gitlab-ci/deqp-runner.sh         |  6 +++---
 .gitlab-ci/fossilize-runner.sh    |  4 ++--
 .gitlab-ci/lava-deqp.yml.jinja2   | 13 ++++---------
 .gitlab-ci/piglit/run.sh          |  4 ++--
 .gitlab-ci/prepare-artifacts.sh   | 34 ++++++++++++++++------------------
 .gitlab-ci/tracie-runner-gl.sh    |  6 +++---
 .gitlab-ci/tracie-runner-vk.sh    |  6 +++---
 10 files changed, 49 insertions(+), 57 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 2f9cc15a70d..dcbbb58784f 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -587,7 +587,7 @@ scons-old-llvm:
     LIBGL_ALWAYS_SOFTWARE: 1
     PIGLIT_NO_WINDOW: 1
   script:
-    - artifacts/piglit/run.sh
+    - install/piglit/run.sh
 
 piglit-quick_gl:
   extends: .piglit-test
@@ -624,7 +624,7 @@ piglit-quick_shader:
   variables:
     DEQP_SKIPS: deqp-default-skips.txt
   script:
-    - ./artifacts/deqp-runner.sh
+    - ./install/deqp-runner.sh
 
 .deqp-test-gl:
   extends:
@@ -641,7 +641,7 @@ piglit-quick_shader:
 .fossilize-test:
   extends: .test-vk
   script:
-    - ./artifacts/fossilize-runner.sh
+    - ./install/fossilize-runner.sh
 
 llvmpipe-gles2:
   variables:
@@ -790,8 +790,8 @@ arm64_a530_gles3:
     - .fossilize-test
     - .test-radv
   script:
-    - ./artifacts/fossilize-runner.sh
-    - ACO_DEBUG=validateir,validatera RADV_PERFTEST=aco ./artifacts/fossilize-runner.sh
+    - ./install/fossilize-runner.sh
+    - ACO_DEBUG=validateir,validatera RADV_PERFTEST=aco ./install/fossilize-runner.sh
 
 # Can only be triggered manually on personal branches because RADV is the only
 # driver that does Vulkan testing at the moment.
@@ -812,16 +812,16 @@ radv-fossils:
   script:
     # Polaris10
     - export RADV_FORCE_FAMILY="polaris10"
-    - ./artifacts/fossilize-runner.sh
-    - ACO_DEBUG=validateir,validatera RADV_PERFTEST=aco ./artifacts/fossilize-runner.sh
+    - ./install/fossilize-runner.sh
+    - ACO_DEBUG=validateir,validatera RADV_PERFTEST=aco ./install/fossilize-runner.sh
     # Vega10
     - export RADV_FORCE_FAMILY="gfx900"
-    - ./artifacts/fossilize-runner.sh
-    - ACO_DEBUG=validateir,validatera RADV_PERFTEST=aco ./artifacts/fossilize-runner.sh
+    - ./install/fossilize-runner.sh
+    - ACO_DEBUG=validateir,validatera RADV_PERFTEST=aco ./install/fossilize-runner.sh
     # Navi10
     - export RADV_FORCE_FAMILY="gfx1010"
-    - ./artifacts/fossilize-runner.sh
-    - ACO_DEBUG=validateir,validatera RADV_PERFTEST=aco ./artifacts/fossilize-runner.sh
+    - ./install/fossilize-runner.sh
+    - ACO_DEBUG=validateir,validatera RADV_PERFTEST=aco ./install/fossilize-runner.sh
 
 # Traces CI
 .traces-test:
@@ -835,14 +835,14 @@ radv-fossils:
     - .test-gl
     - .traces-test
   script:
-    - ./artifacts/tracie-runner-gl.sh
+    - ./install/tracie-runner-gl.sh
 
 .traces-test-vk:
   extends:
     - .test-vk
     - .traces-test
   script:
-    - ./artifacts/tracie-runner-vk.sh
+    - ./install/tracie-runner-vk.sh
 
 llvmpipe-traces:
   extends:
diff --git a/.gitlab-ci/bare-metal/fastboot.sh b/.gitlab-ci/bare-metal/fastboot.sh
index 6b6174a4a9f..3136f0f5801 100755
--- a/.gitlab-ci/bare-metal/fastboot.sh
+++ b/.gitlab-ci/bare-metal/fastboot.sh
@@ -56,10 +56,9 @@ ln -sf $CI_PROJECT_DIR/install rootfs/install
 
 # Copy the deqp runner script and metadata.
 cp .gitlab-ci/deqp-runner.sh rootfs/deqp/.
-mkdir -p rootfs/artifacts/deqp
-cp .gitlab-ci/$DEQP_SKIPS rootfs/artifacts/deqp-skips.txt
+cp .gitlab-ci/$DEQP_SKIPS rootfs/$CI_PROJECT_DIR/install/deqp-skips.txt
 if [ -n "$DEQP_EXPECTED_FAILS" ]; then
-  cp .gitlab-ci/$DEQP_EXPECTED_FAILS rootfs/artifacts/deqp-expected-fails.txt
+  cp .gitlab-ci/$DEQP_EXPECTED_FAILS rootfs/$CI_PROJECT_DIR/install/deqp-expected-fails.txt
 fi
 
 # Finally, pack it up into a cpio rootfs.
diff --git a/.gitlab-ci/bare-metal/init.sh b/.gitlab-ci/bare-metal/init.sh
index c5e5c97effc..39a5a3c2812 100644
--- a/.gitlab-ci/bare-metal/init.sh
+++ b/.gitlab-ci/bare-metal/init.sh
@@ -15,7 +15,7 @@ export DEQP_PARALLEL=DEQP_PARALLEL_REPLACE
 export CI_NODE_INDEX=CI_NODE_INDEX_REPLACE
 export CI_NODE_TOTAL=CI_NODE_TOTAL_REPLACE
 export DEQP_SKIPS=deqp-skips.txt
-if [ -e /artifacts/deqp-expected-fails.txt ]; then
+if [ -e /install/deqp-expected-fails.txt ]; then
   export DEQP_EXPECTED_FAILS=deqp-expected-fails.txt
 fi
 
diff --git a/.gitlab-ci/deqp-runner.sh b/.gitlab-ci/deqp-runner.sh
index ed95ba53578..1dda8e942d5 100755
--- a/.gitlab-ci/deqp-runner.sh
+++ b/.gitlab-ci/deqp-runner.sh
@@ -31,7 +31,7 @@ if [ -z "$DEQP_SKIPS" ]; then
    exit 1
 fi
 
-ARTIFACTS=`pwd`/artifacts
+INSTALL=`pwd`/install
 
 # Set up the driver environment.
 export LD_LIBRARY_PATH=`pwd`/install/lib/
@@ -66,7 +66,7 @@ if [ ! -s /tmp/case-list.txt ]; then
 fi
 
 if [ -n "$DEQP_EXPECTED_FAILS" ]; then
-    XFAIL="--xfail-list $ARTIFACTS/$DEQP_EXPECTED_FAILS"
+    XFAIL="--xfail-list $INSTALL/$DEQP_EXPECTED_FAILS"
 fi
 
 set +e
@@ -83,7 +83,7 @@ run_cts() {
         --deqp $deqp \
         --output $output \
         --caselist $caselist \
-        --exclude-list $ARTIFACTS/$DEQP_SKIPS \
+        --exclude-list $INSTALL/$DEQP_SKIPS \
         $XFAIL \
         $JOB \
 	--allow-flakes true \
diff --git a/.gitlab-ci/fossilize-runner.sh b/.gitlab-ci/fossilize-runner.sh
index 618c2aa5b72..b2cd2f56e4b 100755
--- a/.gitlab-ci/fossilize-runner.sh
+++ b/.gitlab-ci/fossilize-runner.sh
@@ -7,10 +7,10 @@ if [ -z "$VK_DRIVER" ]; then
    exit 1
 fi
 
-ARTIFACTS=`pwd`/artifacts
+INSTALL=`pwd`/install
 
 # Set up the driver environment.
 export LD_LIBRARY_PATH=`pwd`/install/lib/
 export VK_ICD_FILENAMES=`pwd`/install/share/vulkan/icd.d/"$VK_DRIVER"_icd.x86_64.json
 
-"$ARTIFACTS/fossils/fossils.sh" "$ARTIFACTS/fossils.yml"
+"$INSTALL/fossils/fossils.sh" "$INSTALL/fossils.yml"
diff --git a/.gitlab-ci/lava-deqp.yml.jinja2 b/.gitlab-ci/lava-deqp.yml.jinja2
index 3cd217291d4..e7d980ec0cc 100644
--- a/.gitlab-ci/lava-deqp.yml.jinja2
+++ b/.gitlab-ci/lava-deqp.yml.jinja2
@@ -83,6 +83,9 @@ actions:
           - export {{ env_vars }}
 {% endif %}
 
+          # deqp-runner.sh assumes some stuff is in pwd
+          - cd /
+
           - export DEQP_NO_SAVE_RESULTS=1
           - 'export DEQP_RUNNER_OPTIONS="--compact-display false --shuffle false"'
           - export DEQP_EXPECTED_FAILS=deqp-{{ gpu_version }}-fails.txt
@@ -90,15 +93,7 @@ actions:
           - export DEQP_VER={{ deqp_version }}
           - export LIBGL_DRIVERS_PATH=`pwd`/install/lib/dri
 
-          # Put stuff where the runner script expects it
-          - mkdir artifacts
-          - mkdir results
-          - mkdir -p install/lib
-          - cp /deqp/$DEQP_EXPECTED_FAILS artifacts/.
-          - cp /deqp/$DEQP_SKIPS artifacts/.
-          - mv /mesa/lib/* install/lib/.
-
-          - "if sh /deqp/deqp-runner.sh; then
+          - "if sh /install/deqp-runner.sh; then
                   echo 'deqp: pass';
              else
                   echo 'deqp: fail';
diff --git a/.gitlab-ci/piglit/run.sh b/.gitlab-ci/piglit/run.sh
index 9b40e997388..e834cb4e978 100755
--- a/.gitlab-ci/piglit/run.sh
+++ b/.gitlab-ci/piglit/run.sh
@@ -3,7 +3,7 @@
 set -e
 set -o xtrace
 
-VERSION=`cat artifacts/VERSION`
+VERSION=`cat install/VERSION`
 
 cd /piglit
 
@@ -15,7 +15,7 @@ xvfb-run --server-args="-noreset" sh -c \
 
 PIGLIT_RESULTS=${PIGLIT_RESULTS:-$PIGLIT_PROFILES}
 mkdir -p .gitlab-ci/piglit
-cp $OLDPWD/artifacts/piglit/$PIGLIT_RESULTS.txt .gitlab-ci/piglit/$PIGLIT_RESULTS.txt.baseline
+cp $OLDPWD/install/piglit/$PIGLIT_RESULTS.txt .gitlab-ci/piglit/$PIGLIT_RESULTS.txt.baseline
 ./piglit summary console $OLDPWD/results | head -n -1 | grep -v ": pass" >.gitlab-ci/piglit/$PIGLIT_RESULTS.txt
 
 if diff -q .gitlab-ci/piglit/$PIGLIT_RESULTS.txt{.baseline,}; then
diff --git a/.gitlab-ci/prepare-artifacts.sh b/.gitlab-ci/prepare-artifacts.sh
index d1993e0c3db..65830d12773 100755
--- a/.gitlab-ci/prepare-artifacts.sh
+++ b/.gitlab-ci/prepare-artifacts.sh
@@ -22,20 +22,23 @@ find install -name \*.so -exec $STRIP {} \;
 
 # Test runs don't pull down the git tree, so put the dEQP helper
 # script and associated bits there.
-mkdir -p artifacts/
-cp VERSION artifacts/
-cp -Rp .gitlab-ci/deqp* artifacts/
-cp -Rp .gitlab-ci/piglit artifacts/
-cp -Rp .gitlab-ci/traces.yml artifacts/
-cp -Rp .gitlab-ci/tracie artifacts/
-cp -Rp .gitlab-ci/tracie-runner-gl.sh artifacts/
-cp -Rp .gitlab-ci/tracie-runner-vk.sh artifacts/
-cp -Rp .gitlab-ci/fossils.yml artifacts/
-cp -Rp .gitlab-ci/fossils artifacts/
-cp -Rp .gitlab-ci/fossilize-runner.sh artifacts/
+cp VERSION install/
+cp -Rp .gitlab-ci/deqp* install/
+cp -Rp .gitlab-ci/piglit install/
+cp -Rp .gitlab-ci/traces.yml install/
+cp -Rp .gitlab-ci/tracie install/
+cp -Rp .gitlab-ci/tracie-runner-gl.sh install/
+cp -Rp .gitlab-ci/tracie-runner-vk.sh install/
+cp -Rp .gitlab-ci/fossils.yml install/
+cp -Rp .gitlab-ci/fossils install/
+cp -Rp .gitlab-ci/fossilize-runner.sh install/
+cp -Rp .gitlab-ci/deqp-runner.sh install/
+cp -Rp .gitlab-ci/deqp-*-fails.txt install/
+cp -Rp .gitlab-ci/deqp-*-skips.txt install/
 
 # Tar up the install dir so that symlinks and hardlinks aren't each
 # packed separately in the zip file.
+mkdir -p artifacts/
 tar -cf artifacts/install.tar install
 
 # If the container has LAVA stuff, prepare the artifacts for LAVA jobs
@@ -45,13 +48,8 @@ if [ -d /lava-files ]; then
     cp /lava-files/*.dtb artifacts/.
 
     # Pack ramdisk for LAVA
-    mkdir -p /lava-files/rootfs-${CROSS:-arm64}/mesa
-    cp -a install/* /lava-files/rootfs-${CROSS:-arm64}/mesa/.
-
-    cp .gitlab-ci/deqp-runner.sh /lava-files/rootfs-${CROSS:-arm64}/deqp/.
-    cp .gitlab-ci/deqp-*-fails.txt /lava-files/rootfs-${CROSS:-arm64}/deqp/.
-    cp .gitlab-ci/deqp-*-skips.txt /lava-files/rootfs-${CROSS:-arm64}/deqp/.
-    find /lava-files/rootfs-${CROSS:-arm64}/ -type f -printf "%s\t%i\t%p\n" | sort -n | tail -100
+    mkdir -p /lava-files/rootfs-${CROSS:-arm64}/install
+    cp -a install/* /lava-files/rootfs-${CROSS:-arm64}/install/.
 
     pushd /lava-files/rootfs-${CROSS:-arm64}/
     find -H  |  cpio -H newc -o | gzip -c - > $CI_PROJECT_DIR/artifacts/lava-rootfs-${CROSS:-arm64}.cpio.gz
diff --git a/.gitlab-ci/tracie-runner-gl.sh b/.gitlab-ci/tracie-runner-gl.sh
index cb7113cfcbd..f65d7abba3e 100755
--- a/.gitlab-ci/tracie-runner-gl.sh
+++ b/.gitlab-ci/tracie-runner-gl.sh
@@ -2,7 +2,7 @@
 
 set -ex
 
-ARTIFACTS="$(pwd)/artifacts"
+INSTALL="$(pwd)/install"
 
 # Set up the driver environment.
 export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$(pwd)/install/lib/"
@@ -23,6 +23,6 @@ export DISPLAY=
 export WAFFLE_PLATFORM=surfaceless_egl
 
 # Perform a self-test to ensure tracie is working properly.
-"$ARTIFACTS/tracie/tests/test.sh"
+"$INSTALL/tracie/tests/test.sh"
 
-python3 $ARTIFACTS/tracie/tracie.py --file $ARTIFACTS/traces.yml --device-name $DEVICE_NAME
+python3 $INSTALL/tracie/tracie.py --file $INSTALL/traces.yml --device-name $DEVICE_NAME
diff --git a/.gitlab-ci/tracie-runner-vk.sh b/.gitlab-ci/tracie-runner-vk.sh
index e3f8c5d5319..da03967d767 100755
--- a/.gitlab-ci/tracie-runner-vk.sh
+++ b/.gitlab-ci/tracie-runner-vk.sh
@@ -2,7 +2,7 @@
 
 set -ex
 
-ARTIFACTS="$(pwd)/artifacts"
+INSTALL="$(pwd)/install"
 
 # Set the Vulkan driver to use.
 export VK_ICD_FILENAMES="$(pwd)/install/share/vulkan/icd.d/${VK_DRIVER}_icd.x86_64.json"
@@ -12,7 +12,7 @@ export VK_LAYER_PATH="$VK_LAYER_PATH:/VulkanTools/build/etc/vulkan/explicit_laye
 export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/VulkanTools/build/lib"
 
 # Perform a self-test to ensure tracie is working properly.
-"$ARTIFACTS/tracie/tests/test.sh"
+"$INSTALL/tracie/tests/test.sh"
 
 ret=0
 
@@ -22,6 +22,6 @@ ret=0
 # file:
 # https://docs.gitlab.com/runner/configuration/advanced-configuration.html#the-runners-section
 PATH="/gfxreconstruct/build/bin:$PATH" \
-    python3 $ARTIFACTS/tracie/tracie.py --file $ARTIFACTS/traces.yml --device-name $DEVICE_NAME
+    python3 $INSTALL/tracie/tracie.py --file $INSTALL/traces.yml --device-name $DEVICE_NAME
 
 exit $ret



More information about the mesa-commit mailing list