Commit a47e4016 authored by Tomeu Vizoso's avatar Tomeu Vizoso Committed by Marge Bot
Browse files

ci: Use a single kernel+rootfs for both baremetal and LAVA jobs


Signed-off-by: Tomeu Vizoso's avatarTomeu Vizoso <tomeu.vizoso@collabora.com>
Acked-by: Emma Anholt's avatarEric Anholt <eric@anholt.net>
Part-of: <!10139>
parent 79c65217
......@@ -440,8 +440,29 @@ arm_build:
needs:
- arm_build
# Kernel & rootfs for ARM64 baremetal testing
kernel+rootfs_arm64-baremetal:
.kernel+rootfs:
extends:
- .ci-run-policy
stage: container-2
variables:
GIT_STRATEGY: fetch
KERNEL_URL: "https://gitlab.freedesktop.org/tomeu/linux/-/archive/v5.11-for-mesa-ci-adcee9973be5/linux-v5.11-for-mesa-ci-adcee9973be5.tar.bz2"
INSTALL_KERNEL_MODULES: 1
MESA_ROOTFS_TAG: &kernel-rootfs "2021-04-20-unified-kernel"
DISTRIBUTION_TAG: &distribution-tag-arm "${MESA_ROOTFS_TAG}--${MESA_IMAGE_TAG}--${MESA_TEMPLATES_COMMIT}"
script:
- .gitlab-ci/container/lava_build.sh
kernel+rootfs_amd64:
extends:
- .use-x86_build-base
- .kernel+rootfs
image: "$FDO_BASE_IMAGE"
variables:
DEBIAN_ARCH: "amd64"
DISTRIBUTION_TAG: &distribution-tag-amd64 "${MESA_ROOTFS_TAG}--${MESA_BASE_TAG}--${MESA_TEMPLATES_COMMIT}"
kernel+rootfs_arm64:
extends:
- .use-arm_build
- .kernel+rootfs
......@@ -449,17 +470,23 @@ kernel+rootfs_arm64-baremetal:
- aarch64
variables:
DEBIAN_ARCH: "arm64"
KERNEL_URL: "https://github.com/anholt/linux/archive/mesa-ci-2021-04-01-5.11.tar.gz"
MESA_ROOTFS_TAG: &arm-baremetal "2021-04-19-deqp-egl"
MINIO_SUFFIX: "baremetal"
# Kernel & rootfs for armhf baremetal testing
kernel+rootfs_armhf-baremetal:
kernel+rootfs_armhf:
extends:
- kernel+rootfs_arm64-baremetal
- kernel+rootfs_arm64
variables:
DEBIAN_ARCH: "armhf"
MESA_ROOTFS_TAG: *arm-baremetal
# Cannot use anchors defined here from included files, so use extends: instead
.use-kernel+rootfs-arm:
variables:
DISTRIBUTION_TAG: *distribution-tag-arm
MESA_ROOTFS_TAG: *kernel-rootfs
.use-kernel+rootfs-amd64:
variables:
DISTRIBUTION_TAG: *distribution-tag-amd64
MESA_ROOTFS_TAG: *kernel-rootfs
# x86 image with ARM64 & armhf kernel & rootfs for baremetal testing
arm_test:
......@@ -470,14 +497,14 @@ arm_test:
- .ci-run-policy
stage: build-misc
needs:
- kernel+rootfs_arm64-baremetal
- kernel+rootfs_armhf-baremetal
- kernel+rootfs_arm64
- kernel+rootfs_armhf
variables:
FDO_DISTRIBUTION_EXEC: 'env ARTIFACTS_PREFIX=https://${MINIO_HOST}/mesa-lava ARTIFACTS_SUFFIX=baremetal/${MESA_ROOTFS_TAG}--${MESA_ARM_BUILD_TAG}--${MESA_TEMPLATES_COMMIT} CI_PROJECT_PATH=${CI_PROJECT_PATH} FDO_CI_CONCURRENT=${FDO_CI_CONCURRENT} FDO_UPSTREAM_REPO=${FDO_UPSTREAM_REPO} bash .gitlab-ci/container/${CI_JOB_NAME}.sh'
FDO_DISTRIBUTION_EXEC: 'env ARTIFACTS_PREFIX=https://${MINIO_HOST}/mesa-lava ARTIFACTS_SUFFIX=${MESA_ROOTFS_TAG}--${MESA_ARM_BUILD_TAG}--${MESA_TEMPLATES_COMMIT} CI_PROJECT_PATH=${CI_PROJECT_PATH} FDO_CI_CONCURRENT=${FDO_CI_CONCURRENT} FDO_UPSTREAM_REPO=${FDO_UPSTREAM_REPO} bash .gitlab-ci/container/${CI_JOB_NAME}.sh'
FDO_DISTRIBUTION_TAG: "${MESA_IMAGE_TAG}--${MESA_ROOTFS_TAG}--${MESA_ARM_BUILD_TAG}--${MESA_TEMPLATES_COMMIT}"
MESA_ARM_BUILD_TAG: *arm_build
MESA_IMAGE_TAG: &arm_test "2021-04-14-librenderdoc"
MESA_ROOTFS_TAG: *arm-baremetal
MESA_IMAGE_TAG: &arm_test "2021-04-20-unified-kernel"
MESA_ROOTFS_TAG: *kernel-rootfs
.use-arm_test:
image: "$CI_REGISTRY_IMAGE/${MESA_IMAGE_PATH}:${MESA_IMAGE_TAG}--${MESA_ROOTFS_TAG}--${MESA_ARM_BUILD_TAG}--${MESA_TEMPLATES_COMMIT}"
......@@ -485,7 +512,7 @@ arm_test:
MESA_ARM_BUILD_TAG: *arm_build
MESA_IMAGE_PATH: "debian/arm_test"
MESA_IMAGE_TAG: *arm_test
MESA_ROOTFS_TAG: *arm-baremetal
MESA_ROOTFS_TAG: *kernel-rootfs
needs:
- arm_test
......
CONFIG_LOCALVERSION="ccu"
CONFIG_LOCALVERSION_AUTO=y
CONFIG_DEBUG_KERNEL=y
# abootimg with a 'dummy' rootfs fails with root=/dev/nfs
......
CONFIG_LOCALVERSION="ccu"
CONFIG_LOCALVERSION_AUTO=y
CONFIG_DEBUG_KERNEL=y
# abootimg with a 'dummy' rootfs fails with root=/dev/nfs
......
......@@ -7,7 +7,7 @@ export DEBIAN_FRONTEND=noninteractive
check_minio()
{
MINIO_PATH="${MINIO_HOST}/mesa-lava/$1/${MINIO_SUFFIX}/${DISTRIBUTION_TAG}/${DEBIAN_ARCH}"
MINIO_PATH="${MINIO_HOST}/mesa-lava/$1/${DISTRIBUTION_TAG}/${DEBIAN_ARCH}"
if wget -q --method=HEAD "https://${MINIO_PATH}/done"; then
exit
fi
......@@ -136,7 +136,7 @@ EXTRA_MESON_ARGS+=" -D prefix=/libdrm"
############### Cross-build kernel
mkdir -p kernel
wget -qO- ${KERNEL_URL} | tar -xz --strip-components=1 -C kernel
wget -qO- ${KERNEL_URL} | tar -xj --strip-components=1 -C kernel
pushd kernel
# The kernel doesn't like the gold linker (or the old lld in our debians).
......@@ -154,6 +154,7 @@ if [ -n "$INSTALL_KERNEL_MODULES" ]; then
sed -i 's/=m/=n/g' ${DEFCONFIG}
fi
export LOCALVERSION="`basename $KERNEL_URL`"
./scripts/kconfig/merge_config.sh ${DEFCONFIG} ../.gitlab-ci/container/${KERNEL_ARCH}.config
make ${KERNEL_IMAGE_NAME}
for image in ${KERNEL_IMAGE_NAME}; do
......@@ -170,7 +171,7 @@ if [ -n "$INSTALL_KERNEL_MODULES" ]; then
INSTALL_MOD_PATH=/lava-files/rootfs-${DEBIAN_ARCH}/ make modules_install
fi
if [[ ${DEBIAN_ARCH} = "arm64" ]] && [[ ${MINIO_SUFFIX} = "baremetal" ]]; then
if [[ ${DEBIAN_ARCH} = "arm64" ]]; then
make Image.lzma
mkimage \
-f auto \
......@@ -217,7 +218,7 @@ find /libdrm/ -name lib\*\.so\* | xargs cp -t /lava-files/rootfs-${DEBIAN_ARCH}/
rm -rf /libdrm
if [ ${DEBIAN_ARCH} = arm64 ] && [ ${MINIO_SUFFIX} = baremetal ]; then
if [ ${DEBIAN_ARCH} = arm64 ]; then
# Make a gzipped copy of the Image for db410c.
gzip -k /lava-files/Image
KERNEL_IMAGE_NAME+=" Image.gz"
......
CONFIG_LOCALVERSION="ccu"
CONFIG_LOCALVERSION_AUTO=y
CONFIG_DEBUG_KERNEL=y
# abootimg with a 'dummy' rootfs fails with root=/dev/nfs
......
.kernel+rootfs:
extends:
- .ci-run-policy
stage: container-2
variables:
GIT_STRATEGY: fetch
DISTRIBUTION_TAG: &distribution-tag-arm "${MESA_ROOTFS_TAG}--${MESA_IMAGE_TAG}--${MESA_TEMPLATES_COMMIT}"
script:
- .gitlab-ci/container/lava_build.sh
.kernel+rootfs-lava:
extends:
- .kernel+rootfs
variables:
KERNEL_URL: "https://gitlab.freedesktop.org/tomeu/linux/-/archive/v5.11-for-mesa-ci/linux-v5.11-for-mesa-ci.tar.gz"
INSTALL_KERNEL_MODULES: 1
MESA_ROOTFS_TAG: &lava-rootfs "2021-04-20-kernel-5.11"
MINIO_SUFFIX: "lava"
kernel+rootfs_amd64:
extends:
- .use-x86_build-base
- .kernel+rootfs-lava
image: "$FDO_BASE_IMAGE"
variables:
DEBIAN_ARCH: "amd64"
DISTRIBUTION_TAG: &distribution-tag-amd64 "${MESA_ROOTFS_TAG}--${MESA_BASE_TAG}--${MESA_TEMPLATES_COMMIT}"
kernel+rootfs_arm64:
extends:
- .use-arm_build
- .kernel+rootfs-lava
tags:
- aarch64
variables:
DEBIAN_ARCH: "arm64"
kernel+rootfs_armhf:
extends:
- kernel+rootfs_arm64
variables:
DEBIAN_ARCH: "armhf"
.lava-test:
extends:
- .ci-run-policy
# Cancel job if a newer commit is pushed to the same branch
interruptible: true
variables:
DISTRIBUTION_TAG: *distribution-tag-arm
GIT_STRATEGY: none # testing doesn't build anything from source
ENV_VARS: "DEQP_PARALLEL=6"
FIXED_ENV_VARS: "CI_PIPELINE_ID=${CI_PIPELINE_ID} CI_JOB_ID=${CI_JOB_ID} CI_PAGES_DOMAIN=${CI_PAGES_DOMAIN} CI_PROJECT_NAME=${CI_PROJECT_NAME} CI_PROJECT_PATH=${CI_PROJECT_PATH} CI_PROJECT_ROOT_NAMESPACE=${CI_PROJECT_ROOT_NAMESPACE} CI_JOB_JWT=${CI_JOB_JWT} CI_SERVER_URL=${CI_SERVER_URL} DRIVER_NAME=${DRIVER_NAME} FDO_UPSTREAM_REPO=${FDO_UPSTREAM_REPO} PIGLIT_NO_WINDOW=1 PIGLIT_REPLAY_UPLOAD_TO_MINIO=1 MINIO_HOST=${MINIO_HOST} LAVA_TEST_SCRIPT=${LAVA_TEST_SCRIPT} TEST_SUITE=${TEST_SUITE}"
DEQP_VERSION: gles2
ARTIFACTS_PREFIX: "https://${MINIO_HOST}/mesa-lava/"
MESA_ROOTFS_TAG: *lava-rootfs
ARTIFACTS_PREFIX: "https://${MINIO_HOST}/mesa-lava"
MESA_URL: "https://${MINIO_HOST}/artifacts/${CI_PROJECT_PATH}/${CI_PIPELINE_ID}/mesa-${ARCH}.tar.gz"
script:
# Try to use the kernel and rootfs built in mainline first, to save cycles
- >
if wget -q --method=HEAD "${ARTIFACTS_PREFIX}/${FDO_UPSTREAM_REPO}/lava/${DISTRIBUTION_TAG}/${ARCH}/done"; then
ARTIFACTS_URL="${ARTIFACTS_PREFIX}/${FDO_UPSTREAM_REPO}/lava/${DISTRIBUTION_TAG}/${ARCH}"
if wget -q --method=HEAD "${ARTIFACTS_PREFIX}/${FDO_UPSTREAM_REPO}/${DISTRIBUTION_TAG}/${ARCH}/done"; then
ARTIFACTS_URL="${ARTIFACTS_PREFIX}/${FDO_UPSTREAM_REPO}/${DISTRIBUTION_TAG}/${ARCH}"
else
ARTIFACTS_URL="${ARTIFACTS_PREFIX}/${CI_PROJECT_PATH}/lava/${DISTRIBUTION_TAG}/${ARCH}"
ARTIFACTS_URL="${ARTIFACTS_PREFIX}/${CI_PROJECT_PATH}/${DISTRIBUTION_TAG}/${ARCH}"
fi
- rm -rf results
- mkdir -p results
......@@ -111,6 +66,7 @@ kernel+rootfs_armhf:
extends:
- .lava-test
- .use-arm_build
- .use-kernel+rootfs-arm
needs:
- kernel+rootfs_armhf
- meson-armhf
......@@ -126,6 +82,7 @@ kernel+rootfs_armhf:
extends:
- .lava-test
- .use-arm_build
- .use-kernel+rootfs-arm
dependencies:
- meson-arm64
needs:
......@@ -135,7 +92,6 @@ kernel+rootfs_armhf:
.lava-test:amd64:
variables:
ARCH: amd64
DISTRIBUTION_TAG: *distribution-tag-amd64
KERNEL_IMAGE_NAME: bzImage
KERNEL_IMAGE_TYPE: "type:\ zimage"
BOOT_METHOD: u-boot
......@@ -145,6 +101,7 @@ kernel+rootfs_armhf:
- .use-x86_build-base # for same $MESA_BASE_TAG as in kernel+rootfs_amd64
- .use-arm_build # ARM because it must match the architecture of the runner
- .lava-test
- .use-kernel+rootfs-amd64
needs:
- kernel+rootfs_amd64
- arm_build # ARM because it must match the architecture of the runner
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment