瀏覽代碼

gitlab-ci: Move artifact preparation to separate script

It's currently only needed for the meson-main and meson-arm64 jobs, not
the other meson build jobs.

Also remove MESON_SHADERDB, just run .gitlab-ci/run-shader-db.sh
directly from the meson-main job.

v2:
* Also run prepare-artifacts.sh in meson-arm64 script
v3:
* Move tarball creation into the new script as well, as it prevented
  ccache --show-stats from running in after_script

Reviewed-by: Eric Engestrom <eric.engestrom@intel.com> # v1
Reviewed-by: Eric Anholt <eric@anholt.net>
master
Michel Dänzer 7 年之前
父節點
當前提交
59fcb019d0
共有 3 個文件被更改,包括 36 次插入 和 32 次删除
  1. 7
    7
      .gitlab-ci.yml
  2. 0
    25
      .gitlab-ci/meson-build.sh
  3. 29
    0
      .gitlab-ci/prepare-artifacts.sh

+ 7
- 7
.gitlab-ci.yml 查看文件

@@ -161,12 +161,6 @@ debian-10-test:arm64:
- ccache --zero-stats || true
- ccache --show-stats || true
after_script:
# In case the install dir is being saved as artifacts, tar it up
# so that symlinks and hardlinks aren't each packed separately in
# the zip file.
- if [ -d install ]; then
tar -cf artifacts/install.tar install;
fi
- export CCACHE_DIR="$PWD/ccache"
- ccache --show-stats

@@ -222,8 +216,11 @@ meson-main:
EXTRA_OPTION: >
-D osmesa=gallium
-D tools=all
MESON_SHADERDB: "true"
BUILDTYPE: "debugoptimized"
script:
- .gitlab-ci/meson-build.sh
- .gitlab-ci/run-shader-db.sh
- .gitlab-ci/prepare-artifacts.sh

.meson-cross:
extends:
@@ -270,6 +267,9 @@ meson-arm64:
- .ci-deqp-artifacts
variables:
BUILDTYPE: "debugoptimized"
script:
- .gitlab-ci/meson-build.sh
- .gitlab-ci/prepare-artifacts.sh

# NOTE: Building SWR is 2x (yes two) times slower than all the other
# gallium drivers combined.

+ 0
- 25
.gitlab-ci/meson-build.sh 查看文件

@@ -62,28 +62,3 @@ ninja -j4
LC_ALL=C.UTF-8 ninja test
ninja install
cd ..

if test -n "$MESON_SHADERDB"; then
./.gitlab-ci/run-shader-db.sh;
fi

# Delete 2MB of includes from artifacts.
rm -rf install/include

# Strip the drivers in the artifacts to cut 80% of the artifacts size.
if [ -n "$CROSS" ]; then
STRIP=`sed -n -E "s/strip\s*=\s*'(.*)'/\1/p" "$CROSS_FILE"`
if [ -z "$STRIP" ]; then
echo "Failed to find strip command in cross file"
exit 1
fi
else
STRIP="strip"
fi
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 -Rp .gitlab-ci/deqp* artifacts/
# cp -Rp src/freedreno/ci/expected* artifacts/

+ 29
- 0
.gitlab-ci/prepare-artifacts.sh 查看文件

@@ -0,0 +1,29 @@
#!/bin/bash

set -e
set -o xtrace

# Delete 2MB of includes from artifacts.
rm -rf install/include

# Strip the drivers in the artifacts to cut 80% of the artifacts size.
if [ -n "$CROSS" ]; then
STRIP=`sed -n -E "s/strip\s*=\s*'(.*)'/\1/p" "$CROSS_FILE"`
if [ -z "$STRIP" ]; then
echo "Failed to find strip command in cross file"
exit 1
fi
else
STRIP="strip"
fi
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 -Rp .gitlab-ci/deqp* artifacts/
# cp -Rp src/freedreno/ci/expected* artifacts/

# Tar up the install dir so that symlinks and hardlinks aren't each
# packed separately in the zip file.
tar -cf artifacts/install.tar install

Loading…
取消
儲存