Skip to content

Commit 5dc7d83

Browse files
committed
Add ccache support
1 parent eefe095 commit 5dc7d83

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

.travis.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,16 @@ language: sh
1818
os: linux
1919
dist: focal
2020

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+
2131
matrix:
2232
include:
2333

@@ -37,6 +47,14 @@ matrix:
3747
- export PATH="$PATH:${PWD}/gcc-arm-none-eabi-9-2020-q2-update/bin"
3848
- popd
3949
- arm-none-eabi-gcc --version
50+
# Setup ccache
51+
- ccache -o compiler_check=content
52+
- ccache -M 1G
53+
- pushd /usr/lib/ccache
54+
- sudo ln -s $(which ccache) arm-none-eabi-gcc
55+
- sudo ln -s $(which ccache) arm-none-eabi-g++
56+
- export PATH="/usr/lib/ccache:$PATH"
57+
- popd
4058
# Fetch mbed-os: We use manual clone, with depth=1 and --single-branch to save time.
4159
- git clone --depth=1 --single-branch https://github.com/ARMmbed/mbed-os.git;
4260
# Install Mbed CLI and dependencies
@@ -45,6 +63,7 @@ matrix:
4563
script:
4664
- echo mbed compile -t GCC_ARM -m ${TARGET_NAME} --profile ${PROFILE}
4765
- mbed compile -t GCC_ARM -m ${TARGET_NAME} --profile ${PROFILE}
66+
- ccache -s
4867

4968
- <<: *mbed-psa-compile-test
5069
name: "Compile PSA example - debug (ARM_MUSCA_S1)"

0 commit comments

Comments
 (0)