Apart from just doing a local run, this script enables a local mesa repository to be used for the CI run. For this to work the mesa repository is assumed to be located in a directory next to the virgilrenderer. $ ls -la . .. mesa virgilrenderer $ virgilrenderer/ci/run_ci_locally.sh Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org> Signed-off-by: Robert Foss <robert.foss@collabora.com> Signed-off-by: Jakob Bornecrantz <jakob@collabora.com>macos/master
parent
2f9edd6b9e
commit
9f8c75500e
@ -0,0 +1,34 @@ |
|||||||
|
#!/bin/bash |
||||||
|
|
||||||
|
PROJECT_PATH="$(dirname $(readlink -f "$0"))/.." |
||||||
|
|
||||||
|
cd ${PROJECT_PATH} |
||||||
|
|
||||||
|
DOCKER_DRIVER=overlay2 |
||||||
|
RENDER_DEVICE=/dev/dri/renderD128 |
||||||
|
DOCKER_IMAGE=virglrenderer/ci |
||||||
|
|
||||||
|
LOCAL_MESA_PATH="../$PROJECT_PATH/mesa" |
||||||
|
LOCAL_VIRGL_PATH="${PROJECT_PATH}" |
||||||
|
|
||||||
|
if test -e $LOCAL_MESA_PATH; then LOCAL_MESA="-v $LOCAL_MESA_PATH:/local_mesa -e LOCAL_MESA=/local_mesa"; fi |
||||||
|
if test -e $LOCAL_VIRGL_PATH; then LOCAL_VIRGL="-v $LOCAL_VIRGL_PATH:/virglrenderer -e LOCAL_VIRGL=/virglrenderer"; fi |
||||||
|
|
||||||
|
if test -e $RENDER_DEVICE; then RD_CONFIG="--device=$RENDER_DEVICE -e RENDER_DEVICE=$RENDER_DEVICE"; fi |
||||||
|
echo LOCAL_MESA=$LOCAL_MESA |
||||||
|
echo LOCAL_VIRGL=$LOCAL_VIRGL |
||||||
|
echo RD_CONFIG=$RD_CONFIG |
||||||
|
|
||||||
|
rm -rf $PROJECT_PATH/results |
||||||
|
mkdir -p $PROJECT_PATH/results |
||||||
|
|
||||||
|
time docker build -t $DOCKER_IMAGE -f ci/Dockerfile --cache-from $DOCKER_IMAGE:latest ci |
||||||
|
|
||||||
|
time docker run \ |
||||||
|
-it \ |
||||||
|
--ulimit core=99999999999:99999999999 \ |
||||||
|
$RD_CONFIG \ |
||||||
|
$LOCAL_MESA \ |
||||||
|
$LOCAL_VIRGL \ |
||||||
|
$DOCKER_IMAGE:latest \ |
||||||
|
/virglrenderer/ci/run-tests.sh 2>&1 | tee results/log.txt |
Loading…
Reference in new issue