[Skiboot] [PATCH] Add Travis configuration

Joel Stanley joel at jms.id.au
Tue Nov 25 14:01:38 AEDT 2014


This will allow Travis CI (https://travis-ci.org) to build the firmware
and run the test suite. In the future we can also use it to run and
publish the results of scan-build and lcov.

Travis build environments are stuck back on 12.04, so we don't have a
powerpc cross compiler as part of the archive. Instead download one from
kernel.org and use that.

The 'make check' tests rely on newer -Wstack-usage flags that are not
present on the old version of gcc shipped with 12.04. Install 4.8 from
the toolchain ppa and set it to be the system default.

The tests also require valgrind, so include that in the VM environment.

Signed-off-by: Joel Stanley <joel at jms.id.au>
---
 .travis.yml | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)
 create mode 100644 .travis.yml

diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 0000000..66fc1a6
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,21 @@
+language: c
+
+before_install:
+    - sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
+    - sudo apt-get update -qq
+    - sudo apt-get install -y gcc-4.8
+    - sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 50
+
+install:
+    - sudo apt-get install -y valgrind
+    - wget https://www.kernel.org/pub/tools/crosstool/files/bin/x86_64/4.8.0/x86_64-gcc-4.8.0-nolibc_powerpc64-linux.tar.xz
+    - sudo mkdir /opt/cross
+    - sudo tar -C /opt/cross -xvf x86_64-gcc-4.8.0-nolibc_powerpc64-linux.tar.xz
+
+env:
+    global:
+        - CROSS=/opt/cross/gcc-4.8.0-nolibc/powerpc64-linux/bin/powerpc64-linux-
+        - HOSTCC=gcc-4.8
+
+script:
+    - make && make check
-- 
2.1.0



More information about the Skiboot mailing list