Skip to content

Commit 59e6d5c

Browse files
committed
Clcache for windows
1 parent 8be7a11 commit 59e6d5c

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

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

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ jobs:
1818
BUILD_DIR: '$(Agent.WorkFolder)\build'
1919
CONFIGURATION: 'Release'
2020
VCPKG_ROOT: 'C:\vcpkg'
21+
CLCACHE_DIR: $(Pipeline.Workspace)\clcache
22+
CLCACHE_MAXSIZE: 15G
2123
steps:
2224
- script: set
2325
displayName: 'Print Environment Variables'
@@ -27,16 +29,28 @@ jobs:
2729
- script: |
2830
vcpkg.exe install eigen3 flann gtest qhull --triplet %PLATFORM%-windows && vcpkg.exe list
2931
displayName: 'Install Dependencies'
32+
- script: |
33+
curl -L https://github.com/frerich/clcache/releases/download/v4.2.0/clcache.4.2.0.nupkg --output clcache.4.2.0.nupkg
34+
choco install clcache --source=.
35+
- task: CacheBeta@0
36+
inputs:
37+
key: ccache | msvc | $(Agent.OS)
38+
path: $(CLCACHE_DIR)
39+
displayName: ccache
40+
- script: clcache -z
41+
displayName: 'Zero ccache statistics'
3042
- script: |
3143
rmdir %VCPKG_ROOT%\downloads /S /Q
3244
rmdir %VCPKG_ROOT%\packages /S /Q
3345
displayName: 'Free Up Space'
3446
- script: |
3547
mkdir %BUILD_DIR% && cd %BUILD_DIR%
36-
cmake $(Build.SourcesDirectory) -G"%GENERATOR%" -DCMAKE_TOOLCHAIN_FILE=%VCPKG_ROOT%\scripts\buildsystems\vcpkg.cmake -DVCPKG_APPLOCAL_DEPS=ON -DPCL_BUILD_WITH_BOOST_DYNAMIC_LINKING_WIN32=ON -DPCL_BUILD_WITH_FLANN_DYNAMIC_LINKING_WIN32=ON -DPCL_BUILD_WITH_QHULL_DYNAMIC_LINKING_WIN32=ON -DBUILD_global_tests=ON -DBUILD_tools=OFF -DBUILD_surface_on_nurbs=ON
48+
cmake $(Build.SourcesDirectory) -G"%GENERATOR%" -DCMAKE_TOOLCHAIN_FILE=%VCPKG_ROOT%\scripts\buildsystems\vcpkg.cmake -DVCPKG_APPLOCAL_DEPS=ON -DPCL_BUILD_WITH_BOOST_DYNAMIC_LINKING_WIN32=ON -DPCL_BUILD_WITH_FLANN_DYNAMIC_LINKING_WIN32=ON -DPCL_BUILD_WITH_QHULL_DYNAMIC_LINKING_WIN32=ON -DBUILD_global_tests=ON -DBUILD_tools=OFF -DBUILD_surface_on_nurbs=ON -DPCL_ENABLE_CCACHE=ON
3749
displayName: 'CMake Configuration'
3850
- script: cd %BUILD_DIR% && cmake --build . --config %CONFIGURATION%
3951
displayName: 'Build Library'
52+
- script: clcache -s
53+
displayName: 'Display ccache statistics'
4054
- script: cd %BUILD_DIR%/test && ctest -C %CONFIGURATION% -V -T Test
4155
displayName: 'Run Unit Tests'
4256
- task: PublishTestResults@2

0 commit comments

Comments
 (0)