-
Notifications
You must be signed in to change notification settings - Fork 2
/
.appveyor.yml
122 lines (105 loc) · 4.27 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
#---------------------------------#
# general configuration #
#---------------------------------#
version: 1.0.{build}
# branches to build
branches:
only:
- master
- /v\d*\.\d*\.\d*/
# Start builds on tags only (GitHub and BitBucket)
skip_non_tags: true
#skip_tags: true
#---------------------------------#
# environment configuration #
#---------------------------------#
# Build worker image (VM template)
#image: Visual Studio 2019
# environment variables
environment:
matrix:
- platform: x86
msystem: mingw32
bit: 32bit
- platform: x64
msystem: mingw64
bit: 64bit
# 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.
#---------------------------------#
# install scripts #
#---------------------------------#
# scripts that run after cloning repository
install:
# by default, all script lines are interpreted as batch
- cmd: git submodule update --init --recursive
#---------------------------------#
# build configuration #
#---------------------------------#
# to disable automatic builds - use build_script
build: off
# scripts to run before build
before_build:
# to run your custom scripts instead of automatic MSBuild
build_script:
- cmd: set PATH=C:\msys64\%MSYSTEM%\bin;C:\msys64\usr\bin;%PATH%
- cmd: grep '#define APP_VERSION_STR' %APPVEYOR_BUILD_FOLDER%/app/PxView/Version.h > APP_VERSION
- cmd: sed -i -e 's/.*"\([0-9\.]*\)".*/\1/' APP_VERSION
- cmd: set /p APP_VERSION= < APP_VERSION
- cmd: echo %APP_VERSION%
- cmd: echo %NUMBER_OF_PROCESSORS%
- cmd: GenerateCMakeFiles.sh "MINGW"
- cmd: mkdir build.%MSYSTEM%
- cmd: cd build.%MSYSTEM%
- cmd: cmake -G "Unix Makefiles" ..
- cmd: mingw32-make -j %NUMBER_OF_PROCESSORS%
- cmd: cd %APPVEYOR_BUILD_FOLDER%
# To create a single “zip” artifact with multiple files from different locations you can use 7z in “after build” script which is already available in PATH:
# 7z a myapp.zip %APPVEYOR_BUILD_FOLDER%\path\to\bin\*.dll
# Specifying the absolute path here is required to remove paths from archive. However, if you need to preserve paths in the archive use relative paths, like:
# 7z a myapp.zip path\to\bin\*.dll
# scripts to run after build (working directory and environment changes are persisted from the previous steps)
after_build:
- cmd: mv %APPVEYOR_BUILD_FOLDER%\PxView.upp.tar.bz2 %APPVEYOR_BUILD_FOLDER%\PxView.upp-%APP_VERSION%.tar.bz2
- cmd: cp %APPVEYOR_BUILD_FOLDER%\app\PxView\Copying %APPVEYOR_BUILD_FOLDER%\build.%MSYSTEM%\LICENSE
- cmd: 7z a pxview-%APP_VERSION%-%BIT%.zip %APPVEYOR_BUILD_FOLDER%\build.%MSYSTEM%\bin\PxView.exe %APPVEYOR_BUILD_FOLDER%\build.%MSYSTEM%\LICENSE
- cmd: sha256sum pxview-%APP_VERSION%-%BIT%.zip > pxview-%APP_VERSION%-%BIT%.zip.sha256
- cmd: sha256sum %APPVEYOR_BUILD_FOLDER%\PxView.upp-%APP_VERSION%.tar.bz2 > %APPVEYOR_BUILD_FOLDER%\PxView.upp-%APP_VERSION%.tar.bz2.sha256
# scripts to run *after* solution is built and *before* automatic packaging occurs (web apps, NuGet packages, Azure Cloud Services)
before_package:
#---------------------------------#
# test configuration #
#---------------------------------#
#To disable test phase completely
test: off
#---------------------------------#
# artifacts configuration #
#---------------------------------#
artifacts:
- path: pxview-*.zip
name: App
- path: pxview-*.zip.sha256
name: AppSha
- path: PxView.upp-*.bz2
name: AppSource
- path: PxView.upp-*.bz2.sha256
name: AppSourceSha
#---------------------------------#
# deployment configuration #
#---------------------------------#
# provider names are case-sensitive!
# Deploy to GitHub Releases
deploy:
- provider: GitHub
release: $(APPVEYOR_REPO_TAG_NAME)
# description is mandatory. If not specified, GitHub returns 422: Unprocessable entity error.
description: "$(APPVEYOR_REPO_COMMIT_MESSAGE)\n\n$(APPVEYOR_REPO_COMMIT_MESSAGE_EXTENDED)"
auth_token:
secure: wh3ED4YJRCP43Gof1rcKwswYGYPtLefhiHE5cvdxLXWklCsDTKynKpEWItug1MU6
artifact: /App.*/
draft: false
prerelease: false
on:
# branch: master # release from master branch only
appveyor_repo_tag: true # deploy on tag push only