mesa/src/gallium/drivers/panfrost/ci/gitlab-ci.yml

190 lines
5.9 KiB
YAML
Raw Normal View History

# IMAGE_TAG is the tag of the docker image used for the build jobs. If the
# image doesn't exist yet, the docker-image stage generates it.
#
# In order to generate a new image, one should generally change the tag.
# While removing the image from the registry would also work, that's not
# recommended except for ephemeral images during development: Replacing an
# image after a significant amount of time might pull in newer versions of
# gcc/clang or other packages, which might break the build with older commits
# using the same tag.
#
# After merging a change resulting in generating a new image to the main
# repository, it's recommended to remove the image from the source repository's
# container registry, so that the image from the main repository's registry
# will be used there as well. You can manage your images on your fork of:
# https://gitlab.freedesktop.org/xorg/xserver/container_registry
variables:
UPSTREAM_REPO: mesa/mesa
DEBIAN_VERSION: testing-slim
IMAGE_TAG: "2019-09-02-2"
include:
- project: 'wayland/ci-templates'
ref: c73dae8b84697ef18e2dbbf4fed7386d9652b0cd
file: '/templates/debian.yml'
stages:
- containers
- build
- test
# Retry jobs after runner system failures
.retry: &retry
retry:
max: 2
when:
- runner_system_failure
# Build Docker image with deqp, the rootfs and the build deps for Mesa
.container:
extends: .debian@container-ifnot-exists
stage: containers
<<: *retry
variables:
GIT_STRATEGY: none # no need to pull the whole tree for rebuilding the image
DEBIAN_TAG: '${DEBIAN_ARCH}-${IMAGE_TAG}'
DEBIAN_EXEC: 'DEBIAN_ARCH=${DEBIAN_ARCH}
GCC_ARCH=${GCC_ARCH}
KERNEL_ARCH=${KERNEL_ARCH}
VOLT_ARCH=${VOLT_ARCH}
DEFCONFIG=${DEFCONFIG}
DEVICE_TREES=${DEVICE_TREES}
KERNEL_IMAGE_NAME=${KERNEL_IMAGE_NAME}
bash src/gallium/drivers/panfrost/ci/debian-install.sh'
container:armhf:
extends: .container
variables:
DEBIAN_ARCH: "armhf"
GCC_ARCH: "arm-linux-gnueabihf"
KERNEL_ARCH: "arm"
VOLT_ARCH: "armhf"
DEFCONFIG: "arch/arm/configs/multi_v7_defconfig"
DEVICE_TREES: "arch/arm/boot/dts/rk3288-veyron-jaq.dtb"
KERNEL_IMAGE_NAME: "zImage"
container:arm64:
extends: .container
variables:
DEBIAN_ARCH: "arm64"
GCC_ARCH: "aarch64-linux-gnu"
KERNEL_ARCH: "arm64"
VOLT_ARCH: "aarch64"
DEFCONFIG: "arch/arm64/configs/defconfig"
DEVICE_TREES: "arch/arm64/boot/dts/rockchip/rk3399-gru-kevin.dtb"
KERNEL_IMAGE_NAME: "Image"
.build:
stage: build
image: $CI_REGISTRY_IMAGE/debian/$DEBIAN_VERSION:${DEBIAN_ARCH}-${IMAGE_TAG}
cache:
paths:
- ccache
before_script:
- mkdir -p results mesa-build
- mkdir -p ccache
script:
- export CCACHE_BASEDIR=$CI_PROJECT_DIR
- export CCACHE_DIR=$CI_PROJECT_DIR/ccache
- export PATH="/usr/lib/ccache:$PATH"
- ccache -s
# Build Mesa
- /usr/share/meson/debcrossgen --arch ${DEBIAN_ARCH} -o /tmp/cross_file.txt
- meson . mesa-build
--cross-file /tmp/cross_file.txt
--libdir /artifacts/rootfs/mesa/lib/
--buildtype release
-Dgallium-drivers=kmsro,panfrost
-Ddri-drivers=
-Dprefix=/artifacts/rootfs/mesa
- ninja -C mesa-build install
- du -sh /artifacts/rootfs/mesa/*
- rm -rf /artifacts/rootfs/mesa/include
# Pack rootfs
- cp src/gallium/drivers/panfrost/ci/deqp-runner.sh /artifacts/rootfs/deqp/.
- cp src/gallium/drivers/panfrost/ci/expected-failures.txt /artifacts/rootfs/deqp/.
- du -sh /artifacts/rootfs/deqp/*
- find /artifacts/rootfs/ -type f -printf "%s\t%p\n" | sort -n
- cd /artifacts/rootfs/ ; find -H | cpio -H newc -v -o | gzip -c - > $CI_PROJECT_DIR/results/panfrost-rootfs-${DEBIAN_ARCH}.cpio.gz
# Copy kernel and DT
- cp /artifacts/${KERNEL_IMAGE_NAME} /artifacts/*.dtb $CI_PROJECT_DIR/results/.
# Generate LAVA job
- cd $CI_PROJECT_DIR
- src/gallium/drivers/panfrost/ci/generate_lava.py
--template src/gallium/drivers/panfrost/ci/lava-deqp.yml.jinja2
--arch ${DEBIAN_ARCH}
--base-artifacts-url $CI_PROJECT_URL/-/jobs/$CI_JOB_ID/artifacts/raw/results
--device-type ${DEVICE_TYPE}
--kernel-image-name ${KERNEL_IMAGE_NAME}
> results/lava-deqp.yml
- cp src/gallium/drivers/panfrost/ci/expected-failures.txt results/.
artifacts:
when: always
paths:
- results/
build:armhf:
extends: .build
needs: ["container:armhf"]
variables:
DEBIAN_ARCH: "armhf"
GCC_ARCH: "arm-linux-gnueabihf"
DEVICE_TYPE: "rk3288-veyron-jaq"
KERNEL_IMAGE_NAME: "zImage"
build:arm64:
extends: .build
needs: ["container:arm64"]
variables:
DEBIAN_ARCH: "arm64"
GCC_ARCH: "aarch64-linux-gnu"
DEVICE_TYPE: "rk3399-gru-kevin"
KERNEL_IMAGE_NAME: "Image"
.test:
stage: test
tags:
- idle-jobs
image: $CI_REGISTRY_IMAGE/debian/$DEBIAN_VERSION:arm64-${IMAGE_TAG} # Any of the images will be fine
variables:
GIT_STRATEGY: none # no need to pull the whole tree for submitting the job
script:
- mkdir -p ~/.config/
- |
echo "default:
uri: https://lava.collabora.co.uk/RPC2
timeout: 120
username: jenkins-fdo
token: $LAVA_TOKEN
" > ~/.config/lavacli.yaml
- lava_job_id=`lavacli jobs submit $CI_PROJECT_DIR/results/lava-deqp.yml`
- echo $lava_job_id
- lavacli jobs logs $lava_job_id | grep -a -v "{'case':" | tee results/lava-deqp-$lava_job_id.log
- lavacli jobs show $lava_job_id
- result=`lavacli results $lava_job_id 0_deqp deqp | head -1`
- echo $result
# Don't error out on RK3288
- '[[ "$result" == "pass" || -f results/rk3288-veyron-jaq.dtb ]]'
artifacts:
when: always
paths:
- results/
test:armhf:
extends: .test
needs: ["build:armhf"]
dependencies:
- build:armhf
test:arm64:
extends: .test
needs: ["build:arm64"]
dependencies:
- build:arm64