grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v3] Add travis-ci config file


From: Alexander Graf
Subject: Re: [PATCH v3] Add travis-ci config file
Date: Fri, 22 Feb 2019 09:02:03 +0100
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:60.0) Gecko/20100101 Thunderbird/60.5.1


On 21.02.19 16:16, Daniel Kiper wrote:
> On Thu, Feb 21, 2019 at 12:38:09AM +0100, Alexander Graf wrote:
>>> Am 20.02.2019 um 21:46 schrieb Daniel Kiper <address@hidden>:
>>>> On Tue, Feb 19, 2019 at 04:34:08PM +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 :).
>>>>
>>>> Signed-off-by: Alexander Graf <address@hidden>
>>>>
>>>> ---
>>>>
>>>> v1 -> v2:
>>>>
>>>>  - Fix comment about toolchain variable
>>>>
>>>> v2 -> v3:
>>>>
>>>>  - s/grub/GRUB/
>>>>  - remove unneeded packages
>>>>  - comment fixes
>>>>  - determine number of jobs dynamically
>>>>  - sort targets alphabetically
>>>> ---
>>>> .travis.yml | 117 
>>>> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>>>> 1 file changed, 117 insertions(+)
>>>> create mode 100644 .travis.yml
>>>>
>>>> diff --git a/.travis.yml b/.travis.yml
>>>> new file mode 100644
>>>> index 000000000..9a6f58ff6
>>>> --- /dev/null
>>>> +++ b/.travis.yml
>>>> @@ -0,0 +1,117 @@
>>>> +# SPDX-License-Identifier: GPL-3.0+
>>>> +# Originally Copyright Roger Meier <address@hidden>
>>>> +# Adapted for GRUB by Alexander Graf <address@hidden>
>>>> +
>>>> +# build GRUB on Travis CI - https://travis-ci.org/
>>>> +
>>>> +dist: xenial
>>>> +
>>>> +language: c
>>>> +
>>>> +addons:
>>>> +  apt:
>>>> +    packages:
>>>> +    - cppcheck
>>>> +    - bc
>>>> +    - build-essential
>>>> +    - libsdl1.2-dev
>>>> +    - python
>>>> +    - python-virtualenv
>>>> +    - swig
>>>> +    - libpython-dev
>>>> +    - wget
>>>> +    - device-tree-compiler
>>>> +    - lzop
>>>> +    - liblz4-tool
>>>> +    - libisl15
>>>> +    - qemu-system
>>>> +    - ovmf
>>>> +    - unifont
>>>
>>> Still have an itching to ask you to trim it down... Just build one
>>> target to reduce your wait time to minimum.  If everything works
>>> then re-enable all of them.
>>
>> Why? Installing the packages takes a few seconds of ghe build time at
> 
> It is confusing at least. INSTALL file does not require all of them. And
> a few seconds multiplied by thousands times gives you a few thousands of
> seconds lost from your/our lives...
> 
>> most. Also, I don't see anything obviously superfluous.
> 
>>>> +    - cppcheck
>>>> +    - bc
> 
> Both are not needed.
> 
>>>> +    - build-essential
> 
> Only needed if you plan to build Debian packages.
> So, not needed.
> 
>>>> +    - libsdl1.2-dev
>>>> +    - python
> 
> OK.
> 
>>>> +    - python-virtualenv
>>>> +    - swig
>>>> +    - libpython-dev
> 
> All that stuff is not needed.
> 
>>>> +    - wget
> 
> Is not it provided with default distro?

It is indeed.

> 
>>>> +    - device-tree-compiler
> 
> Not needed.
> 
>>>> +    - lzop
> 
> OK.
> 
>>>> +    - liblz4-tool
>>>> +    - libisl15
> 
> Not needed.
> 
>>>> +    - qemu-system
>>>> +    - ovmf
> 
> OK.
> 
>>>> +    - unifont
> 
> In real you need ttf-unifont but I can live with unifont too.
> 
> And of course I would sort the list of packages alphabetically...
> 
> Yeah, I am boring, I know... :-)))
> 
>>>> +env:
>>>> +  global:
>>>> +    # Include all cross toolchain paths, so we can just call them later 
>>>> down
>>>> +    - 
>>>> 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
>>>
>>> Should not you put /usr/bin:/bin at the end of the PATH? Or even
>>> /tmp/qemu-install/bin:/tmp/grub/bin:/usr/bin:/bin? Otherwise you
>>> may use during build not these tools which you expect.
>>
> 
>> The cross tools only install prefixed binaries (aarch64-linux-gcc) -
>> and even if something unprefixed did sneak in, we really only ever
>> want to use the prefixed ones :). So the end of PATH is definitely
>> correct.
> 
> Prefixed versions can also be installed in the system. And you do not
> have full control on the system. So, I would move all stuff mentioned
> above to the end of the PATH. However, I am not going to insist much
> here.

That's not quite true - we *do* have full control of the system. Travis
takes exactly the "travis xenial" docker image and then runs scripts
that install exatly the packages we list.

So I don't think we need to be scared of cross compilers in the path.


Alex



reply via email to

[Prev in Thread] Current Thread [Next in Thread]