Skip to contentSkip to conversation

Add travis-ci config file

PATCH Superseded Alexander Graf 2 participants 5 messages Feb 19, 2019 – Feb 22, 2019

v3 of 5 Superseded Latest is v5 →

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 Add travis-ci config file

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 :).

---

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
.travis.yml new file +117 -0
new file mode 100644
index 000000000..9a6f58ff6
@@ -0,0 +1,117 @@
+# SPDX-License-Identifier: GPL-3.0+
+# Originally Copyright Roger Meier <[email protected]>
+# Adapted for GRUB by Alexander Graf <[email protected]>
+
+# 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
+
+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
+
+before_script:
+  # Install necessary toolchains based on $CROSS_TARGETS variable
+  - mkdir /tmp/cross
+  # These give us 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 -t 3 -O - https://mirrors.kernel.org/pub/tools/crosstool/files/bin/x86_64/8.1.0/x86_64-gcc-8.1.0-nolibc-$i.tar.xz | tar xJ );
+    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;
+      JOBS=`getconf _NPROCESSORS_ONLN 2> /dev/null || echo 1`;
+      [ "$JOBS" == 1 ] || JOBS=$(($JOBS + 1));
+      ( cd obj-$target && ../configure --target=$arch --with-platform=$plat --prefix=/tmp/grub && make -j$JOBS && make -j$JOBS 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-coreboot i386-efi i386-ieee1275 i386-multiboot i386-pc i386-qemu i386-xen i386-xen_pvh"
+    - 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-arc mipsel-arc mipsel-qemu_mips mips-qemu_mips"
+        - CROSS_TARGETS=mips64-linux"
+    - name: "arm"
+      env:
+        - GRUB_TARGETS="arm-coreboot arm-efi arm-uboot"
+        - 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"
Signature · 1 line
2.12.3
#1 lore raw
Quoted 66 lines · Alexander Graf

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 :).

---

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
.travis.yml new file +19 -0
new file mode 100644
index 000000000..9a6f58ff6
@@ -0,0 +1,117 @@
+# SPDX-License-Identifier: GPL-3.0+
+# Originally Copyright Roger Meier <[email protected]>
+# Adapted for GRUB by Alexander Graf <[email protected]>
+
+# 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

.travis.yml line 29

Quoted 10 lines
.travis.yml new file +10 -0
+    - 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.

.travis.yml line 34

Quoted 4 lines
.travis.yml new file +4 -0
+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.

Daniel

#2 lore raw
Quoted 77 lines

Am 20.02.2019 um 21:46 schrieb Daniel Kiper <[email protected]>:

Quoted 73 lines · Alexander Graf

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 :).

---

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

.travis.yml new file +25 -0
new file mode 100644
index 000000000..9a6f58ff6
@@ -0,0 +1,117 @@
+# SPDX-License-Identifier: GPL-3.0+
+# Originally Copyright Roger Meier <[email protected]>
+# Adapted for GRUB by Alexander Graf <[email protected]>
+
+# 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
Quoted 8 lines

.travis.yml line 29

Quoted 4 lines
.travis.yml new file +4 -0
+    - 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 most. Also, I don't see anything obviously superfluous.

Quoted 9 lines

.travis.yml line 34

Quoted 5 lines
.travis.yml new file +4 -0
+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.

Alex

#3 lore raw
Quoted 83 lines · Alexander Graf
Quoted 74 lines

Am 20.02.2019 um 21:46 schrieb Daniel Kiper <[email protected]>:

Quoted 73 lines · Alexander Graf

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 :).

---

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

.travis.yml new file +25 -0
new file mode 100644
index 000000000..9a6f58ff6
@@ -0,0 +1,117 @@
+# SPDX-License-Identifier: GPL-3.0+
+# Originally Copyright Roger Meier <[email protected]>
+# Adapted for GRUB by Alexander Graf <[email protected]>
+
+# 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
Quoted 8 lines

.travis.yml line 29

Quoted 4 lines
.travis.yml new file +4 -0
+    - 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.

Quoted 1 line

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...

Quoted 4 lines

most. Also, I don't see anything obviously superfluous.

Quoted 2 lines
Quoted 2 lines
.travis.yml new file +2 -0
+    - cppcheck
+    - bc

Both are not needed.

Quoted 1 line
Quoted 1 line

.travis.yml line 16

Quoted 1 line
.travis.yml new file +1 -0
+    - build-essential

Only needed if you plan to build Debian packages.
So, not needed.

Quoted 2 lines
Quoted 2 lines

.travis.yml line 18

Quoted 2 lines
.travis.yml new file +2 -0
+    - libsdl1.2-dev
+    - python

OK.

Quoted 3 lines
Quoted 3 lines

.travis.yml line 21

Quoted 3 lines
.travis.yml new file +3 -0
+    - python-virtualenv
+    - swig
+    - libpython-dev

All that stuff is not needed.

Quoted 1 line
Quoted 1 line

.travis.yml line 22

Quoted 1 line
.travis.yml new file +1 -0
+    - wget

Is not it provided with default distro?

Quoted 1 line
Quoted 1 line

.travis.yml line 23

Quoted 1 line
.travis.yml new file +1 -0
+    - device-tree-compiler

Not needed.

Quoted 1 line
Quoted 1 line

.travis.yml line 24

Quoted 1 line
.travis.yml new file +1 -0
+    - lzop

OK.

Quoted 2 lines
Quoted 2 lines

.travis.yml line 26

Quoted 2 lines
.travis.yml new file +2 -0
+    - liblz4-tool
+    - libisl15

Not needed.

Quoted 2 lines
Quoted 2 lines

.travis.yml line 28

Quoted 2 lines
.travis.yml new file +2 -0
+    - qemu-system
+    - ovmf

OK.

Quoted 1 line
Quoted 1 line

.travis.yml line 29

Quoted 1 line
.travis.yml new file +1 -0
+    - 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... :-)))

Quoted 10 lines
Quoted 8 lines

.travis.yml line 34

Quoted 4 lines
.travis.yml new file +4 -0
+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.

Quoted 4 lines

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.

Daniel

#4 lore raw
Quoted 111 lines · Daniel Kiper
Quoted 83 lines · Alexander Graf
Quoted 74 lines

Am 20.02.2019 um 21:46 schrieb Daniel Kiper <[email protected]>:

Quoted 73 lines · Alexander Graf

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 :).

---

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

.travis.yml new file +25 -0
new file mode 100644
index 000000000..9a6f58ff6
@@ -0,0 +1,117 @@
+# SPDX-License-Identifier: GPL-3.0+
+# Originally Copyright Roger Meier <[email protected]>
+# Adapted for GRUB by Alexander Graf <[email protected]>
+
+# 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
Quoted 8 lines

.travis.yml line 29

Quoted 4 lines
.travis.yml new file +4 -0
+    - 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.

Quoted 1 line

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...

Quoted 4 lines

most. Also, I don't see anything obviously superfluous.

Quoted 2 lines
Quoted 2 lines
.travis.yml new file +2 -0
+    - cppcheck
+    - bc

Both are not needed.

Quoted 1 line
Quoted 1 line

.travis.yml line 16

Quoted 1 line
.travis.yml new file +1 -0
+    - build-essential

Only needed if you plan to build Debian packages.
So, not needed.

Quoted 2 lines
Quoted 2 lines

.travis.yml line 18

Quoted 2 lines
.travis.yml new file +2 -0
+    - libsdl1.2-dev
+    - python

OK.

Quoted 3 lines
Quoted 3 lines

.travis.yml line 21

Quoted 3 lines
.travis.yml new file +3 -0
+    - python-virtualenv
+    - swig
+    - libpython-dev
Quoted 5 lines

All that stuff is not needed.

Quoted 1 line
Quoted 1 line

.travis.yml line 22

Quoted 1 line
.travis.yml new file +1 -0
+    - wget

Is not it provided with default distro?

It is indeed.

Quoted 42 lines
Quoted 2 lines
Quoted 2 lines

.travis.yml line 23

Quoted 2 lines
.travis.yml new file +1 -0
+    - device-tree-compiler

Not needed.

Quoted 1 line
Quoted 1 line

.travis.yml line 24

Quoted 1 line
.travis.yml new file +1 -0
+    - lzop

OK.

Quoted 2 lines
Quoted 2 lines

.travis.yml line 26

Quoted 2 lines
.travis.yml new file +2 -0
+    - liblz4-tool
+    - libisl15

Not needed.

Quoted 2 lines
Quoted 2 lines

.travis.yml line 28

Quoted 2 lines
.travis.yml new file +2 -0
+    - qemu-system
+    - ovmf

OK.

Quoted 1 line
Quoted 1 line

.travis.yml line 29

Quoted 1 line
.travis.yml new file +1 -0
+    - 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... :-)))

Quoted 10 lines
Quoted 8 lines

.travis.yml line 34

Quoted 4 lines
.travis.yml new file +4 -0
+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.

Quoted 4 lines

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.

Quoted 4 lines

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