rtl_ameba_gcc_sample/.travis.yml
2016-06-23 15:43:13 +09:00

61 lines
1.5 KiB
YAML

language: c
matrix:
fast_finish: true
include:
- os: linux
sudo: false
env: GCC_VER=4.8
- os: linux
sudo: false
env: GCC_VER=4.9
cache:
directories:
- $HOME/.ccache
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- build-essential
- ccache
- cmake
- gcc-4.9
- libc6-i836
- python-empy
before_install:
- if [ "${TRAVIS_OS_NAME}" = "linux" ]; then
pushd .
&& cd ~ && mkdir gcc && cd gcc
&& if [ "$GCC_VER" = "4.8" ]; then GCC_URL="https://launchpadlibrarian.net/186124160/gcc-arm-none-eabi-4_8-2014q3-20140805-linux.tar.bz2" ; fi
&& if [ "$GCC_VER" = "4.9" ]; then GCC_URL="https://launchpad.net/gcc-arm-embedded/4.9/4.9-2014-q4-major/+download/gcc-arm-none-eabi-4_9-2014q4-20141203-linux.tar.bz2" ; fi
&& wget -O gcc.tar.bz2 ${GCC_URL}
&& tar -jxf gcc.tar.bz2 --strip 1
&& exportline="export PATH=$HOME/gcc/bin:\$PATH"
&& if grep -Fxq "$exportline" ~/.profile; then echo nothing to do ; else echo $exportline >> ~/.profile; fi
&& . ~/.profile
&& popd
;
fi
before_script:
# setup ccache
- mkdir -p ~/bin
- ln -s /usr/bin/ccache ~/bin/arm-none-eabi-g++
- ln -s /usr/bin/ccache ~/bin/arm-none-eabi-gcc
- ln -s /usr/bin/ccache ~/bin/arm-none-eabi-size
- ln -s /usr/bin/ccache ~/bin/arm-none-eabi-objcopy
- export PATH=~/bin:$PATH
script:
- ccache -z
- arm-none-eabi-gcc --version
- ccache -s
- make
- ccache -s