Test build of vcxproj files in CI as a separate CodeBuild job

Build the Visual Studio project file and build CBMC using that project file via
msbuild.
This commit is contained in:
Michael Tautschnig 2019-05-31 11:12:03 +00:00
parent 6bc3a7fa47
commit 31f65c32f5
1 changed files with 39 additions and 0 deletions

39
buildspec-msbuild.yml Normal file
View File

@ -0,0 +1,39 @@
version: 0.2
env:
variables:
# CodeBuild console doesn't display color codes correctly
TESTPL_COLOR_OUTPUT: 0
phases:
install:
commands:
- choco install cyg-get -y --no-progress
- cyg-get bash patch bison flex make wget perl jq
- nuget install clcache -OutputDirectory "c:\tools" -ExcludeVersion -Version 4.1.0
build:
commands:
- |
$env:Path = "C:\tools\cygwin\bin;$env:Path"
bash -c "make -C src minisat2-download DOWNLOADER=wget"
- |
$env:Path = "C:\tools\cygwin\bin;c:\tools\clcache\clcache-4.1.0;$env:Path"
$env:CLCACHE_DIR = "C:\clcache"
$env:CLCACHE_BASEDIR = (Get-Item -Path ".\").FullName
cmd /c 'bash -c "cd scripts ; ./generate_vcxproj"'
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 generated_files"'
$env:Path = "C:\Program Files (x86)\MSBuild\14.0\Bin;$env:Path"
msbuild /p:CLToolExe=clcache.exe /m:4 cbmc.vcxproj
- |
# display cache stats
$env:Path = "C:\tools\cygwin\bin;c:\tools\clcache\clcache-4.1.0;$env:Path"
$env:CLCACHE_DIR = "C:\clcache"
$env:CLCACHE_BASEDIR = (Get-Item -Path ".\").FullName
cmd /c 'clcache -s'
cache:
paths:
- 'c:\clcache\**\*'