Joakim Bech | 20b4276 | 2017-04-07 12:39:16 +0200 | [diff] [blame] | 1 | # Travis configuration file for downloading and building OP-TEE according to the |
| 2 | # instructions in build.git |
| 3 | language: bash |
| 4 | |
| 5 | notifications: |
| 6 | email: |
| 7 | recipients: |
Joakim Bech | d458abf | 2018-03-13 17:53:14 +0100 | [diff] [blame] | 8 | - op-tee@linaro.org |
Joakim Bech | 20b4276 | 2017-04-07 12:39:16 +0200 | [diff] [blame] | 9 | on_success: change |
| 10 | on_failure: always |
| 11 | |
| 12 | dist: trusty |
| 13 | sudo: required |
Joakim Bech | 20b4276 | 2017-04-07 12:39:16 +0200 | [diff] [blame] | 14 | |
| 15 | cache: |
| 16 | directories: |
| 17 | - $HOME/.ccache |
| 18 | |
| 19 | git: |
| 20 | depth: 10 |
| 21 | |
| 22 | after_script: |
| 23 | - ccache -s |
| 24 | |
| 25 | before_install: |
| 26 | - ccache -s |
| 27 | - sudo dpkg --add-architecture i386 |
| 28 | - sudo apt-get update -qq |
| 29 | # Package list taken from README.md |
Joakim Bech | edb47d1 | 2018-03-13 17:54:16 +0100 | [diff] [blame] | 30 | - sudo apt-get install -qq -y android-tools-adb android-tools-fastboot autoconf automake bc bison build-essential cscope curl device-tree-compiler flex ftp-upload gdisk iasl libattr1-dev libc6:i386 libcap-dev libfdt-dev libftdi-dev libglib2.0-dev libhidapi-dev libncurses5-dev libpixman-1-dev libssl-dev libstdc++6:i386 libtool libz1:i386 make mtools netcat python-crypto python-serial unzip uuid-dev xdg-utils xterm xz-utils zlib1g-dev |
Joakim Bech | 20b4276 | 2017-04-07 12:39:16 +0200 | [diff] [blame] | 31 | |
| 32 | install: true |
| 33 | |
| 34 | env: |
| 35 | - $REPO_PROJ=default |
| 36 | - $REPO_PROJ=fvp |
| 37 | - $REPO_PROJ=hikey |
Victor Chong | 0b4da69 | 2017-08-09 16:10:32 +0100 | [diff] [blame] | 38 | - $REPO_PROJ=hikey960 |
Joakim Bech | 20b4276 | 2017-04-07 12:39:16 +0200 | [diff] [blame] | 39 | - $REPO_PROJ=juno |
Joakim Bech | 20b4276 | 2017-04-07 12:39:16 +0200 | [diff] [blame] | 40 | - $REPO_PROJ=qemu_v8 |
| 41 | - $REPO_PROJ=rpi3 |
Joakim Bech | 20b4276 | 2017-04-07 12:39:16 +0200 | [diff] [blame] | 42 | |
| 43 | before_script: |
Joakim Bech | 82605e5 | 2018-03-14 13:11:26 +0100 | [diff] [blame] | 44 | - export CCACHE_BASEDIR=$HOME/$REPO_PROJ |
| 45 | - export CCACHE_NOHASHDIR=1 |
Joakim Bech | 5d2df84 | 2017-07-25 19:43:35 +0200 | [diff] [blame] | 46 | - mkdir -p $HOME/bin |
Joakim Bech | 20b4276 | 2017-04-07 12:39:16 +0200 | [diff] [blame] | 47 | - cd $HOME/bin && wget https://storage.googleapis.com/git-repo-downloads/repo && chmod +x repo |
| 48 | - export PATH=$HOME/bin:$PATH |
| 49 | - mkdir -p $HOME/$REPO_PROJ |
| 50 | |
| 51 | script: |
| 52 | # Special case for FVP, since we check for the Foundation_Platformpkg folder |
| 53 | # in the makefile. |
| 54 | - if [ $REPO_PROJ == "fvp" ]; then mkdir -p $HOME/$REPO_PROJ/Foundation_Platformpkg; fi |
| 55 | # Use the manifest from the branch itself we're pushing to. |
Joakim Bech | a4e36e9 | 2017-05-31 14:24:51 +0200 | [diff] [blame] | 56 | - | |
| 57 | if [ "$TRAVIS_EVENT_TYPE" == "pull_request" ]; then |
| 58 | slug=$TRAVIS_PULL_REQUEST_SLUG |
| 59 | branch=$TRAVIS_PULL_REQUEST_BRANCH |
| 60 | else |
| 61 | slug=$TRAVIS_REPO_SLUG |
| 62 | branch=$TRAVIS_BRANCH |
| 63 | fi |
Joakim Bech | 0095d17 | 2018-03-13 17:52:34 +0100 | [diff] [blame] | 64 | echo "Getting ${REPO_PROJ}.xml from https://github.com/$slug using branch $branch" |
Jerome Forissier | aa98412 | 2018-04-17 10:22:54 +0200 | [diff] [blame] | 65 | cd $HOME/$REPO_PROJ && repo init -u https://github.com/$slug -b $branch -m ${REPO_PROJ}.xml </dev/null && repo sync -j10 --no-clone-bundle --no-tags |
Joakim Bech | 20b4276 | 2017-04-07 12:39:16 +0200 | [diff] [blame] | 66 | # Fetch a local copy of dtc+libfdt to avoid issues with a possibly outdated libfdt-dev |
| 67 | - if [ $REPO_PROJ == "qemu_v8" ]; then cd $HOME/$REPO_PROJ/qemu && git submodule update --init dtc; fi |
| 68 | # Dump the content of the manifest (for debug purpose) |
Joakim Bech | 0095d17 | 2018-03-13 17:52:34 +0100 | [diff] [blame] | 69 | - cat $HOME/$REPO_PROJ/.repo/manifests/${REPO_PROJ}.xml |
Joakim Bech | 20b4276 | 2017-04-07 12:39:16 +0200 | [diff] [blame] | 70 | - cd $HOME/$REPO_PROJ/build && make -f toolchain.mk toolchains -j3 && make all -j`nproc` |