Skip to contentSkip to conversation

travis: use ccache

PATCH In review [email protected] 3 participants 3 messages Mar 20, 2019 – Apr 9, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 travis: use ccache

From: Roman Stratiienko <[email protected]>

This speeds-up travis build

Measurement results (build with ipipe-core-4.14.85-arm-6)
- Without ccache: 26 min 7 sec
- With ccache (1st run): 31 min 21 sec
- With ccache (every next run): 4 min 23 sec

---
 .travis.yml | 8 ++++++++
 1 file changed, 8 insertions(+)
.travis.yml +8 -0
index c5a9026aa..e40cec51d 100644
@@ -1,5 +1,6 @@
 language: c
 dist: xenial
+cache: ccache
 
 addons:
   apt:
@@ -15,6 +16,8 @@ addons:
 env:
   global:
     - KDIR=/tmp/kernel
+    - USE_CCACHE=1
+    - CCACHE_MAXSIZE=400M
 
 install:
   - if [[ "${KERNEL_VERSION}" == *-rc* ]]; then
@@ -40,6 +43,10 @@ before_script:
           export CONFIGURE_OPTS="--enable-dlopen-libs --enable-lazy-setsched"
           ;;
     esac
+  - mkdir ~/ccache
+  - ln -s /usr/bin/ccache ~/ccache/aarch64-linux-gnu-gcc
+  - ln -s /usr/bin/ccache ~/ccache/arm-linux-gnueabihf-gcc
+  - export PATH=~/ccache:$PATH
   - pushd ${KDIR}
   - make -j $(nproc) ${KERNEL_DEFCONFIG}
   - ./scripts/config -e IPIPE
@@ -88,6 +95,7 @@ script:
   - scripts/bootstrap
   - ./configure --enable-smp ${CONFIGURE_OPTS}
   - make -j $(nproc)
+  - ccache -s
 
 matrix:
   include:
Signature · 1 line
2.17.1
#1 lore raw
Quoted 47 lines · roman.stratiienko--- via Xenomai

From: Roman Stratiienko <[email protected]>

This speeds-up travis build

Measurement results (build with ipipe-core-4.14.85-arm-6)
- Without ccache: 26 min 7 sec
- With ccache (1st run): 31 min 21 sec
- With ccache (every next run): 4 min 23 sec

---
  .travis.yml | 8 ++++++++
  1 file changed, 8 insertions(+)
.travis.yml +7 -0
index c5a9026aa..e40cec51d 100644
@@ -1,5 +1,6 @@
  language: c
  dist: xenial
+cache: ccache
 
  addons:
    apt:
@@ -15,6 +16,8 @@ addons:
  env:
    global:
      - KDIR=/tmp/kernel
+    - USE_CCACHE=1
+    - CCACHE_MAXSIZE=400M
 
  install:
    - if [[ "${KERNEL_VERSION}" == *-rc* ]]; then
@@ -40,6 +43,10 @@ before_script:
            export CONFIGURE_OPTS="--enable-dlopen-libs --enable-lazy-setsched"
            ;;
      esac
+  - mkdir ~/ccache
+  - ln -s /usr/bin/ccache ~/ccache/aarch64-linux-gnu-gcc
+  - ln -s /usr/bin/ccache ~/ccache/arm-linux-gnueabihf-gcc
+  - export PATH=~/ccache:$PATH
    - pushd ${KDIR}
    - make -j $(nproc) ${KERNEL_DEFCONFIG}
    - ./scripts/config -e IPIPE

.travis.yml script: · line 101

Quoted 7 lines
.travis.yml +1 -0
@@ -88,6 +95,7 @@ script:
    - scripts/bootstrap
    - ./configure --enable-smp ${CONFIGURE_OPTS}
    - make -j $(nproc)
+  - ccache -s
 
  matrix:
    include:

Nice! Applied to next.

Jan

#2 lore raw
Quoted 52 lines · Jan Kiszka via Xenomai
Quoted 51 lines · roman.stratiienko--- via Xenomai

From: Roman Stratiienko <[email protected]>

This speeds-up travis build

Measurement results (build with ipipe-core-4.14.85-arm-6)
  - Without ccache: 26 min 7 sec
  - With ccache (1st run): 31 min 21 sec
  - With ccache (every next run): 4 min 23 sec

---
  .travis.yml | 8 ++++++++

  1 file changed, 8 insertions(+)
.travis.yml +0 -0
index c5a9026aa..e40cec51d 100644
@@ -1,5 +1,6 @@

  language: c
  dist: xenial
+cache: ccache

  addons:
    apt:

.travis.yml +0 -0
@@ -15,6 +16,8 @@ addons:

  env:
    global:
      - KDIR=/tmp/kernel
+    - USE_CCACHE=1
+    - CCACHE_MAXSIZE=400M

  install:
    - if [[ "${KERNEL_VERSION}" == *-rc* ]]; then

.travis.yml +0 -0
@@ -40,6 +43,10 @@ before_script:

            export CONFIGURE_OPTS="--enable-dlopen-libs --enable-lazy-setsched" ;;
      esac
+  - mkdir ~/ccache
+  - ln -s /usr/bin/ccache ~/ccache/aarch64-linux-gnu-gcc
+  - ln -s /usr/bin/ccache ~/ccache/arm-linux-gnueabihf-gcc
+  - export PATH=~/ccache:$PATH
    - pushd ${KDIR}
    - make -j $(nproc) ${KERNEL_DEFCONFIG}
    - ./scripts/config -e IPIPE

.travis.yml +0 -0
@@ -88,6 +95,7 @@ script:

    - scripts/bootstrap
    - ./configure --enable-smp ${CONFIGURE_OPTS}
    - make -j $(nproc)
+  - ccache -s

Quoted 6 lines
Quoted 3 lines

  matrix:
    include:

Nice! Applied to next.

Looks like it's not working as desired on arm64:

https://travis-ci.com/xenomai-ci/xenomai/builds/107612473

Any idea?

Jan

Signature · 2 lines
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux