forked from petasis/tkdnd
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.appveyor.yml
94 lines (82 loc) · 3.16 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
# version format
version: 2.9.{build}
branches:
only:
- master
image:
- Visual Studio 2017
platform:
- x86
- x64
configuration:
- Release
matrix:
fast_finish: true
allow_failures:
- platform: x86
configuration: Release
install:
- cmd: set TKDND_HOME=%cd%
- cmd: set /p TKDND_VERSION=<VERSION
- cmd: echo %TKDND_VERSION%
# Install Tcl/Tk
- cmd: set IRONTCL_VERSION="8.6.7"
- cmd: if %platform%==x86 set DOWNLOAD_PLATFORM=win32
- cmd: if %platform%==x64 set DOWNLOAD_PLATFORM=amd64
- cmd: if %platform%==x86 set CMAKE_GENERATOR="Visual Studio 15"
- cmd: if %platform%==x64 set CMAKE_GENERATOR="Visual Studio 15 Win64"
- cmd: appveyor DownloadFile https://www.irontcl.com/downloads/irontcl-%DOWNLOAD_PLATFORM%-%IRONTCL_VERSION%.zip
- cmd: cmake -E tar xf irontcl-%DOWNLOAD_PLATFORM%-%IRONTCL_VERSION%.zip
- cmd: set TCL_ROOT=%cd%\IronTcl
- cmd: set PATH=%cd%\IronTcl\bin;%PATH%
- cmd: set TCL_TCLSH=%cd%\IronTcl\bin\tclsh86t.exe
- cmd: set TK_WISH=%cd%\IronTcl\bin\wish86t.exe
# Generate solution...
- cmd: cmake -E make_directory "build"
- cmd: cd build && cmake -G %CMAKE_GENERATOR% -DTCL_TCLSH=%TCL_TCLSH% -DTK_WISH=%TK_WISH% -DCMAKE_INSTALL_PREFIX=runtime ..
build:
project: build\tkdnd.sln # path to Visual Studio solution or project
before_build:
- cmd: if %platform%==x86 set TKDND_PLATFORM=Win32
- cmd: if %platform%==x86 set MSYS2_ARCH=i686
- cmd: if %platform%==x86 set MSYSTEM=MINGW32
- cmd: if %platform%==x64 set TKDND_PLATFORM=x64
- cmd: if %platform%==x64 set MSYS2_ARCH=x86_64
- cmd: if %platform%==x64 set MSYSTEM=MINGW64
build_script:
- cmd: msbuild tkdnd.sln /p:Platform=%TKDND_PLATFORM% /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
- cmd: msbuild INSTALL.vcxproj /p:Platform=%TKDND_PLATFORM% /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
## MSYS2
- PATH C:\msys64\%MSYSTEM%\bin;C:\msys64\usr\bin;C:\msys64\bin;%PATH%
- cd %TKDND_HOME%
- bash '%APPVEYOR_BUILD_FOLDER%\appveyor_build_msys2.sh'
- cd %TKDND_HOME%\build
after_build:
- cmd: echo %cd%
- cmd: cd runtime && 7z a -tzip tkdnd-%TKDND_VERSION%-windows-%platform%.zip *
artifacts:
- path: '\build\runtime\*.zip'
type: zip
name: tkdnd-%TKDND_VERSION%-windows-%platform%.zip
# https://github.com/forexample/github-binary-release
# git tag tkdnd-release-test-v2.9.2
# git push --tags
#
# Delete tag:
# git push --delete origin tkdnd-release-test-v2.9.1
# git tag -d tkdnd-release-test-v2.9.1
deploy:
provider: GitHub
auth_token:
secure: "BzeJXdX4roGf2NZw9H9ClTKKzVP3H/nAdtBV/U2qh6CbSZYL+8BnRiUGmihyOL8J"
tag: $(APPVEYOR_REPO_TAG_NAME)
# release: $(APPVEYOR_REPO_TAG_NAME)-%platform%-v$(appveyor_build_version)
# release: $(APPVEYOR_REPO_TAG_NAME)-windows-v$(appveyor_build_version)
release: $(APPVEYOR_REPO_TAG_NAME)
description: 'TkDND binaries'
artifact: tkdnd-%TKDND_VERSION%-windows-%platform%.zip
draft: false
prerelease: false
on:
branch: master # release from master branch only
appveyor_repo_tag: true # deploy on tag push only