This repository has been archived by the owner on Jul 23, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 24
/
Copy pathappveyor.yml
120 lines (98 loc) · 4.56 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
environment:
matrix:
- CMAKE_GENERATOR: "Watcom WMake"
USE_WATCOM: "1"
APPVEYOR_BUILD_WORKER_IMAGE: "Visual Studio 2017"
- CMAKE_GENERATOR: "Visual Studio 15 2017"
USE_MSVC: "1"
STANDALONE: "ON"
APPVEYOR_BUILD_WORKER_IMAGE: "Visual Studio 2017"
- CMAKE_GENERATOR: "Visual Studio 15 2017 Win64"
USE_MSVC: "1"
STANDALONE: "ON"
APPVEYOR_BUILD_WORKER_IMAGE: "Visual Studio 2017"
configuration:
- Release
- Debug
clone_folder: c:\projects\chronoshift
cache:
- c:\projects\open-watcom-c-win32-1.9.exe
- c:\projects\dxsdk_aug2007.exe
# scripts that are called at very beginning, before repo cloning
init:
- cmd: cmake --version
- cmd: msbuild /version
- git config --global core.autocrlf input
install:
- ps: >-
$CLONE_DIR = "c:\projects\chronoshift";
Set-Location $CLONE_DIR | Out-Null;
& git submodule update --init --recursive;
If ($env:USE_WATCOM -eq "1") {
$WATCOM_BASE = "open-watcom-c-win32-1.9";
$WATCOM_INSTALLER = "$WATCOM_BASE.exe";
$WATCOM_URL = "https://sourceforge.net/projects/openwatcom/files/open-watcom-1.9/$WATCOM_INSTALLER/download";
Set-Location c:\projects | Out-Null;
If (-Not (Test-Path "$WATCOM_INSTALLER")) {
& appveyor DownloadFile "$WATCOM_URL" -FileName "$WATCOM_INSTALLER";
}
New-Item -ItemType directory -Path "$WATCOM_BASE" | Out-Null;
Copy-Item "$WATCOM_INSTALLER" "$WATCOM_BASE";
Set-Location "$WATCOM_BASE" | Out-Null;
& 7z x -y "$WATCOM_INSTALLER";
$CUR_LOCATION = "c:\projects\$WATCOM_BASE";
$env:PATH = "$CUR_LOCATION\binw;$env:PATH";
$env:PATH = "$CUR_LOCATION\binnt;$env:PATH";
$env:INCLUDE = "$CUR_LOCATION\h\nt;$env:INCLUDE";
$env:INCLUDE = "$env:INCLUDE;$CUR_LOCATION\h\nt\directx";
$env:INCLUDE = "$env:INCLUDE;$CUR_LOCATION\h\nt\ddk";
$env:INCLUDE = "$CUR_LOCATION\h;$env:INCLUDE";
$env:WATCOM = "$CUR_LOCATION";
$env:EDPATH = "$CUR_LOCATION\eddat";
} else {
$DXSDK_INSTALLER = "dxsdk_aug2007.exe";
$DXSDK_TMP = "dxsdk_aug2007_tmp.exe";
$DXSDK_URL = "https://download.microsoft.com/download/3/3/f/33f1af6e-c61b-4f14-a0de-3e9096ed4b3a/$DXSDK_INSTALLER";
$DXSDK_DIR = "c:\projects\dxsdk"
Set-Location c:\projects | Out-Null;
If (-Not (Test-Path "$DXSDK_INSTALLER")) {
& appveyor DownloadFile "$DXSDK_URL" -FileName "$DXSDK_TMP";
& 7z x -y "c:\projects\$DXSDK_TMP";
}
New-Item -ItemType directory -Path $DXSDK_DIR| Out-Null;
Set-Location $DXSDK_DIR | Out-Null;
& 7z x -y "c:\projects\$DXSDK_INSTALLER";
}
build_script:
- ps: >-
$BUILD_DIR = "c:\projects\chronoshift\build";
New-Item -ItemType directory -Path $BUILD_DIR | Out-Null;
Set-Location $BUILD_DIR | Out-Null;
If ($env:USE_WATCOM -eq "1") {
$BUILD_COMMAND = "wmake";
} Else {
$BUILD_DX_PATH = "-DDirectX_ROOT=c:\projects\dxsdk"
If ($env:USE_OLD_MSBUILD -eq "1") {
$env:PATH = "C:\Windows\Microsoft.NET\Framework\v3.5;$env:PATH";
}
$BUILD_COMMAND = "msbuild";
$BUILD_PARAMS = @("/verbosity:normal", "$BUILD_DIR\CHRONOSHIFT.sln", "/p:Configuration=$env:configuration", "/m");
}
If ($env:STANDALONE -eq "ON") {
& cmake -G"$env:CMAKE_GENERATOR" $BUILD_DX_PATH -DSTANDALONE=ON $BUILD_TYPE $CMAKE_C_COMPILER $CMAKE_CXX_COMPILER ..;
} else {
& cmake -G"$env:CMAKE_GENERATOR" $BUILD_DX_PATH $BUILD_TYPE $CMAKE_C_COMPILER $CMAKE_CXX_COMPILER ..;
}
& $BUILD_COMMAND $BUILD_PARAMS;
If ($env:USE_MSVC -eq "1") {
If ($env:STANDALONE -eq "ON") {
& 7z a chronoshift.zip .\$env:configuration\chronoshift.exe -tzip;
} Else {
& 7z a chronoshift.zip .\$env:configuration\chronoshift.dll .\$env:configuration\launchchronoshift.exe -tzip;
}
} Else {
& 7z a chronoshift.zip .\chronoshift.dll .\launchchronoshift.exe -tzip;
}
artifacts:
- path: build/chronoshift.zip
name: zip-archive