forked from kromenak/gengine
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathappveyor.yml
More file actions
157 lines (124 loc) · 4.04 KB
/
appveyor.yml
File metadata and controls
157 lines (124 loc) · 4.04 KB
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
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
####
# General Config
####
# Appveyor build version equals app's version number, but with an added (patch) value.
# Ex: if app version is "0.0.1", Appveyor's version might be "0.0.1.9".
version: 0.0.2-{build}
# The goal is to build and deploy occasional release milestones to GitHub.
# Rather than building every commit to master, we'll only build when merging into release branch.
branches:
only:
- release
# Do not build tags.
skip_tags: true
# I think this is a limitation of the free plan anyway!
max_jobs: 1
####
# Environment Config
####
# Build for Windows and Mac.
image:
- macos
- Visual Studio 2019
# Init script runs before cloning the repo.
#init:
# - echo Init
# Install scripts run after cloning completes.
#install:
# - echo Install
####
# Build Config
####
# Can be one of (Debug, Release, RelWithDebInfo, MinSizeRel) - from CMake.
configuration: RelWithDebInfo
# Scripts to run before build.
before_build:
# For Mac: generate Xcode project.
- sh: cmake -B build -G Xcode .
# For Windows: when you open VS, it generates a CMake "build" directory based on the contents of CMakeSettings.json.
# Unfortunately, there's no way to execute what VS does (or use CMakeSettings.json) from the command line.
# As a workaround, execute the cmake command that VS exectutes (pulled from VS CMake output log).
- cmd: call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\Tools\VsDevCmd.bat"
- cmd: cmake -B build -G "Ninja" -DCMAKE_BUILD_TYPE:STRING="%CONFIGURATION%" -DCMAKE_C_COMPILER:FILEPATH="cl.exe" -DCMAKE_CXX_COMPILER:FILEPATH="cl.exe" -DCMAKE_MAKE_PROGRAM="ninja.exe" .
build_script:
# For Mac: build project using xcodebuild "deploy" target. (TODO: can "cmake --build" be used here as well?)
# xcodebuild only works IN THE DIRECTORY with the Xcode project, which is why we must "cd" in and out.
- sh: cd build
- sh: xcodebuild -target deploy -configuration "${CONFIGURATION}"
- sh: cd ../
# For Windows: use the built-in CMake "build" command to compile using Ninja.
- cmd: cmake --build build --target deploy
# Scripts to run after build.
#after_build:
# - echo After Build
####
# Tests Config
####
# Scripts to run before tests.
before_test:
# For Mac: build test target.
- sh: cd build
- sh: xcodebuild -target tests -configuration "${CONFIGURATION}"
- sh: cd ../
# For Windows: build test target.
- cmd: cmake --build build --target tests
# Scripts to run for tests.
test_script:
# For Mac: run tests.
- sh: ./build/Tests/${CONFIGURATION}/tests
# For Windows: run tests.
- cmd: build\Tests\tests.exe
# Scripts to run after tests.
#after_test:
# - echo After Tests
####
# Artifact Config
####
# Build scripts will leave ready-to-deploy app in "Bin" folder
artifacts:
- path: Bin/$(CONFIGURATION)/*.zip
name: Game
####
# Deployment Config
####
# Scripts to run before deployment.
before_deploy:
- echo Before Deploy
# Deploy to GitHub Releases
deploy:
- provider: GitHub
artifact: Game
release: 'v$(APPVEYOR_BUILD_VERSION)'
description: '$(APPVEYOR_REPO_COMMIT_MESSAGE) - $(APPVEYOR_REPO_COMMIT_MESSAGE_EXTENDED)'
force_update: true # allows multiple jobs to upload artifacts to same GitHub release
auth_token:
secure: RziIBOU8Bm+xT4f7Yo1P0IXI2SZUitYy4qFrPthqi/Lb8/1rOYvYp1PvdDxYc/DO
# Scripts to run after deployment.
after_deploy:
- echo After Deploy
####
# Handlers
####
# Scripts to run on successful build completion.
on_success:
- echo Success
# Scripts to run on build failure.
on_failure:
- echo Failure
# Scripts to run on build finish (success or failure).
on_finish:
- echo Finish
####
# Notifications
####
# A way to send a notif (email, Slack, etc) when a build finishes.
# Just to test it out, I'll send myself an email on build status change.
notifications:
- provider: Email
to:
- kromenak@gmail.com
# Exclude custom subject/message to use the default ones.
#subject: 'Build {{status}}: {{projectName}} {{buildVersion}}'
#message: "{{message}}, {{commitId}}"
on_build_failure: true
on_build_status_changed: true