From bcbb42e644a90848473251f6ee40a855f26f6d6d Mon Sep 17 00:00:00 2001 From: Scott Beamer Date: Thu, 20 Aug 2015 09:53:14 -0700 Subject: fix travis build using lessons from fix_travis branch --- .travis.yml | 70 ++++++++++++++++++++++++++++++++++++------------------------- 1 file changed, 41 insertions(+), 29 deletions(-) diff --git a/.travis.yml b/.travis.yml index 9adaf56..2208c0c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,36 +1,48 @@ language: cpp -compiler: - - gcc +# run on new infrastructure +sudo: false cache: apt +# required packages to install +addons: + apt: + sources: + - ubuntu-toolchain-r-test + packages: + - gcc-4.8 + - g++-4.8 + - gperf + - autoconf + - automake + - autotools-dev + - libmpc-dev + - libmpfr-dev + - libgmp-dev + - gawk + - build-essential + - bison + - flex + - texinfo + env: global: - # required packages to install - - PKGS="gperf autoconf automake autotools-dev libmpc-dev libmpfr-dev libgmp-dev gawk build-essential bison flex texinfo" - RISCV="/home/travis/riscv_install" -git: - submodules: false # we'll do git submodule update ourselves + - PATH="$PATH:$RISCV/bin" + before_install: - # change shell to bash - - echo $0 - - sudo chsh -s /bin/bash travis - - echo $0 - - ls -la /bin/sh - - sudo rm /bin/sh - - sudo ln -s /bin/bash /bin/sh - - ls -la /bin/sh - - pwd - - mkdir ~/riscv_install - # fix urls to be https to avoid pubkey issues - - sed -i 's/git@github.com:/https:\/\/github.com\//' .gitmodules + # make install destination + - mkdir -p $RISCV + # don't forget to clone riscv-tests/env + - cd riscv-tests - git submodule update --init - # hack to deal with sub-sub module git -> https url - - cd riscv-tests && sed -i 's/git@github.com:/https:\/\/github.com\//' .gitmodules && git submodule update --init && cd .. - - cd riscv-llvm && sed -i 's/git@github.com:/https:\/\/github.com\//' .gitmodules && git submodule update --init && cd .. - # set jobs to 1 to avoid running out of memory on the travis machine - - sed -i.bak 's/JOBS=16/JOBS=1/' build.common - - sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y - - sudo apt-get update -qq - - sudo apt-get install -qq ${PKGS} - - if [ "$CXX" = "g++" ]; then sudo apt-get install -qq g++-4.8; fi - - if [ "$CXX" = "g++" ]; then export CXX="g++-4.8" CC="gcc-4.8"; fi -script: "./build.sh" + - cd .. + # actually use new gcc + - export CXX=g++-4.8 CC=gcc-4.8 + # only have 2 cores on the travis machine + - sed -i.bak 's/JOBS=16/JOBS=8/' build.common + # riscv-pk needs CC & CXX unset to use riscv-gcc + - sed -i.back '13 i\unset CC CXX' build.sh + +# extra time duing long builds +install: travis_wait + +script: ./build.sh -- cgit v1.1