|
| 1 | +# Copyright (c) 2020 Arm Limited. All rights reserved. |
| 2 | +# |
| 3 | +# SPDX-License-Identifier: Apache-2.0 |
| 4 | +# |
| 5 | +# Licensed under the Apache License, Version 2.0 (the License); you may |
| 6 | +# not use this file except in compliance with the License. |
| 7 | +# You may obtain a copy of the License at |
| 8 | +# |
| 9 | +# www.apache.org/licenses/LICENSE-2.0 |
| 10 | +# |
| 11 | +# Unless required by applicable law or agreed to in writing, software |
| 12 | +# distributed under the License is distributed on an AS IS BASIS, WITHOUT |
| 13 | +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 | +# See the License for the specific language governing permissions and |
| 15 | +# limitations under the License. |
| 16 | + |
| 17 | +language: sh |
| 18 | +os: linux |
| 19 | +dist: xenial |
| 20 | + |
| 21 | +env: |
| 22 | + global: |
| 23 | + - PROFILE=develop |
| 24 | + |
| 25 | +cache: |
| 26 | + pip: true |
| 27 | + ccache: true |
| 28 | + # It looks like ccache for arm-none-eabi is not yet supported by Travis. |
| 29 | + # Therefore manually adding ccache directory to cache |
| 30 | + directories: |
| 31 | + - ${HOME}/.ccache |
| 32 | + |
| 33 | +addons: |
| 34 | + apt: |
| 35 | + sources: |
| 36 | + - sourceline: 'deb https://apt.kitware.com/ubuntu/ xenial main' |
| 37 | + key_url: 'https://apt.kitware.com/keys/kitware-archive-latest.asc' |
| 38 | + - sourceline: 'deb https://apt.kitware.com/ubuntu/ xenial-rc main' |
| 39 | + packages: |
| 40 | + - cmake |
| 41 | + - ninja-build |
| 42 | + |
| 43 | +matrix: |
| 44 | + include: |
| 45 | + |
| 46 | + - &cmake-build-test |
| 47 | + stage: "CMake" |
| 48 | + name: "CMake devicekey example - develop (K64F)" |
| 49 | + env: NAME=cmake_test TARGET_NAME=K64F PROFILE=develop CACHE_NAME=develop-K64F |
| 50 | + language: python |
| 51 | + python: 3.8 |
| 52 | + install: |
| 53 | + # Setup ccache |
| 54 | + - ccache -o compiler_check=content |
| 55 | + - ccache -M 1G |
| 56 | + - pushd /usr/lib/ccache |
| 57 | + - sudo ln -s ../../bin/ccache arm-none-eabi-gcc |
| 58 | + - sudo ln -s ../../bin/ccache arm-none-eabi-g++ |
| 59 | + - export PATH="/usr/lib/ccache:$PATH" |
| 60 | + - popd |
| 61 | + # Install arm-none-eabi-gcc |
| 62 | + - pushd /home/travis/build && mkdir arm-gcc && cd arm-gcc |
| 63 | + - curl -L0 "https://developer.arm.com/-/media/Files/downloads/gnu-rm/9-2020q2/gcc-arm-none-eabi-9-2020-q2-update-x86_64-linux.tar.bz2?revision=05382cca-1721-44e1-ae19-1e7c3dc96118&la=en&hash=D7C9D18FCA2DD9F894FD9F3C3DC9228498FA281A" --output gcc-arm-none-eabi-9-2020-q2-update.tar.bz2 |
| 64 | + - tar xf gcc-arm-none-eabi-9-2020-q2-update.tar.bz2 |
| 65 | + - export PATH="$PATH:${PWD}/gcc-arm-none-eabi-9-2020-q2-update/bin" |
| 66 | + - popd |
| 67 | + - arm-none-eabi-gcc --version |
| 68 | + # Hide Travis-preinstalled CMake |
| 69 | + # The Travis-preinstalled CMake is unfortunately not installed via apt, so we |
| 70 | + # can't replace it with an apt-supplied version very easily. Additionally, we |
| 71 | + # can't permit the Travis-preinstalled copy to survive, as the Travis default |
| 72 | + # path lists the Travis CMake install location ahead of any place where apt |
| 73 | + # would install CMake to. Instead of apt removing or upgrading to a new CMake |
| 74 | + # version, we must instead delete the Travis copy of CMake. |
| 75 | + - sudo rm -rf /usr/local/cmake* |
| 76 | + - pip install --upgrade mbed-tools |
| 77 | + - pip install prettytable==0.7.2 |
| 78 | + - pip install future==0.16.0 |
| 79 | + - pip install "Jinja2>=2.10.1,<2.11" |
| 80 | + - pip install "intelhex>=1.3,<=2.2.1" |
| 81 | + script: |
| 82 | + - mbedtools checkout |
| 83 | + - echo mbedtools build -t GCC_ARM -m ${TARGET_NAME} -b ${PROFILE} |
| 84 | + - mbedtools build -t GCC_ARM -m ${TARGET_NAME} -b ${PROFILE} |
| 85 | + - ccache -s |
| 86 | + |
| 87 | + - <<: *cmake-build-test |
| 88 | + name: "CMake devicekey example - release (K64F)" |
| 89 | + env: NAME=cmake_test TARGET_NAME=K64F PROFILE=release CACHE_NAME=release-K64F |
| 90 | + |
| 91 | + - <<: *cmake-build-test |
| 92 | + name: "CMake devicekey example - debug (K64F)" |
| 93 | + env: NAME=cmake_test TARGET_NAME=K64F PROFILE=debug CACHE_NAME=debug-K64F |
| 94 | + |
| 95 | + - <<: *cmake-build-test |
| 96 | + name: "CMake devicekey example - develop (DISCO_L475VG_IOT01A)" |
| 97 | + env: NAME=cmake_test TARGET_NAME=DISCO_L475VG_IOT01A PROFILE=develop CACHE_NAME=develop-DISCO_L475VG_IOT01A |
| 98 | + |
| 99 | + - <<: *cmake-build-test |
| 100 | + name: "CMake devicekey example - release (DISCO_L475VG_IOT01A)" |
| 101 | + env: NAME=cmake_test TARGET_NAME=DISCO_L475VG_IOT01A PROFILE=release CACHE_NAME=release-DISCO_L475VG_IOT01A |
| 102 | + |
| 103 | + - <<: *cmake-build-test |
| 104 | + name: "CMake devicekey example - debug (DISCO_L475VG_IOT01A)" |
| 105 | + env: NAME=cmake_test TARGET_NAME=DISCO_L475VG_IOT01A PROFILE=debug CACHE_NAME=debug-DISCO_L475VG_IOT01A |
| 106 | + |
0 commit comments