blob: d9605345baa773179c4c4a7ab40f3b4c6848fb3c [file] [log] [blame]
Joakim Bech20b42762017-04-07 12:39:16 +02001# Travis configuration file for downloading and building OP-TEE according to the
2# instructions in build.git
3language: bash
4
5notifications:
6 email:
7 recipients:
Joakim Bechd458abf2018-03-13 17:53:14 +01008 - op-tee@linaro.org
Joakim Bech20b42762017-04-07 12:39:16 +02009 on_success: change
10 on_failure: always
11
12dist: trusty
13sudo: required
Joakim Bech20b42762017-04-07 12:39:16 +020014
15cache:
16 directories:
17 - $HOME/.ccache
18
19git:
20 depth: 10
21
22after_script:
23 - ccache -s
24
25before_install:
26 - ccache -s
27 - sudo dpkg --add-architecture i386
28 - sudo apt-get update -qq
29 # Package list taken from README.md
Joakim Bechedb47d12018-03-13 17:54:16 +010030 - 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 Bech20b42762017-04-07 12:39:16 +020031
32install: true
33
34env:
35 - $REPO_PROJ=default
36 - $REPO_PROJ=fvp
37 - $REPO_PROJ=hikey
Victor Chong0b4da692017-08-09 16:10:32 +010038 - $REPO_PROJ=hikey960
Joakim Bech20b42762017-04-07 12:39:16 +020039 - $REPO_PROJ=juno
Joakim Bech20b42762017-04-07 12:39:16 +020040 - $REPO_PROJ=qemu_v8
41 - $REPO_PROJ=rpi3
Joakim Bech20b42762017-04-07 12:39:16 +020042
43before_script:
Joakim Bech82605e52018-03-14 13:11:26 +010044 - export CCACHE_BASEDIR=$HOME/$REPO_PROJ
45 - export CCACHE_NOHASHDIR=1
Joakim Bech5d2df842017-07-25 19:43:35 +020046 - mkdir -p $HOME/bin
Joakim Bech20b42762017-04-07 12:39:16 +020047 - 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
51script:
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 Becha4e36e92017-05-31 14:24:51 +020056 - |
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 Bech0095d172018-03-13 17:52:34 +010064 echo "Getting ${REPO_PROJ}.xml from https://github.com/$slug using branch $branch"
Jerome Forissieraa984122018-04-17 10:22:54 +020065 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 Bech20b42762017-04-07 12:39:16 +020066 # 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 Bech0095d172018-03-13 17:52:34 +010069 - cat $HOME/$REPO_PROJ/.repo/manifests/${REPO_PROJ}.xml
Joakim Bech20b42762017-04-07 12:39:16 +020070 - cd $HOME/$REPO_PROJ/build && make -f toolchain.mk toolchains -j3 && make all -j`nproc`