forked from arrayfire/forge
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathappveyor.yml
136 lines (110 loc) · 4.48 KB
/
appveyor.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
# - Indent each level of configuration with 2 spaces. Do not use tabs!
# - All section names are case-sensitive.
# - Section names should be unique on each level.
# version format
version: '{branch}-{build}'
# branches to build
branches:
# blacklist
except:
- gh-pages
# Do not build on tags (GitHub and BitBucket)
skip_tags: false
# Start builds on tags only (GitHub and BitBucket)
skip_non_tags: false
# Skipping commits with particular message or from specific user
#skip_commits:
# message: /Created.*\.(png|jpg|jpeg|bmp|gif)/ # Regex for matching commit message
# author: John # Commit author's username, name, email or regexp maching one of these.
# Do not build feature branch with open Pull Requests
skip_branch_with_pr: true
# Maximum number of concurrent jobs for the project
max_jobs: 2
#---------------------------------#
# environment configuration #
#---------------------------------#
# Build worker image (VM template)
image:
- Visual Studio 2017
environment:
# 0-4 warning levels; 0 is no warnings
MSBUILD_FLAGS: /maxcpucount
BOOST_ROOT: C:/Libraries/boost_1_67_0
matrix:
- generator: "Visual Studio 15 2017 Win64"
install:
- ps: cd C:\
- ps: if ( ! (Test-Path -Path "C:/vcpkg") ) {
git clone -q https://github.com/Microsoft/vcpkg.git;
cd .\vcpkg;
git checkout -q 4568b57ad7728f30c1e2badc9735c8990cd51265;
.\bootstrap-vcpkg.bat;
Copy-Item -Path 'c:\projects\forge\CMakeModules\ForgeFreetypeVCPKGTriplet.cmake' -Destination .\triplets\x64-windows.cmake;
vcpkg --triplet x64-windows install glfw3 glm opencl freetype
}
- ps: if ( ! (Test-Path -Path "C:/FreeImage") ) {
Invoke-WebRequest -Uri "https://nchc.dl.sourceforge.net/project/freeimage/Binary%20Distribution/3.18.0/FreeImage3180Win32Win64.zip" -OutFile FreeImage3180x64.zip;
Expand-Archive .\FreeImage3180x64.zip -DestinationPath .\;
Remove-Item -Path .\FreeImage3180x64.zip
}
- ps: If ($env:APPVEYOR_REPO_TAG -eq "false") {Set-AppveyorBuildVariable 'configuration' 'RelWithDebInfo'} Else {Set-AppveyorBuildVariable 'configuration' 'Release'}
# scripts that are called at very beginning, before repo cloning
init:
- date /T & time /T
- git config --global core.autocrlf input
- cmake --version
# clone directory
clone_folder: c:\projects\forge
# fetch repository as zip archive
shallow_clone: true # default is "false"
# set clone depth
clone_depth: 5 # clone entire repository history if not defined
# this is how to allow failing jobs in the matrix
matrix:
fast_finish: true # set this flag to immediately finish build once one of the jobs fails.
# allow_failures:
# - platform: x86
# configuration: Debug
# - platform: x64
# configuration: Release
# build platform, i.e. x86, x64, Any CPU. This setting is optional.
platform: x64
cache:
- C:/vcpkg/ -> appveyor.yml
- C:/FreeImage/ -> appveyor.yml
build:
parallel: true # enable MSBuild parallel builds
project: c:/projects/forge/build/Forge.sln # path to Visual Studio solution or project
# MSBuild verbosity level
# verbosity: quiet|minimal|normal|detailed
verbosity: quiet
# scripts to run before build
before_build:
# scripts to run *after* solution is built and *before* automatic packaging occurs (web apps, NuGet packages, Azure Cloud Services)
before_package:
# scripts to run after build
after_build:
# to run your custom scripts instead of automatic MSBuild
build_script:
- cd %APPVEYOR_BUILD_FOLDER%
- mkdir build
- cd build
- cmake %APPVEYOR_BUILD_FOLDER% -G "%generator%" -DCMAKE_INSTALL_PREFIX=%APPVEYOR_BUILD_FOLDER%/build/package -DBOOST_ROOT="%BOOST_ROOT%" -DCMAKE_TOOLCHAIN_FILE=c:/vcpkg/scripts/buildsystems/vcpkg.cmake -DFreeImage_ROOT="c:\FreeImage\Dist\x64" -DCMAKE_BUILD_TYPE:STRING=%configuration%
- cmake --build . --target ALL_BUILD --config %configuration% -- /nologo
- cmake --build . --target INSTALL --config %configuration% -- /nologo
- ps: If ($env:APPVEYOR_REPO_TAG -ne "false") {cpack -G NSIS64}
artifacts:
- path: build\Forge-*.exe
name: fg_rel_bin
deploy:
tag: $(APPVEYOR_REPO_TAG_NAME)
release: '$(APPVEYOR_REPO_TAG_NAME) Release'
provider: GitHub
auth_token:
secure: /0K0KS4oToqgUSdlCUYT1UTs4svJXx8ODOaeG9qh9JQC6+ge9mK6nwwjIGqTyF4+
artifact: fg_rel_bin
draft: true
prerelease: false
force_update: true
on:
APPVEYOR_REPO_TAG: true # deploy on tag push only