forked from julianxhokaxhiu/FFNx
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.appveyor.yml
108 lines (96 loc) · 3.57 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
# .appveyor.yml
# Build version
version: '1.7.2.{build}'
# Use the latest available toolchain
image: Visual Studio 2019
# fetch repository as zip archive
shallow_clone: true
# PRs do not increment the build number
pull_requests:
do_not_increment_build_number: true
# Build configurations
configuration: Release
# Default environment variables
environment:
_IS_BUILD_CANARY: false
_RELEASE_NAME: FFNx
_RELEASE_VERSION: v0
_RELEASE_PATH:
# Use Python 3.x
PYTHON: "C:\\Python38-x64"
PYTHON_VERSION: "3.8.x"
PYTHON_ARCH: "64"
# Prepare Cpp environment
before_build:
- cmd: |
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars32.bat"
set PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%
- ps: |
$env:_RELEASE_PATH = ".dist\build\x86-" + $env:CONFIGURATION
if ($env:APPVEYOR_REPO_TAG -eq "true" -and $env:APPVEYOR_REPO_TAG_NAME) {
$env:APPVEYOR_BUILD_VERSION = $env:APPVEYOR_BUILD_VERSION.Substring(0,$env:APPVEYOR_BUILD_VERSION.LastIndexOf('.')) + ".0"
$env:_RELEASE_VERSION = "v" + $env:APPVEYOR_BUILD_VERSION
} else {
$env:_RELEASE_VERSION = "Canary"
$env:APPVEYOR_REPO_TAG_NAME = "canary"
$env:_IS_BUILD_CANARY = "true"
}
build_script:
- cmd: |
md %_RELEASE_PATH%
cmake -G "Visual Studio 16 2019" -A Win32 -D_DLL_VERSION="%appveyor_build_version%" -DCMAKE_BINARY_DIR="%_RELEASE_PATH%" -S . -B %_RELEASE_PATH%
cmake --build %_RELEASE_PATH% --config %CONFIGURATION%
after_build:
- cmd: |
md .dist\pkg\FF7_1998
md .dist\pkg\FF8_2000
md .dist\pkg\FFNx_Steam
cp -R .dist/build/x86-%CONFIGURATION%/bin/* .dist/pkg/FF7_1998
cp -R .dist/build/x86-%CONFIGURATION%/bin/* .dist/pkg/FF8_2000
cp -R .dist/build/x86-%CONFIGURATION%/bin/* .dist/pkg/FFNx_Steam
rm .dist/pkg/FF7_1998/FF8.reg
rm .dist/pkg/FF8_2000/FF7.reg
rm .dist/pkg/FFNx_Steam/FF7.reg
rm .dist/pkg/FFNx_Steam/FF8.reg
rm .dist/pkg/FF7_1998/eax.dll
rm .dist/pkg/FFNx_Steam/eax.dll
mv .dist/pkg/FF7_1998/FF7.reg .dist/pkg/FF7_1998/FFNx.reg
mv .dist/pkg/FF8_2000/FF8.reg .dist/pkg/FF8_2000/FFNx.reg
mv .dist/pkg/FFNx_Steam/FFNx.dll .dist/pkg/FFNx_Steam/AF3DN.P
# Do not run unit tests
test: off
# Package artifacts
artifacts:
- path: .dist\pkg\FF7_1998
name: ${_RELEASE_NAME}-FF7_1998-${_RELEASE_VERSION}
type: zip
- path: .dist\pkg\FF8_2000
name: ${_RELEASE_NAME}-FF8_2000-${_RELEASE_VERSION}
type: zip
- path: .dist\pkg\FFNx_Steam
name: ${_RELEASE_NAME}-Steam-${_RELEASE_VERSION}
type: zip
# Create a GitHub release for every tag
deploy:
# Deploy only when new tags are pushed
- provider: GitHub
tag: ${appveyor_repo_tag_name}
release: ${_RELEASE_NAME}-${_RELEASE_VERSION}
artifact: ${_RELEASE_NAME}-FF7_1998-${_RELEASE_VERSION}, ${_RELEASE_NAME}-FF8_2000-${_RELEASE_VERSION}, ${_RELEASE_NAME}-Steam-${_RELEASE_VERSION}
auth_token: ${_GH_DEPLOYMENT_TOKEN}
on:
branch: master
_IS_BUILD_CANARY: false
# Deploy on each commit
- provider: GitHub
tag: ${appveyor_repo_tag_name}
release: ${_RELEASE_NAME}-v${appveyor_build_version}
artifact: ${_RELEASE_NAME}-FF7_1998-${_RELEASE_VERSION}, ${_RELEASE_NAME}-FF8_2000-${_RELEASE_VERSION}, ${_RELEASE_NAME}-Steam-${_RELEASE_VERSION}
prerelease: true
force_update: true
auth_token: ${_GH_DEPLOYMENT_TOKEN}
on:
branch: master
_IS_BUILD_CANARY: true
description: |
This is a canary build. Please be aware it may be prone to crashing and is NOT tested by anyone. Use this build AT YOUR OWN RISK!