From patchwork Wed Nov 25 04:27:41 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefano Stabellini X-Patchwork-Id: 11930363 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-24.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2D8B4C63777 for ; Wed, 25 Nov 2020 04:28:27 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B898A20789 for ; Wed, 25 Nov 2020 04:28:26 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="Zdoi+xos" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B898A20789 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.37166.69439 (Exim 4.92) (envelope-from ) id 1khmPf-0001b1-T5; Wed, 25 Nov 2020 04:28:15 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 37166.69439; Wed, 25 Nov 2020 04:28:15 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1khmPf-0001ar-PA; Wed, 25 Nov 2020 04:28:15 +0000 Received: by outflank-mailman (input) for mailman id 37166; Wed, 25 Nov 2020 04:28:14 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1khmPe-0000sM-0b for xen-devel@lists.xenproject.org; Wed, 25 Nov 2020 04:28:14 +0000 Received: from mail.kernel.org (unknown [198.145.29.99]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 9cbb3747-beb1-43fc-882f-745bfb556278; Wed, 25 Nov 2020 04:27:51 +0000 (UTC) Received: from sstabellini-ThinkPad-T480s.hsd1.ca.comcast.net (c-24-130-65-46.hsd1.ca.comcast.net [24.130.65.46]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 89EB621D1A; Wed, 25 Nov 2020 04:27:50 +0000 (UTC) Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1khmPe-0000sM-0b for xen-devel@lists.xenproject.org; Wed, 25 Nov 2020 04:28:14 +0000 X-Inumbo-ID: 9cbb3747-beb1-43fc-882f-745bfb556278 Received: from mail.kernel.org (unknown [198.145.29.99]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 9cbb3747-beb1-43fc-882f-745bfb556278; Wed, 25 Nov 2020 04:27:51 +0000 (UTC) Received: from sstabellini-ThinkPad-T480s.hsd1.ca.comcast.net (c-24-130-65-46.hsd1.ca.comcast.net [24.130.65.46]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 89EB621D1A; Wed, 25 Nov 2020 04:27:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1606278470; bh=QJUK/kTkebPG1QQfKh+8CPie3i+NnzX9DzdIZukokQQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Zdoi+xosVFK49d9uPE/T101CrMyOcvfwEy1p1imwULd4fLpROFxSNjG7/5UEsNz5S qtqLk2FrNBsp/WP/nRTV/HWYvEBw/La1Q13Pb9BOHuHmZsekCfiAwCUfacQwG8dnGG njqbBPbrBhb58qgKWR0qeSMAr8QEHeGE+V0wTdko= From: Stefano Stabellini To: andrew.cooper3@citrix.com, cardoe@cardoe.com, wl@xen.org Cc: sstabellini@kernel.org, xen-devel@lists.xenproject.org, Stefano Stabellini Subject: [PATCH v3 08/12] automation: add tests artifacts Date: Tue, 24 Nov 2020 20:27:41 -0800 Message-Id: <20201125042745.31986-8-sstabellini@kernel.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: References: Some tests (soon to come) will require pre-built binaries to run, such as the Linux kernel binary. We don't want to rebuild the Linux kernel for each gitlab-ci run: these builds should not be added to the current list of build jobs. Instead, create additional containers that today are built and uploaded manually, but could be re-built automatically. The containers build the required binarires during the "docker build" step and store them inside the container itself. gitlab-ci will be able to fetch these pre-built binaries during the regular test runs, saving cycles. Add two tests artifacts containers: - one to build the Linux kernel ARM64 - one to create an Alpine Linux ARM64 rootfs for Dom0 Signed-off-by: Stefano Stabellini --- automation/tests-artifacts/Makefile | 19 ++++++ .../alpine/3.12-arm64v8.dockerfile | 67 +++++++++++++++++++ .../kernel/5.9.9-arm64v8.dockerfile | 34 ++++++++++ 3 files changed, 120 insertions(+) create mode 100644 automation/tests-artifacts/Makefile create mode 100644 automation/tests-artifacts/alpine/3.12-arm64v8.dockerfile create mode 100644 automation/tests-artifacts/kernel/5.9.9-arm64v8.dockerfile diff --git a/automation/tests-artifacts/Makefile b/automation/tests-artifacts/Makefile new file mode 100644 index 0000000000..8ca71b78ad --- /dev/null +++ b/automation/tests-artifacts/Makefile @@ -0,0 +1,19 @@ + +# the base of where these containers will appear +REGISTRY := registry.gitlab.com/xen-project/xen/tests-artifacts +CONTAINERS = $(subst .dockerfile,,$(wildcard */*.dockerfile)) + +help: + @echo "Containers to build and export tests artifacts." + @echo "To build one run 'make ARTIFACT/VERSION'. Available containers:" + @$(foreach file,$(sort $(CONTAINERS)),echo ${file};) + @echo "To push container builds, set the env var PUSH" + +%: %.dockerfile ## Builds containers + docker build -t $(REGISTRY)/$(@D):$(@F) -f $< $(> /etc/securetty && \ + echo "hvc0" >> /etc/securetty && \ + echo "ttyS0::respawn:/sbin/getty -L ttyS0 115200 vt100" >> /etc/inittab && \ + echo "hvc0::respawn:/sbin/getty -L hvc0 115200 vt100" >> /etc/inittab && \ + passwd -d "root" root && \ + \ + # Create rootfs + cd / && \ + tar cvzf /initrd.tar.gz bin dev etc home init lib mnt opt root sbin usr var diff --git a/automation/tests-artifacts/kernel/5.9.9-arm64v8.dockerfile b/automation/tests-artifacts/kernel/5.9.9-arm64v8.dockerfile new file mode 100644 index 0000000000..053d65a345 --- /dev/null +++ b/automation/tests-artifacts/kernel/5.9.9-arm64v8.dockerfile @@ -0,0 +1,34 @@ +FROM arm64v8/debian:unstable +LABEL maintainer.name="The Xen Project" \ + maintainer.email="xen-devel@lists.xenproject.org" + +ENV DEBIAN_FRONTEND=noninteractive +ENV LINUX_VERSION=5.9.9 +ENV USER root + +RUN mkdir /build +WORKDIR /build + +# build depends +RUN apt-get update && \ + apt-get --quiet --yes install \ + build-essential \ + libssl-dev \ + bc \ + curl \ + flex \ + bison \ + && \ + \ + # Build the kernel + curl -fsSLO https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-"$LINUX_VERSION".tar.xz && \ + tar xvJf linux-"$LINUX_VERSION".tar.xz && \ + cd linux-"$LINUX_VERSION" && \ + make defconfig && \ + make -j$(nproc) Image.gz && \ + cp arch/arm64/boot/Image / && \ + cd /build && \ + rm -rf linux-"$LINUX_VERSION"* && \ + apt-get autoremove -y && \ + apt-get clean && \ + rm -rf /var/lib/apt/lists* /tmp/* /var/tmp/*