@@ -18,6 +18,16 @@ language: sh
18
18
os : linux
19
19
dist : focal
20
20
21
+ cache :
22
+ pip : true
23
+ ccache : true
24
+ directories :
25
+ # Cache arm-none-eabi compiler
26
+ - ${HOME}/.cache/deps
27
+ # It looks like ccache for arm-none-eabi is not yet supported by Travis.
28
+ # Therefore manually adding ccache directory to cache
29
+ - ${HOME}/.ccache
30
+
21
31
matrix :
22
32
include :
23
33
@@ -26,7 +36,7 @@ matrix:
26
36
- &mbed-psa-compile-test
27
37
stage : " Compile"
28
38
name : " Compile PSA example - release (ARM_MUSCA_S1)"
29
- env : TARGET_NAME=ARM_MUSCA_S1 PROFILE=release
39
+ env : TARGET_NAME=ARM_MUSCA_S1 PROFILE=release CACHE_NAME=release-ARM_MUSCA_S1
30
40
language : python
31
41
python : 3.8
32
42
install :
@@ -37,6 +47,13 @@ matrix:
37
47
- export PATH="$PATH:${PWD}/gcc-arm-none-eabi-9-2020-q2-update/bin"
38
48
- popd
39
49
- arm-none-eabi-gcc --version
50
+ # Setup ccache
51
+ - ccache -o compiler_check=content
52
+ - pushd /usr/lib/ccache
53
+ - sudo ln -s $(which ccache) arm-none-eabi-gcc
54
+ - sudo ln -s $(which ccache) arm-none-eabi-g++
55
+ - export PATH="/usr/lib/ccache:$PATH"
56
+ - popd
40
57
# Fetch mbed-os: We use manual clone, with depth=1 and --single-branch to save time.
41
58
- git clone --depth=1 --single-branch https://github.com/ARMmbed/mbed-os.git;
42
59
# Install Mbed CLI and dependencies
@@ -45,107 +62,108 @@ matrix:
45
62
script :
46
63
- echo mbed compile -t GCC_ARM -m ${TARGET_NAME} --profile ${PROFILE}
47
64
- mbed compile -t GCC_ARM -m ${TARGET_NAME} --profile ${PROFILE}
65
+ - ccache -s
48
66
49
67
- << : *mbed-psa-compile-test
50
68
name : " Compile PSA example - debug (ARM_MUSCA_S1)"
51
- env : TARGET_NAME=ARM_MUSCA_S1 PROFILE=debug
69
+ env : TARGET_NAME=ARM_MUSCA_S1 PROFILE=debug CACHE_NAME=debug-ARM_MUSCA_S1
52
70
53
71
# ARM_MUSCA_B1
54
72
55
73
- << : *mbed-psa-compile-test
56
74
name : " Compile PSA example - release (ARM_MUSCA_B1)"
57
- env : TARGET_NAME=ARM_MUSCA_B1 PROFILE=release
75
+ env : TARGET_NAME=ARM_MUSCA_B1 PROFILE=release CACHE_NAME=release-ARM_MUSCA_B1
58
76
59
77
- << : *mbed-psa-compile-test
60
78
name : " Compile PSA example - debug (ARM_MUSCA_B1)"
61
- env : TARGET_NAME=ARM_MUSCA_B1 PROFILE=debug
79
+ env : TARGET_NAME=ARM_MUSCA_B1 PROFILE=debug CACHE_NAME=debug-ARM_MUSCA_B1
62
80
63
81
# K64F
64
82
65
83
- << : *mbed-psa-compile-test
66
84
name : " Compile PSA example - release (K64F)"
67
- env : TARGET_NAME=K64F PROFILE=release
85
+ env : TARGET_NAME=K64F PROFILE=release CACHE_NAME=release-K64F
68
86
69
87
- << : *mbed-psa-compile-test
70
88
name : " Compile PSA example - debug (K64F)"
71
- env : TARGET_NAME=K64F PROFILE=debug
89
+ env : TARGET_NAME=K64F PROFILE=debug CACHE_NAME=debug-K64F
72
90
73
91
# K66F
74
92
75
93
- << : *mbed-psa-compile-test
76
94
name : " Compile PSA example - release (K66F)"
77
- env : TARGET_NAME=K66F PROFILE=release
95
+ env : TARGET_NAME=K66F PROFILE=release CACHE_NAME=release-K66F
78
96
79
97
- << : *mbed-psa-compile-test
80
98
name : " Compile PSA example - debug (K66F)"
81
- env : TARGET_NAME=K66F PROFILE=debug
99
+ env : TARGET_NAME=K66F PROFILE=debug CACHE_NAME=debug-K66F
82
100
83
101
# NUCLEO_F429ZI
84
102
85
103
- << : *mbed-psa-compile-test
86
104
name : " Compile PSA example - release (NUCLEO_F429ZI)"
87
- env : TARGET_NAME=NUCLEO_F429ZI PROFILE=release
105
+ env : TARGET_NAME=NUCLEO_F429ZI PROFILE=release CACHE_NAME=release-NUCLEO_F429ZI
88
106
89
107
- << : *mbed-psa-compile-test
90
108
name : " Compile PSA example - debug (NUCLEO_F429ZI)"
91
- env : TARGET_NAME=NUCLEO_F429ZI PROFILE=debug
109
+ env : TARGET_NAME=NUCLEO_F429ZI PROFILE=debug CACHE_NAME=debug-NUCLEO_F429ZI
92
110
93
111
# FVP_MPS2_M0
94
112
95
113
- << : *mbed-psa-compile-test
96
114
name : " Compile PSA example - release (FVP_MPS2_M0)"
97
- env : TARGET_NAME=FVP_MPS2_M0 PROFILE=release
115
+ env : TARGET_NAME=FVP_MPS2_M0 PROFILE=release CACHE_NAME=release-FVP_MPS2_M0
98
116
99
117
- << : *mbed-psa-compile-test
100
118
name : " Compile PSA example - debug (FVP_MPS2_M0)"
101
- env : TARGET_NAME=FVP_MPS2_M0 PROFILE=debug
119
+ env : TARGET_NAME=FVP_MPS2_M0 PROFILE=debug CACHE_NAME=debug-FVP_MPS2_M0
102
120
103
121
# FVP_MPS2_M0P
104
122
105
123
- << : *mbed-psa-compile-test
106
124
name : " Compile PSA example - release (FVP_MPS2_M0P)"
107
- env : TARGET_NAME=FVP_MPS2_M0P PROFILE=release
125
+ env : TARGET_NAME=FVP_MPS2_M0P PROFILE=release CACHE_NAME=release-FVP_MPS2_M0P
108
126
109
127
- << : *mbed-psa-compile-test
110
128
name : " Compile PSA example - debug (FVP_MPS2_M0P)"
111
- env : TARGET_NAME=FVP_MPS2_M0P PROFILE=debug
129
+ env : TARGET_NAME=FVP_MPS2_M0P PROFILE=debug CACHE_NAME=debug-FVP_MPS2_M0P
112
130
113
131
# FVP_MPS2_M3
114
132
115
133
- << : *mbed-psa-compile-test
116
134
name : " Compile PSA example - release (FVP_MPS2_M3)"
117
- env : TARGET_NAME=FVP_MPS2_M3 PROFILE=release
135
+ env : TARGET_NAME=FVP_MPS2_M3 PROFILE=release CACHE_NAME=release-FVP_MPS2_M3
118
136
119
137
- << : *mbed-psa-compile-test
120
138
name : " Compile PSA example - debug (FVP_MPS2_M3)"
121
- env : TARGET_NAME=FVP_MPS2_M3 PROFILE=debug
139
+ env : TARGET_NAME=FVP_MPS2_M3 PROFILE=debug CACHE_NAME=debug-FVP_MPS2_M3
122
140
123
141
# FVP_MPS2_M4
124
142
125
143
- << : *mbed-psa-compile-test
126
144
name : " Compile PSA example - release (FVP_MPS2_M4)"
127
- env : TARGET_NAME=FVP_MPS2_M4 PROFILE=release
145
+ env : TARGET_NAME=FVP_MPS2_M4 PROFILE=release CACHE_NAME=release-FVP_MPS2_M4
128
146
129
147
- << : *mbed-psa-compile-test
130
148
name : " Compile PSA example - debug (FVP_MPS2_M4)"
131
- env : TARGET_NAME=FVP_MPS2_M4 PROFILE=debug
149
+ env : TARGET_NAME=FVP_MPS2_M4 PROFILE=debug CACHE_NAME=debug-FVP_MPS2_M4
132
150
133
151
# FVP_MPS2_M7
134
152
135
153
- << : *mbed-psa-compile-test
136
154
name : " Compile PSA example - release (FVP_MPS2_M7)"
137
- env : TARGET_NAME=FVP_MPS2_M7 PROFILE=release
155
+ env : TARGET_NAME=FVP_MPS2_M7 PROFILE=release CACHE_NAME=release-FVP_MPS2_M7
138
156
139
157
- << : *mbed-psa-compile-test
140
158
name : " Compile PSA example - debug (FVP_MPS2_M7)"
141
- env : TARGET_NAME=FVP_MPS2_M7 PROFILE=debug
159
+ env : TARGET_NAME=FVP_MPS2_M7 PROFILE=debug CACHE_NAME=debug-FVP_MPS2_M7
142
160
143
161
# GD32_F450ZI
144
162
145
163
- << : *mbed-psa-compile-test
146
164
name : " Compile PSA example - release (GD32_F450ZI)"
147
- env : TARGET_NAME=GD32_F450ZI PROFILE=release
165
+ env : TARGET_NAME=GD32_F450ZI PROFILE=release CACHE_NAME=release-GD32_F450ZI
148
166
149
167
- << : *mbed-psa-compile-test
150
168
name : " Compile PSA example - debug (GD32_F450ZI)"
151
- env : TARGET_NAME=GD32_F450ZI PROFILE=debug
169
+ env : TARGET_NAME=GD32_F450ZI PROFILE=debug CACHE_NAME=debug-GD32_F450ZI
0 commit comments