blob: b3bc270e784bdcd2799cef9c6af15afaa54c614f [file] [log] [blame]
Joakim Beche707cbb2017-01-27 10:00:05 +01001# 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:
8 - op-tee@linaro.org
Joakim Beche707cbb2017-01-27 10:00:05 +01009 on_success: change
10 on_failure: always
11
12dist: trusty
13sudo: required
14group: beta
15
16cache:
17 directories:
Joakim Beche707cbb2017-01-27 10:00:05 +010018 - $HOME/.ccache
19
20git:
Joakim Bech4b8b5532017-04-05 19:11:38 +020021 depth: 10
Joakim Beche707cbb2017-01-27 10:00:05 +010022
23after_script:
24 - ccache -s
25
26before_install:
27 - ccache -s
28 - sudo dpkg --add-architecture i386
29 - sudo apt-get update -qq
Joakim Bech4b8b5532017-04-05 19:11:38 +020030 # Package list taken from README.md
Joakim Bechaff02a62017-04-05 15:38:48 +020031 - 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 python-wand unzip uuid-dev xdg-utils xterm xz-utils zlib1g-dev
Joakim Beche707cbb2017-01-27 10:00:05 +010032
33install: true
34
35env:
36 - $REPO_PROJ=default
37 - $REPO_PROJ=fvp
38 - $REPO_PROJ=hikey
Victor Chongb1bcc752017-08-09 16:09:33 +010039 - $REPO_PROJ=hikey960
Joakim Beche707cbb2017-01-27 10:00:05 +010040 - $REPO_PROJ=juno
Joakim Beche707cbb2017-01-27 10:00:05 +010041 - $REPO_PROJ=qemu_v8
42 - $REPO_PROJ=rpi3
Joakim Beche707cbb2017-01-27 10:00:05 +010043
44before_script:
Joakim Bech831b5802017-07-09 10:08:23 +020045 - mkdir -p $HOME/bin
Joakim Beche707cbb2017-01-27 10:00:05 +010046 - cd $HOME/bin && wget https://storage.googleapis.com/git-repo-downloads/repo && chmod +x repo
47 - export PATH=$HOME/bin:$PATH
Joakim Bech4b8b5532017-04-05 19:11:38 +020048 - mkdir -p $HOME/$REPO_PROJ
Joakim Beche707cbb2017-01-27 10:00:05 +010049
50script:
Joakim Beche707cbb2017-01-27 10:00:05 +010051 # Special case for FVP, since we check for the Foundation_Platformpkg folder
Joakim Bech4b8b5532017-04-05 19:11:38 +020052 # in the makefile.
Joakim Beche707cbb2017-01-27 10:00:05 +010053 - if [ $REPO_PROJ == "fvp" ]; then mkdir -p $HOME/$REPO_PROJ/Foundation_Platformpkg; fi
54 - cd $HOME/$REPO_PROJ && repo init -u https://github.com/OP-TEE/manifest.git -m $REPO_PROJ.xml </dev/null && repo sync -j2 --no-clone-bundle --no-tags --quiet
Jerome Forissiere28c7012017-02-24 10:05:52 +010055 # Fetch a local copy of dtc+libfdt to avoid issues with a possibly outdated libfdt-dev
56 - if [ $REPO_PROJ == "qemu_v8" ]; then cd $HOME/$REPO_PROJ/qemu && git submodule update --init dtc; fi
Joakim Bech4b8b5532017-04-05 19:11:38 +020057 # Here we are using Travis environment variables to select the correct branch
58 # based on either a pull request or a normal push.
Joakim Bech17bd83b2017-06-01 12:18:45 +020059 - |
60 if [ "$TRAVIS_EVENT_TYPE" == "pull_request" ]; then
61 slug=$TRAVIS_PULL_REQUEST_SLUG
62 branch=$TRAVIS_PULL_REQUEST_BRANCH
63 else
64 slug=$TRAVIS_REPO_SLUG
65 branch=$TRAVIS_BRANCH
66 fi
Joakim Bech69902942018-02-26 08:47:29 +010067 - cd $HOME/$REPO_PROJ/build && git remote add github_remote https://github.com/$slug && git remote update
68 - cd $HOME/$REPO_PROJ/build && git checkout github_remote/$branch
Joakim Bech4b8b5532017-04-05 19:11:38 +020069 - cd $HOME/$REPO_PROJ/build && make -f toolchain.mk toolchains -j3 && make all -j`nproc`