@@ -15,63 +15,101 @@ image: Visual Studio 2017
1515# build platform, i.e. x86, x64, Any CPU. This setting is optional.
1616platform : x64
1717
18+ # set clone depth
19+ clone_depth : 1
20+
1821# clone directory
1922clone_folder : c:\projects\render_pipeline_cpp
2023
2124# scripts that are called at very beginning, before repo cloning
2225init :
2326- ps : >-
2427 if (Test-Path env:TRIGGER_NAME) {
25- Update-AppveyorBuild -Message "Build from $env:TRIGGER_COMMIT in $env:TRIGGER_NAME"
26- }
27-
28- else {
29- Set-AppveyorBuildVariable -Name 'TRIGGER_NAME' -Value "$env:APPVEYOR_PROJECT_NAME"
30- Set-AppveyorBuildVariable -Name 'TRIGGER_COMMIT' -Value "$env:APPVEYOR_REPO_COMMIT".substring(0, 8)
28+ Update-AppveyorBuild -Message "Build from $env:TRIGGER_COMMIT in $env:TRIGGER_NAME"
29+ } else {
30+ Set-AppveyorBuildVariable -Name 'TRIGGER_NAME' -Value "$env:APPVEYOR_PROJECT_NAME"
31+ Set-AppveyorBuildVariable -Name 'TRIGGER_COMMIT' -Value "$env:APPVEYOR_REPO_COMMIT".substring(0, 8)
3132 }
32-
33- git --version
34-
35- python --version
36-
37- cmake --version
33+ - git --version
34+ - python --version
35+ - cmake --version
3836
3937# environment variables
4038environment :
41- CMAKE_PREFIX_PATH : C:\projects\_install;C:\projects\_cache;
42- BOOST_ROOT : C:\Libraries\boost_1_64_0
43- FREETYPE_DIR : C:\projects\_install\panda3d-thirdparty\win-libs-vc14-x64\freetype
44- PATH : C:\Python36-x64;%PATH%
39+ CMAKE_PREFIX_PATH : C:\projects\_install;C:\projects\_cache;
40+ CMAKE_GENERATOR : Visual Studio 15 2017 Win64
41+ BOOST_ROOT : C:\Libraries\boost_1_64_0
42+ FREETYPE_DIR : C:\projects\_install\panda3d-thirdparty\win-libs-vc14-x64\freetype
43+ PATH : C:\Python36-x64;%PATH%
4544
4645# scripts that run after cloning repository
4746install :
47+ - ps : (mkdir C:\projects\_install) -and (pushd C:\projects\_install)
48+ - ps : Start-FileDownload 'https://ci.appveyor.com/api/projects/bluekyu/panda3d-thirdparty/artifacts/panda3d-thirdparty.7z?branch=develop'
49+ - 7z x -y panda3d-thirdparty.7z > nul
50+ - ps : Start-FileDownload 'https://ci.appveyor.com/api/projects/bluekyu/panda3d/artifacts/panda3d.7z?branch=develop'
51+ - 7z x -y panda3d.7z > nul
52+ - ps : popd
53+ - ps : (mkdir C:\projects\_build_cache) -and (pushd C:\projects\_build_cache)
54+ - ps : Start-FileDownload 'https://raw.githubusercontent.com/bluekyu/render_pipeline_cpp_ci/master/builder.py'
4855- cmd : >-
49- git clone --depth 1 "https://github.com/bluekyu/render_pipeline_cpp_ci.git" c:\projects\render_pipeline_cpp_ci
50-
51- mklink /J c:\projects\render_pipeline_cpp_ci\render_pipeline_cpp C:\projects\render_pipeline_cpp
56+ python .\builder.py "https://github.com/jbeder/yaml-cpp.git"
57+ --branch "master"
58+ --cmake-generator "%CMAKE_GENERATOR%"
59+ --install-prefix "C:/projects/_cache/yaml-cpp"
60+ --hash-path "C:/projects/_cache/yaml-cpp.hash"
61+ - cmd : >-
62+ python .\builder.py "https://github.com/gabime/spdlog.git"
63+ --branch "v0.13.0"
64+ --cmake-generator "%CMAKE_GENERATOR%"
65+ --install-prefix "C:/projects/_cache/spdlog"
66+ --hash-path "C:/projects/_cache/spdlog.hash"
67+ - cmd : >-
68+ python .\builder.py "https://github.com/google/flatbuffers.git"
69+ --branch "v1.7.1"
70+ --cmake-generator "%CMAKE_GENERATOR%"
71+ --install-prefix "C:/projects/_cache/flatbuffers"
72+ --hash-path "C:/projects/_cache/flatbuffers.hash"
73+ - ps : popd
5274
5375# build cache to preserve files/folders between builds
5476cache :
55- - C:\projects\_cache
77+ - C:\projects\_cache -> .appveyor.yml
5678
5779# ---------------------------------#
5880# build configuration #
5981# ---------------------------------#
6082
6183# to run your custom scripts instead of automatic MSBuild
6284build_script :
85+ - ps : (mkdir _build) -and (pushd _build)
6386- cmd : >-
64- cd c:\projects\render_pipeline_cpp_ci
87+ cmake -G "%CMAKE_GENERATOR%" -Wno-dev
88+ -DCMAKE_INSTALL_PREFIX="C:/projects/_install/render_pipeline_cpp"
89+ -DBoost_USE_STATIC_LIBS:BOOL=ON
90+ -Dpanda3d_ROOT:PATH="C:/projects/_install/panda3d"
91+ -Dyaml-cpp_DIR:PATH="C:/projects/_cache/yaml-cpp/CMake"
92+ -DFlatBuffers_ROOT:PATH="C:/projects/_cache/flatbuffers"
93+ ..
94+ - cmake --build . --config "Release" --target INSTALL
95+ - ps : popd
96+
97+ after_build :
98+ - 7z a render_pipeline_cpp.7z "C:/projects/_install/render_pipeline_cpp"
99+
100+ # ---------------------------------#
101+ # tests configuration #
102+ # ---------------------------------#
65103
66- python build.py render_pipeline_cpp --cmake-generator "Visual Studio 15 2017 Win64" --install-prefix "C:/projects/_install" --cache-prefix "C:/projects/_cache" --artifacts-prefix "C:/projects/render_pipeline_cpp/_artifacts"
104+ # to disable automatic tests
105+ test : off
67106
68107# ---------------------------------#
69108# artifacts configuration #
70109# ---------------------------------#
71110
72111artifacts :
73- - path : _artifacts
74- name : render_pipeline_cpp
112+ - path : render_pipeline_cpp.7z
75113
76114# ---------------------------------#
77115# global handlers #
@@ -81,6 +119,6 @@ artifacts:
81119on_success :
82120- ps : >-
83121 Start-AppveyorBuild -ApiKey $env:api_key -ProjectSlug 'rpcpp-plugins' -EnvironmentVariables @{
84- TRIGGER_NAME = $env:TRIGGER_NAME
85- TRIGGER_COMMIT = $env:TRIGGER_COMMIT
122+ TRIGGER_NAME = $env:TRIGGER_NAME
123+ TRIGGER_COMMIT = $env:TRIGGER_COMMIT
86124 }
0 commit comments