Message ID | 1416884498-20090-1-git-send-email-joel@jms.id.au |
---|---|
State | Accepted, archived |
Headers | show |
Joel Stanley <joel@jms.id.au> writes: > 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@jms.id.au> Thanks, merged!
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
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@jms.id.au> --- .travis.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 .travis.yml