1#version:
2
3image: Visual Studio 2017
4
5environment:
6  matrix:
7    - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
8      # APPVEYOR_SAVE_CACHE_ON_ERROR: true
9      generator: "Visual Studio 15 2017 Win64"
10      ARCH: "Win64"
11      Compiler: "MSVC2017"
12
13cache: c:\users\appveyor\clcache -> appveyor.yml
14
15configuration:
16  #- Debug
17  - Release
18
19clone_depth: 1600
20
21# scripts that are called at very beginning, before repo cloning
22#init:
23
24#before_build:
25
26# scripts that run after cloning repository
27#todo cleanup libpacks on the FreeCAD-ports-cache repo
28install:
29  - cd C:\projects\freecad
30  - if [%ARCH%] == [Win64] (appveyor DownloadFile https://github.com/apeltauer/FreeCAD/releases/download/LibPack_12.1/FreeCADLibs_12.1.2_x64_VC15.7z)
31  - if [%ARCH%] == [Win64] (
32      powershell -Command 7z x FreeCADLibs_12.1.2_x64_VC15.7z -oFreeCADLibs > nul &&
33      call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars64.bat")
34  - set PATH=c:\Python37;c:\Python37\Scripts;%PATH%
35  - pip install clcache
36  - clcache -z
37  - clcache -s
38
39build_script:
40  - cd C:\projects\freecad
41  - mkdir build
42  - cd build
43  - cmake -DFREECAD_LIBPACK_DIR=C:\projects\freecad\FreeCADLibs
44    -DBUILD_FEM_NETGEN=OFF
45    -DFREECAD_RELEASE_PDB=OFF
46    -G "%generator%" ..
47  - mkdir bin
48  - xcopy C:\projects\freecad\FreeCADLibs\bin C:\projects\freecad\build\bin /E /Q
49  - ps: fsutil behavior set disablelastaccess 0 # Enable Access time feature on Windows (for clcache)
50  - msbuild FreeCAD.sln /p:TrackFileAccess=false /p:CLToolExe=clcache.exe /p:CLToolPath=c:\Python37\Scripts\ /m
51  - ps: fsutil behavior set disablelastaccess 1
52  - clcache -s
53
54#after_build:
55  - cd C:\projects\freecad\build\bin\
56  - FreeCADCmd.exe --run-test 0
57
58#artifacts:
59
60test: off  # to avoid discovering tests
61
62#
63# The following section automatically uploads artifacts
64# whenever a tag is created on the master branch.
65#
66#deploy:
67