diff options
author | Tomeu Vizoso <[email protected]> | 2019-09-18 16:43:30 +0200 |
---|---|---|
committer | Tomeu Vizoso <[email protected]> | 2019-10-06 07:47:41 -0700 |
commit | 555c0de8c6f5b8be8c28ee92a816c7bb711afde5 (patch) | |
tree | 7a214d34287278667f3006470ee7f98fdea11bb5 /.gitlab-ci/lava-gitlab-ci.yml | |
parent | 7b01f725dd2984d1e6a994330a9dd012957d8abb (diff) |
gitlab-ci: Move LAVA-related files into top-level ci dir
In preparation for testing drivers other than Panfrost in LAVA labs.
Signed-off-by: Tomeu Vizoso <[email protected]>
Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to '.gitlab-ci/lava-gitlab-ci.yml')
-rw-r--r-- | .gitlab-ci/lava-gitlab-ci.yml | 196 |
1 files changed, 196 insertions, 0 deletions
diff --git a/.gitlab-ci/lava-gitlab-ci.yml b/.gitlab-ci/lava-gitlab-ci.yml new file mode 100644 index 00000000000..dcd170c38eb --- /dev/null +++ b/.gitlab-ci/lava-gitlab-ci.yml @@ -0,0 +1,196 @@ +variables: + LAVA_DEBIAN_VERSION: testing-slim + LAVA_IMAGE_TAG: "lava-2019-09-20-1" + +include: + - project: 'wayland/ci-templates' + ref: 1f7f57c64ff4ebbf7292e3b7a13600518b8cb24c + file: '/templates/debian.yml' + +# When to automatically run the CI +.ci-run-policy: + only: + - branches@mesa/mesa + - merge_requests + - /^ci([-/].*)?$/ + retry: + max: 2 + when: + - runner_system_failure + +# Build Docker image with deqp, the rootfs and the build deps for Mesa +.lava-container: + extends: + - .debian@container-ifnot-exists + - .ci-run-policy + stage: containers + variables: + GIT_STRATEGY: none # no need to pull the whole tree for rebuilding the image + DEBIAN_TAG: '${DEBIAN_ARCH}-${LAVA_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 .gitlab-ci/lava-debian-install.sh' + DEBIAN_VERSION: ${LAVA_DEBIAN_VERSION} + +lava-container:armhf: + extends: .lava-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" + +lava-container:arm64: + extends: .lava-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" + +.lava-build: + stage: build + image: $CI_REGISTRY_IMAGE/debian/$LAVA_DEBIAN_VERSION:$DEBIAN_ARCH-$LAVA_IMAGE_TAG + extends: + - .ci-run-policy + cache: + key: ${CI_JOB_NAME} + paths: + - ccache + variables: + CCACHE_COMPILERCHECK: "content" + # Use ccache transparently, and print stats before/after + before_script: + - mkdir -p results mesa-build + - mkdir -p ccache + - export PATH="/usr/lib/ccache:$PATH" + - export CCACHE_BASEDIR="$PWD" + - export CCACHE_DIR="$PWD/ccache" + - ccache --max-size=1500M + - ccache --zero-stats || true + - ccache --show-stats || true + script: + # 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 debugoptimized + -D gallium-drivers=kmsro,panfrost + -D dri-drivers= + -D prefix=/artifacts/rootfs/mesa + -D glx=disabled + -D gbm=false + -D egl=true + -D platforms=surfaceless + -D osmesa=none + -D dri3=false + -D gallium-vdpau=false + -D gallium-xvmc=false + -D gallium-omx=disabled + -D gallium-va=false + -D gallium-xa=false + -D gallium-nine=false + -D llvm=false + - ninja -C mesa-build -j4 + - ninja -C mesa-build install + - find /artifacts/rootfs/mesa/lib -name \*.so -exec ${GCC_ARCH}-strip {} \; + + - du -sh /artifacts/rootfs/mesa/* + - rm -rf /artifacts/rootfs/mesa/include + + # Pack rootfs + - cp .gitlab-ci/lava-deqp-runner.sh /artifacts/rootfs/deqp/. + - cp .gitlab-ci/deqp-*-fails.txt /artifacts/rootfs/deqp/. + - du -sh /artifacts/rootfs/deqp/* + - find /artifacts/rootfs/ -type f -printf "%s\t%p\n" | sort -n + - pushd /artifacts/rootfs/ ; find -H | cpio -H newc -v -o | gzip -c - > $CI_PROJECT_DIR/results/panfrost-rootfs-${DEBIAN_ARCH}.cpio.gz; popd + + # Copy kernel and DT + - cp /artifacts/${KERNEL_IMAGE_NAME} /artifacts/*.dtb $CI_PROJECT_DIR/results/. + + # Generate LAVA job + - cd $CI_PROJECT_DIR + - .gitlab-ci/generate_lava.py + --template .gitlab-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} + --gpu-version ${GPU_VERSION} + > results/lava-deqp.yml + after_script: + - export CCACHE_DIR="$PWD/ccache" + - ccache --show-stats + artifacts: + when: always + paths: + - results/ + +lava-build:armhf: + extends: .lava-build + needs: ["lava-container:armhf"] + variables: + DEBIAN_ARCH: "armhf" + GCC_ARCH: "arm-linux-gnueabihf" + DEVICE_TYPE: "rk3288-veyron-jaq" + KERNEL_IMAGE_NAME: "zImage" + GPU_VERSION: "t760" + +lava-build:arm64: + extends: .lava-build + needs: ["lava-container:arm64"] + variables: + DEBIAN_ARCH: "arm64" + GCC_ARCH: "aarch64-linux-gnu" + DEVICE_TYPE: "rk3399-gru-kevin" + KERNEL_IMAGE_NAME: "Image" + GPU_VERSION: "t860" + +.lava-test: + stage: test + image: $CI_REGISTRY_IMAGE/debian/$LAVA_DEBIAN_VERSION:arm64-$LAVA_IMAGE_TAG # Any of the images will be fine + extends: + - .ci-run-policy + variables: + GIT_STRATEGY: none # no need to pull the whole tree for submitting the job + script: + - 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 + - '[[ "$result" == "pass" ]]' + artifacts: + when: always + paths: + - results/ + +panfrost-t760-test:armhf: + extends: .lava-test + needs: ["lava-build:armhf"] + dependencies: + - lava-build:armhf + tags: + - lava-rk3288-veyron-jaq + +panfrost-t860-test:arm64: + extends: .lava-test + needs: ["lava-build:arm64"] + dependencies: + - lava-build:arm64 + tags: + - lava-rk3399-gru-kevin + |