Skip to content

Commit 7de40e4

Browse files
committed
ci: Enable gitlab-ci cache
Signed-off-by: Devaraj Ranganna <[email protected]>
1 parent 730888e commit 7de40e4

File tree

2 files changed

+35
-0
lines changed

2 files changed

+35
-0
lines changed

.gitlab-ci.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,22 @@ workflow:
5252
before_script:
5353
- python -m pip install pyelftools
5454
script:
55+
- |
56+
apt-get update -y && \
57+
apt-get install ccache -y && \
58+
apt-get clean && \
59+
rm -rf /var/lib/apt/lists
60+
- ccache -o cache_dir=/cache/$CI_JOB_NAME_SLUG/.ccache
61+
- ccache -p
62+
- ln -s /usr/bin/ccache /usr/lib/ccache/arm-none-eabi-gcc
63+
- ln -s /usr/bin/ccache /usr/lib/ccache/arm-none-eabi-g++
64+
- ln -s /usr/bin/ccache /usr/lib/ccache/arm-none-eabi-cpp
65+
- ln -s /usr/bin/ccache /usr/lib/ccache/arm-none-eabi-c++
66+
- ln -s /usr/bin/ccache /usr/lib/ccache/arm-none-eabi-ar
67+
- ln -s /usr/bin/ccache /usr/lib/ccache/armclang
68+
- ln -s /usr/bin/ccache /usr/lib/ccache/armar
69+
- export PATH=/usr/lib/ccache:$PATH
70+
- echo $PATH
5571
- export APP_UNDERSCORED=$(echo ${APP} | tr '-' '_')
5672
- ./tools/ci/generate_credentials.sh -f -p applications/${APP_UNDERSCORED}/configs/aws_configs
5773
- git config --global user.email "[email protected]"
@@ -79,6 +95,7 @@ workflow:
7995
build/CMakeCache.txt \
8096
applications/${APP_UNDERSCORED}/configs/aws_configs
8197
fi
98+
- ccache -s
8299

83100
# Build Corstone320 applications which later are tested.
84101
build-applications-corstone320:
@@ -359,6 +376,22 @@ integration-tests:
359376
rules:
360377
- if: ( $SCHEDULED_JOB_TO_RUN == "integration-tests" )
361378
script:
379+
- |
380+
apt-get update -y && \
381+
apt-get install ccache -y && \
382+
apt-get clean && \
383+
rm -rf /var/lib/apt/lists
384+
- ccache -o cache_dir=/cache/$CI_JOB_NAME_SLUG/.ccache
385+
- ccache -p
386+
- ln -s /usr/bin/ccache /usr/lib/ccache/arm-none-eabi-gcc
387+
- ln -s /usr/bin/ccache /usr/lib/ccache/arm-none-eabi-g++
388+
- ln -s /usr/bin/ccache /usr/lib/ccache/arm-none-eabi-cpp
389+
- ln -s /usr/bin/ccache /usr/lib/ccache/arm-none-eabi-c++
390+
- ln -s /usr/bin/ccache /usr/lib/ccache/arm-none-eabi-ar
391+
- ln -s /usr/bin/ccache /usr/lib/ccache/armclang
392+
- ln -s /usr/bin/ccache /usr/lib/ccache/armar
393+
- export PATH=/usr/lib/ccache:$PATH
394+
- echo $PATH
362395
- export APP_UNDERSCORED=$(echo ${APP} | tr '-' '_')
363396
- ./tools/ci/generate_credentials.sh -f -p applications/${APP_UNDERSCORED}/configs/aws_configs
364397
- git config --global user.email "[email protected]"
@@ -390,6 +423,7 @@ integration-tests:
390423
--merged-elf-name "${APP}_merged.elf" \
391424
--signed-update-bin-name "${APP}-update_signed.bin" \
392425
--timeout-seconds 14400
426+
- ccache -s
393427
parallel:
394428
matrix:
395429
-
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ci: Enable gitlab-ci cache

0 commit comments

Comments
 (0)