|
| 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: focal |
| 20 | + |
| 21 | +addons: |
| 22 | + apt: |
| 23 | + packages: |
| 24 | + - cmake |
| 25 | + - srecord |
| 26 | + |
| 27 | +cache: |
| 28 | + pip: true |
| 29 | + ccache: true |
| 30 | + directories: |
| 31 | + # Cache arm-none-eabi compiler |
| 32 | + - ${HOME}/.cache/deps |
| 33 | + # It looks like ccache for arm-none-eabi is not yet supported by Travis. |
| 34 | + # Therefore manually adding ccache directory to cache |
| 35 | + - ${HOME}/.ccache |
| 36 | + |
| 37 | +matrix: |
| 38 | + include: |
| 39 | + |
| 40 | + # ARM_MUSCA_S1 |
| 41 | + |
| 42 | + - &compile-tests |
| 43 | + stage: "Compile" |
| 44 | + name: "Compile Regression and Compliance tests - ARM_MUSCA_S1" |
| 45 | + env: TARGET_NAME=ARM_MUSCA_S1 CACHE_NAME=ARM_MUSCA_S1 |
| 46 | + language: python |
| 47 | + python: 3.8 |
| 48 | + install: |
| 49 | + # Install arm-none-eabi-gcc |
| 50 | + - pushd /home/travis/build && mkdir arm-gcc && cd arm-gcc |
| 51 | + - curl -L0 "https://developer.arm.com/-/media/Files/downloads/gnu-rm/9-2019q4/gcc-arm-none-eabi-9-2019-q4-major-x86_64-linux.tar.bz2?revision=108bd959-44bd-4619-9c19-26187abf5225&la=en&hash=E788CE92E5DFD64B2A8C246BBA91A249CB8E2D2D" --output gcc-arm-none-eabi-9-2019-q4-major.tar.bz2 |
| 52 | + - tar xf gcc-arm-none-eabi-9-2019-q4-major.tar.bz2 |
| 53 | + - export PATH="$PATH:${PWD}/gcc-arm-none-eabi-9-2019-q4-major/bin" |
| 54 | + - popd |
| 55 | + # Setup ccache |
| 56 | + - ccache -o compiler_check=content |
| 57 | + - ccache -M 1G |
| 58 | + - pushd /usr/lib/ccache |
| 59 | + - sudo ln -s ../../bin/ccache arm-none-eabi-gcc |
| 60 | + - sudo ln -s ../../bin/ccache arm-none-eabi-g++ |
| 61 | + - export PATH="/usr/lib/ccache:$PATH" |
| 62 | + - popd |
| 63 | + - arm-none-eabi-gcc --version |
| 64 | + # Fetch mbed-os: We use manual clone, with depth=1 and --single-branch to save time. |
| 65 | + - git clone --depth=1 --single-branch https://github.com/ARMmbed/mbed-os.git |
| 66 | + # Install Mbed CLI and dependencies |
| 67 | + - pip install --upgrade mbed-cli |
| 68 | + - pip install -r mbed-os/requirements.txt |
| 69 | + script: |
| 70 | + # Build TF-M and all tests |
| 71 | + - python3 test_psa_target.py -t GNUARM -m ${TARGET_NAME} --build |
| 72 | + - ccache -s |
| 73 | + |
| 74 | + # ARM_MUSCA_B1 |
| 75 | + |
| 76 | + - <<: *compile-tests |
| 77 | + name: "Compile Regression and Compliance tests - ARM_MUSCA_B1" |
| 78 | + env: TARGET_NAME=ARM_MUSCA_B1 CACHE_NAME=ARM_MUSCA_B1 |
0 commit comments