Received: from list by lists.gnu.org with archive (Exim 4.71) id 1gtcoY-0005cb-3w for mharc-grub-devel@gnu.org; Tue, 12 Feb 2019 13:29:50 -0500 Received: from eggs.gnu.org ([209.51.188.92]:40495) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gtcoT-0005YW-Lc for grub-devel@gnu.org; Tue, 12 Feb 2019 13:29:48 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gtcoR-0001kA-Sx for grub-devel@gnu.org; Tue, 12 Feb 2019 13:29:45 -0500 Received: from aserp2130.oracle.com ([141.146.126.79]:38274) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gtcoR-0001MJ-AQ for grub-devel@gnu.org; Tue, 12 Feb 2019 13:29:43 -0500 Received: from pps.filterd (aserp2130.oracle.com [127.0.0.1]) by aserp2130.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x1CIIa55044851; Tue, 12 Feb 2019 18:29:25 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : in-reply-to; s=corp-2018-07-02; bh=Y9cz7092u6zjY5WQCQHHm1X6X2zecBjP6cRrqnKmuIw=; b=zJRypRiCW/muN1vUHVyPwhtzL3Ea1s/wFs0J+GvBkKFL0Or9dPaGGmH3eJlWBY0ZwPOF rMrZhiwKDfcGnYWit9fnuzIVcva5oVdKgNik57H44p9Ew2oxak1/2u29803w+dcsQziv TJ1RDA/95QlSJhpET7CeAx6ICDSgV1QMo1jYQ+4FAiGTuYnHRGoXgxCgATtWXzcwlXss T2GOI2ikLMnuxRdbNcU9Nti1NV35F8ADYGe8/DbcjrxLCzAi5+C3OcgoN51jUayf6wMI VZPIIcw6lz4fgMViRPCIjWOjC1/MH4j3hD6pOrrNI6fI4RlQwZM6C3UjE4c6KWSx8hBV 7g== Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by aserp2130.oracle.com with ESMTP id 2qhre5dpcv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 12 Feb 2019 18:29:25 +0000 Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by userv0022.oracle.com (8.14.4/8.14.4) with ESMTP id x1CITOB6005353 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 12 Feb 2019 18:29:24 GMT Received: from abhmp0004.oracle.com (abhmp0004.oracle.com [141.146.116.10]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id x1CITNrw016466; Tue, 12 Feb 2019 18:29:23 GMT Received: from char.us.oracle.com (/10.152.32.25) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 12 Feb 2019 10:29:23 -0800 Received: by char.us.oracle.com (Postfix, from userid 1000) id 492B06A0133; Tue, 12 Feb 2019 13:29:22 -0500 (EST) Date: Tue, 12 Feb 2019 13:29:22 -0500 From: Konrad Rzeszutek Wilk To: The development of GNU GRUB Cc: Daniel Kiper , leif.lindholm@linaro.org Subject: Re: [PATCH] Add travis-ci config file Message-ID: <20190212182922.GB14349@char.us.oracle.com> References: <20190212170033.68143-1-agraf@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190212170033.68143-1-agraf@suse.de> User-Agent: Mutt/1.9.1 (2017-09-22) X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9165 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1902120129 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] X-Received-From: 141.146.126.79 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Feb 2019 18:29:48 -0000 On Tue, Feb 12, 2019 at 06:00:33PM +0100, Alexander Graf wrote: > There is a really convenient service for open source project from Travis > CI: They allow for free CI testing using their infrastructure. > > Grub has had issues with broken builds for various targets for a long time > already. The main reason is a lack of CI to just do smoke tests on whether > all targets still at least compile. > > This patch adds a travis config file which builds (almost) all currently > available targets. > > On top of that, this travis config also runs a small execution test on the > x86_64-efi target. > > All of this config file can easily be extended further on. It probably makes > sense to do something similar to the u-boot test infrastructure that > communicates with the payload properly. Going forward, we also will want to > do more qemu runtime checks for other targets. > > Currently, with this config alone, I already see about half of the available > targets as broken. So it's definitely desperately needed :). This is awesome.. However is grub on github to automatically kick of CI ? > > Signed-off-by: Alexander Graf > --- > .travis.yml | 118 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ > 1 file changed, 118 insertions(+) > create mode 100644 .travis.yml > > diff --git a/.travis.yml b/.travis.yml > new file mode 100644 > index 000000000..05608fc21 > --- /dev/null > +++ b/.travis.yml > @@ -0,0 +1,118 @@ > +# SPDX-License-Identifier: GPL-3.0+ > +# Originally Copyright Roger Meier > +# Adapted for grub by Alexander Graf > + > +# build grub on Travis CI - https://travis-ci.org/ > + > +dist: xenial > + > +language: c > + > +addons: > + apt: > + packages: > + - cppcheck > + - sloccount > + - sparse > + - bc > + - build-essential > + - libsdl1.2-dev > + - python > + - python-virtualenv > + - swig > + - libpython-dev > + - iasl > + - rpm2cpio > + - wget > + - device-tree-compiler > + - lzop > + - liblz4-tool > + - libisl15 > + - qemu-system > + - ovmf > + - unifont > + > +env: > + global: > + - PATH=/tmp/qemu-install/bin:/tmp/grub/bin:/usr/bin:/bin:/tmp/cross/gcc-8.1.0-nolibc/aarch64-linux/bin:/tmp/cross/gcc-8.1.0-nolibc/arm-linux-gnueabi/bin:/tmp/cross/gcc-8.1.0-nolibc/ia64-linux/bin:/tmp/cross/gcc-8.1.0-nolibc/mips64-linux/bin:/tmp/cross/gcc-8.1.0-nolibc/powerpc64-linux/bin:/tmp/cross/gcc-8.1.0-nolibc/riscv32-linux/bin:/tmp/cross/gcc-8.1.0-nolibc/riscv64-linux/bin:/tmp/cross/gcc-8.1.0-nolibc/sparc64-linux/bin > + > +before_script: > + # install toolchains based on TOOLCHAIN} variable > + - mkdir /tmp/cross > + # results in binaries like /tmp/cross/gcc-8.1.0-nolibc/ia64-linux/bin/ia64-linux-gcc > + - for i in $CROSS_TARGETS; do > + ( cd /tmp/cross; wget -O - https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/8.1.0/x86_64-gcc-8.1.0-nolibc-$i.tar.xz | xzcat | tar x ); > + done > + > +script: > + # Comments must be outside the command strings below, or the Travis parser > + # will get confused. > + - ./autogen.sh > + > + # Build all selected grub targets: > + - for target in $GRUB_TARGETS; do > + plat=${target#*-}; > + arch=${target%-*}; > + [ "$arch" = "arm64" ] && arch=aarch64-linux; > + [ "$arch" = "arm" ] && arch=arm-linux-gnueabi; > + [ "$arch" = "ia64" ] && arch=ia64-linux; > + [ "$arch" = "mipsel" ] && arch=mips64-linux; > + [ "$arch" = "powerpc" ] && arch=powerpc64-linux; > + [ "$arch" = "riscv32" ] && arch=riscv32-linux; > + [ "$arch" = "riscv64" ] && arch=riscv64-linux; > + [ "$arch" = "sparc64" ] && arch=sparc64-linux; > + echo "Building $target"; > + mkdir obj-$target; > + ( cd obj-$target && ../configure --target=$arch --with-platform=$plat --prefix=/tmp/grub && make -j4 && make -j4 install ) &> log || ( cat log; false ); > + done > + > + # Our test canary > + - echo -e "insmod echo\\ninsmod reboot\\necho hello world\\nreboot" > grub.cfg > + > + # Assemble images and possibly run them > + - for target in $GRUB_TARGETS; do grub-mkimage -c grub.cfg -p / -O $target -o grub-$target echo reboot normal; done > + > + # Run images we know how to run > + - if [[ "$GRUB_TARGETS" == *"x86_64-efi"* ]]; then qemu-system-x86_64 -bios /usr/share/ovmf/OVMF.fd -m 512 -no-reboot -nographic -net nic -net user,tftp=.,bootfile=grub-x86_64-efi | tee grub.log && grep "hello world" grub.log; fi > + > +matrix: > + include: > + # each env setting here is a dedicated build > + - name: "x86_64" > + env: > + - GRUB_TARGETS="x86_64-efi x86_64-xen" > + - name: "i386" > + env: > + - GRUB_TARGETS="i386-efi i386-xen i386-xen_pvh i386-pc i386-multiboot i386-coreboot i386-ieee1275 i386-qemu" > + - name: "powerpc" > + env: > + - GRUB_TARGETS="powerpc-ieee1275" > + - CROSS_TARGETS=powerpc64-linux" > + - name: "sparc64" > + env: > + - GRUB_TARGETS="sparc64-ieee1275" > + - CROSS_TARGETS=sparc64-linux" > + - name: "ia64" > + env: > + - GRUB_TARGETS="ia64-efi" > + - CROSS_TARGETS=ia64-linux" > + - name: "mips" > + env: > + - GRUB_TARGETS="mips-qemu_mips mips-arc mipsel-arc mipsel-qemu_mips" > + - CROSS_TARGETS=mips64-linux" > + - name: "arm" > + env: > + - GRUB_TARGETS="arm-uboot arm-coreboot arm-efi" > + - CROSS_TARGETS="arm-linux-gnueabi" > + - name: "arm64" > + env: > + - GRUB_TARGETS="arm64-efi" > + - CROSS_TARGETS=aarch64-linux" > + - name: "riscv32" > + env: > + - GRUB_TARGETS="riscv32-efi" > + - CROSS_TARGETS=riscv32-linux" > + - name: "riscv64" > + env: > + - GRUB_TARGETS="riscv64-efi" > + - CROSS_TARGETS=riscv64-linux" > -- > 2.12.3 > > > _______________________________________________ > Grub-devel mailing list > Grub-devel@gnu.org > https://lists.gnu.org/mailman/listinfo/grub-devel