提交 1e16d4f4 编写于 作者: D Daniel P. Berrangé

gitlab: introduce use of ccache for speeding up rebuilds

For any given job there is a high likelihood that ccache will be able to
reuse previously built object files. This will result in faster build
pipelines in later updates.
Reviewed-by: NErik Skultety <eskultet@redhat.com>
Reviewed-by: NAndrea Bolognani <abologna@redhat.com>
Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
上级 6cdfbef1
...@@ -13,6 +13,15 @@ stages: ...@@ -13,6 +13,15 @@ stages:
# Default native build jobs that are always run # Default native build jobs that are always run
.native_build_default_job_template: &native_build_default_job_definition .native_build_default_job_template: &native_build_default_job_definition
stage: native_build stage: native_build
cache:
paths:
- ccache/
key: "$CI_JOB_NAME"
before_script:
- mkdir -p ccache
- export CC="ccache gcc"
- export CCACHE_BASEDIR=${PWD}
- export CCACHE_DIR=${PWD}/ccache
script: script:
- mkdir build - mkdir build
- cd build - cd build
...@@ -31,6 +40,15 @@ stages: ...@@ -31,6 +40,15 @@ stages:
# Default cross build jobs that are always run # Default cross build jobs that are always run
.cross_build_default_job_template: &cross_build_default_job_definition .cross_build_default_job_template: &cross_build_default_job_definition
stage: cross_build stage: cross_build
cache:
paths:
- ccache/
key: "$CI_JOB_NAME"
before_script:
- mkdir -p ccache
- export CC="ccache ${ABI}-gcc"
- export CCACHE_BASEDIR=${PWD}
- export CCACHE_DIR=${PWD}/ccache
script: script:
- mkdir build - mkdir build
- cd build - cd build
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册