Skip to content

Commit 6680d9c

Browse files
committed
Add ccache instructions to azure pipeline
Setting a high limit on cache size Per-run stats only Removed ccache from Mac, negative performance impact
1 parent 89ff9a4 commit 6680d9c

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

.ci/azure-pipelines/build-ubuntu.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,21 @@ jobs:
1313
variables:
1414
BUILD_DIR: '$(Agent.BuildDirectory)/build'
1515
CMAKE_CXX_FLAGS: '-Wall -Wextra -Wabi -O2'
16+
CCACHE_DIR: $(Pipeline.Workspace)/ccache
17+
CCACHE_MAXSIZE: 15G
1618
steps:
19+
- task: CacheBeta@0
20+
inputs:
21+
key: ccache | gcc | $(Agent.OS)
22+
path: $(CCACHE_DIR)
23+
displayName: Fetch cached files for ccache
24+
- script: ccache -z
25+
displayName: 'Zero ccache statistics'
1726
- script: |
1827
mkdir $BUILD_DIR && cd $BUILD_DIR
1928
cmake $(Build.SourcesDirectory) \
2029
-DCMAKE_CXX_FLAGS="$CMAKE_CXX_FLAGS" \
30+
-DPCL_ENABLE_CCACHE=ON \
2131
-DPCL_ONLY_CORE_POINT_TYPES=ON \
2232
-DBUILD_simulation=ON \
2333
-DBUILD_surface_on_nurbs=ON \
@@ -41,6 +51,8 @@ jobs:
4151
cmake --build . -- test_filters test_registration test_registration_api
4252
cmake --build . -- -j2
4353
displayName: 'Build Library'
54+
- script: ccache -s
55+
displayName: 'Display ccache statistics'
4456
- script: |
4557
cd $BUILD_DIR/test
4658
ctest -V -T Test

0 commit comments

Comments
 (0)