Skip to content

Commit e864ecf

Browse files
LDong-Armevedon
authored andcommitted
Add Travis CI build job
The script test_psa_target.py is used to automate the compilation of all TF-M Regression Test and PSA Compliance Test suites, for the supported targets, ARM_MUSCA_S1 and ARM_MUSCA_B1.
1 parent 7b5bb15 commit e864ecf

File tree

1 file changed

+77
-0
lines changed

1 file changed

+77
-0
lines changed

.travis.yml

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
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+
- arm-none-eabi-gcc --version
55+
- popd
56+
# Setup ccache
57+
- ccache -o compiler_check=content
58+
- ccache -M 1G
59+
- mkdir bin # The TF-M build system requires the compiler commands to be in */bin/*
60+
- sudo ln -s $(which ccache) bin/arm-none-eabi-gcc
61+
- sudo ln -s $(which ccache) bin/arm-none-eabi-g++
62+
- export PATH="$(pwd)/bin:$PATH"
63+
# Fetch mbed-os: We use manual clone, with depth=1 and --single-branch to save time.
64+
- git clone --depth=1 --single-branch https://github.com/ARMmbed/mbed-os.git
65+
# Install Mbed CLI and dependencies
66+
- pip install --upgrade mbed-cli
67+
- pip install -r mbed-os/requirements.txt
68+
script:
69+
# Build TF-M and all tests
70+
- python3 test_psa_target.py -t GNUARM -m ${TARGET_NAME} --build
71+
- ccache -s
72+
73+
# ARM_MUSCA_B1
74+
75+
- <<: *compile-tests
76+
name: "Compile Regression and Compliance tests - ARM_MUSCA_B1"
77+
env: TARGET_NAME=ARM_MUSCA_B1 CACHE_NAME=ARM_MUSCA_B1

0 commit comments

Comments
 (0)