On Windows, concurrent access to files is severely restricted compared to standard operating systems. When ctest is invoking cmake, this causes it to write simultaneously to the same files in each concurrent cmake invocation, leading to spurious test failures like error MSB3491: Could not write lines to file "...". The process cannot access the file '...' because it is being used by another process. Explicitly ask for no parallelism with "-j1", even though it is probably the default.
65 lines
1.7 KiB
YAML
65 lines
1.7 KiB
YAML
version: '{build}'
|
|
|
|
# for Appveyor CI (windows)
|
|
|
|
branches:
|
|
only:
|
|
- master
|
|
|
|
os: Windows Server 2012 R2
|
|
|
|
clone_folder: c:\projects\STEPcode
|
|
|
|
#grab zip instead of git clone
|
|
shallow_clone: true
|
|
platform: x64
|
|
configuration: Debug
|
|
|
|
# errors or couldn't be found by cmake
|
|
# - GENERATOR: "Visual Studio 9 2008"
|
|
# ARCH: 32
|
|
# - GENERATOR: "Visual Studio 10"
|
|
# ARCH: 32
|
|
|
|
#no point in these without artifact support...
|
|
# - GENERATOR: "Visual Studio 11"
|
|
#ARCH: 32
|
|
#- GENERATOR: "Visual Studio 12"
|
|
#ARCH: 32
|
|
|
|
environment:
|
|
matrix:
|
|
- GENERATOR: "Visual Studio 12 Win64"
|
|
ARCH: 64
|
|
|
|
# build:
|
|
# parallel: true
|
|
# project: ALL_BUILD.vcxproj
|
|
|
|
#appveyor limits compile/test to 30 minutes
|
|
# to reduce time, only test schemas with files: ifc2x3, ap214e3, ap209
|
|
|
|
build_script:
|
|
- ps: |
|
|
cd c:\projects\STEPcode
|
|
mkdir build
|
|
cd build
|
|
cmake -version
|
|
grep --version
|
|
cmake .. -DSC_ENABLE_TESTING=ON -G"$env:GENERATOR" -DSC_BUILD_SCHEMAS="ifc2x3;ap214e3;ap209"
|
|
echo "filtering build output with grep"
|
|
cmake --build . --config Debug | grep -ve "CMake does not need to re-run because" -e "ZERO_CHECK.ZERO_CHECK" -e "^ Creating directory"
|
|
|
|
#msbuld seems to provide no benefits, and I can't filter its output...
|
|
#msbuild SC.sln /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" /p:Configuration=Debug /p:Platform=x64
|
|
# /toolsversion:14.0 /p:PlatformToolset=v140
|
|
|
|
test_script:
|
|
- cmd: echo Running CTest...
|
|
- cmd: cd c:\projects\STEPcode\build
|
|
- cmd: echo excluding test_inverse_attr3, which hangs
|
|
- cmd: ctest -j1 . -C Debug -E test_inverse_attr3 --output-on-failure
|
|
|
|
# - cmd: grep -niB20 "Test Failed" Testing/Temporary/LastTest.log
|
|
|
|
# we could upload a compiled zip somewhere (see Appveyor artifact documentation)
|