From 63652fcb225136d4677b1b05ffd177fa48caa04d Mon Sep 17 00:00:00 2001 From: Daniel Kroening Date: Wed, 1 Aug 2018 08:32:58 +0100 Subject: [PATCH] add clcache to Windows build This sets up clcache for the AWS Codebuild Windows builds. clcache is a clone of ccache for Visual Studio CL. --- buildspec-windows.yml | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/buildspec-windows.yml b/buildspec-windows.yml index e342e85967c..adc9209d100 100644 --- a/buildspec-windows.yml +++ b/buildspec-windows.yml @@ -5,6 +5,7 @@ phases: commands: - choco install cyg-get -y --no-progress - cyg-get bash patch bison flex make wget perl + - nuget install clcache -OutputDirectory "c:\tools" -ExcludeVersion -Version 4.1.0 build: commands: @@ -13,14 +14,22 @@ phases: C:\tools\cygwin\bin\bash -c "make -C src minisat2-download DOWNLOADER=wget" - | - $env:Path = "C:\tools\cygwin\bin;$env:Path" - cmd /c 'call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x64 && bash -c "make -j4 -C src BUILD_ENV=MSVC" ' - cmd /c 'call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x64 && bash -c "make -j4 -C unit all BUILD_ENV=MSVC" ' + $env:Path = "C:\tools\cygwin\bin;c:\tools\clcache\clcache-4.1.0;$env:Path" + $env:CLCACHE_DIR = "C:\clcache" + cmd /c 'call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x64 && bash -c "make CXX=clcache.exe -j4 -C src BUILD_ENV=MSVC" ' + cmd /c 'call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x64 && bash -c "make CXX=clcache.exe -j4 -C unit all BUILD_ENV=MSVC" ' - | - $env:Path = "C:\tools\cygwin\bin;$env:Path" - cmd /c 'call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x64 && bash -c "make -j4 -C jbmc/src setup-submodules" && bash -c "make -j4 -C jbmc/src BUILD_ENV=MSVC" ' - cmd /c 'call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x64 && bash -c "make -j4 -C jbmc/unit all BUILD_ENV=MSVC" ' + $env:Path = "C:\tools\cygwin\bin;c:\tools\clcache\clcache-4.1.0;$env:Path" + $env:CLCACHE_DIR = "C:\clcache" + cmd /c 'call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x64 && bash -c "make -j4 -C jbmc/src setup-submodules" && bash -c "make CXX=clcache.exe -j4 -C jbmc/src BUILD_ENV=MSVC" ' + cmd /c 'call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x64 && bash -c "make CXX=clcache.exe -j4 -C jbmc/unit all BUILD_ENV=MSVC" ' + + - | + # display cache stats + $env:Path = "C:\tools\cygwin\bin;c:\tools\clcache\clcache-4.1.0;$env:Path" + $env:CLCACHE_DIR = "C:\clcache" + cmd /c 'clcache -s' post_build: commands: @@ -72,3 +81,4 @@ artifacts: cache: paths: + - 'c:\clcache'