2019-05-03 09:49:43 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
set -e
|
|
|
|
set -o xtrace
|
|
|
|
|
2019-10-11 14:43:34 +01:00
|
|
|
CROSS_FILE=/cross_file-"$CROSS".txt
|
|
|
|
|
2019-05-03 09:49:43 +01:00
|
|
|
# We need to control the version of llvm-config we're using, so we'll
|
2019-10-11 14:43:34 +01:00
|
|
|
# tweak the cross file or generate a native file to do so.
|
2019-05-03 09:49:43 +01:00
|
|
|
if test -n "$LLVM_VERSION"; then
|
|
|
|
LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
|
|
|
|
echo -e "[binaries]\nllvm-config = '`which $LLVM_CONFIG`'" > native.file
|
2019-10-11 14:43:34 +01:00
|
|
|
if [ -n "$CROSS" ]; then
|
|
|
|
sed -i -e '/\[binaries\]/a\' -e "llvm-config = '`which $LLVM_CONFIG`'" $CROSS_FILE
|
|
|
|
fi
|
2019-05-03 09:49:43 +01:00
|
|
|
$LLVM_CONFIG --version
|
|
|
|
else
|
2019-05-03 09:58:48 +01:00
|
|
|
rm -f native.file
|
2019-05-03 09:49:43 +01:00
|
|
|
touch native.file
|
|
|
|
fi
|
|
|
|
|
2019-09-17 01:44:12 +01:00
|
|
|
# cross-xfail-$CROSS, if it exists, contains a list of tests that are expected
|
|
|
|
# to fail for the $CROSS configuration, one per line. you can then mark those
|
|
|
|
# tests in their meson.build with:
|
|
|
|
#
|
|
|
|
# test(...,
|
|
|
|
# should_fail: meson.get_cross_property('xfail', '').contains(t),
|
|
|
|
# )
|
|
|
|
#
|
|
|
|
# where t is the name of the test, and the '' is the string to search when
|
|
|
|
# not cross-compiling (which is empty, because for amd64 everything is
|
|
|
|
# expected to pass).
|
|
|
|
if [ -n "$CROSS" ]; then
|
|
|
|
CROSS_XFAIL=.gitlab-ci/cross-xfail-"$CROSS"
|
|
|
|
if [ -s "$CROSS_XFAIL" ]; then
|
|
|
|
sed -i \
|
|
|
|
-e '/\[properties\]/a\' \
|
|
|
|
-e "xfail = '$(tr '\n' , < $CROSS_XFAIL)'" \
|
|
|
|
"$CROSS_FILE"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2019-05-03 09:58:48 +01:00
|
|
|
rm -rf _build
|
2019-05-03 09:49:43 +01:00
|
|
|
meson _build --native-file=native.file \
|
2019-10-14 17:04:47 +01:00
|
|
|
--wrap-mode=nofallback \
|
2019-09-17 01:44:12 +01:00
|
|
|
${CROSS+--cross "$CROSS_FILE"} \
|
2019-07-25 19:02:34 +01:00
|
|
|
-D prefix=`pwd`/install \
|
2019-07-23 19:12:07 +01:00
|
|
|
-D libdir=lib \
|
2019-08-01 20:14:15 +01:00
|
|
|
-D buildtype=${BUILDTYPE:-debug} \
|
2019-05-03 09:49:43 +01:00
|
|
|
-D build-tests=true \
|
|
|
|
-D libunwind=${UNWIND} \
|
|
|
|
${DRI_LOADERS} \
|
|
|
|
-D dri-drivers=${DRI_DRIVERS:-[]} \
|
|
|
|
${GALLIUM_ST} \
|
|
|
|
-D gallium-drivers=${GALLIUM_DRIVERS:-[]} \
|
|
|
|
-D vulkan-drivers=${VULKAN_DRIVERS:-[]} \
|
2019-05-08 17:17:23 +01:00
|
|
|
-D I-love-half-baked-turnips=true \
|
|
|
|
${EXTRA_OPTION}
|
2019-05-03 09:49:43 +01:00
|
|
|
cd _build
|
|
|
|
meson configure
|
ci: Switch over to an autoscaling GKE cluster for builds.
The GKE pool we're using is 1-3 32-core VMs, preemptible (to keep
costs down), with 8 jobs concurrent per system. We have plenty of
memory (4G/core), so we run make -j8 to try to keep the cores busy even
when one job is in a single-threaded step (docker image download, git
clone, artifacts processing, etc.) When all jobs are generating work
for all the cores, they'll be scheduled fairly.
The nodes in the pool have 300GB boot disks (over-provisioned in space
to provide enough iops and throughput) mounted to /ccache, and
CACHE_DIR set pointing to them. This means that once a new
autoscaled-up node has run some jobs, it should have a hot ccache from
then on (instead of having to rely on the docker container cache
having our ccache laying around and not getting wiped out by some
other fd.o job). Local SSDs would provide higher performance, but
unfortunately are not supported with the cluster autoscaler.
For now, the softpipe/llvmpipe test runs are still on the shared
runners, until I can get them ported onto Bas's runner so they can be
parallelized in a single job.
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
2019-10-21 21:36:14 +01:00
|
|
|
ninja ${NINJA_FLAGS}
|
2019-05-03 09:49:43 +01:00
|
|
|
LC_ALL=C.UTF-8 ninja test
|
2019-07-25 19:02:34 +01:00
|
|
|
ninja install
|
2019-04-10 23:59:12 +01:00
|
|
|
cd ..
|
|
|
|
|
|
|
|
if test -n "$MESON_SHADERDB"; then
|
|
|
|
./.gitlab-ci/run-shader-db.sh;
|
|
|
|
fi
|
2019-06-29 00:35:32 +01:00
|
|
|
|
|
|
|
# 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
|
2019-09-17 01:44:12 +01:00
|
|
|
STRIP=`sed -n -E "s/strip\s*=\s*'(.*)'/\1/p" "$CROSS_FILE"`
|
2019-06-29 00:35:32 +01:00
|
|
|
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/
|