forked from BAndysc/WoWDatabaseEditor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
162 lines (98 loc) · 8.86 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
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
158
159
160
161
162
version: 0.1.{build}
image: Visual Studio 2022
configuration: Release
environment:
DEPLOY_URL:
secure: tI50+kR1mSDCXK8B4BPyT9ArtYD3D1NAvb5/06G8mFA=
DEPLOY_USER:
secure: IZcgg6msojQGCM0rLsUNTA==
DEPLOY_KEY:
secure: SXvCUsowLsFFH1P7e3IsqldBlcPD0gQ8qpsSM8s73VUImWk+NW0dbnLjbytCriqD6O3+FiBLKWkE/v0bNckEJkwFDU8y2ZuNjmB2NIyAQViPyi72/a3vRPM7ruJH+BY0
REPO_TOKEN:
secure: 0qeEEToZuwVcvYxnrAA5DeRQmdRMeYmrtmJKGUVFeTFteeMrw4z6pPUEE3wley1p
services:
- mysql
install:
- cmd: git submodule update --init --recursive
before_build:
- ps: (Get-Content WoWDatabaseEditorCore.Avalonia/Services/ProgramNameService.cs) -replace 'Subtitle => ""', 'Subtitle => "for open source emulator use"' | Out-File -encoding UTF8 WoWDatabaseEditorCore.Avalonia/Services/ProgramNameService.cs
build_script:
- cmd: >-
Rem Building WDE
dotnet --list-sdks
dotnet publish -c Release --self-contained false -f net6.0 -o bin/wowdatabaseeditor-avalonia-win/ LoaderAvalonia/LoaderAvalonia.csproj -r win8-x64 -p:PublishSingleFile=true -p:PublishTrimmed=false -p:DebugType=none
dotnet publish -c Release --self-contained false -f net6.0 -o bin/wowdatabaseeditor-avalonia-mac/ LoaderAvalonia/LoaderAvalonia.csproj -r osx-x64
dotnet publish -c Release --self-contained false -f net6.0 -o bin/wowdatabaseeditor-avalonia-linux/ LoaderAvalonia/LoaderAvalonia.csproj -r linux-x64 -p:PublishSingleFile=true -p:PublishTrimmed=false -p:DebugType=none
dotnet publish -c Release --self-contained false -f net6.0 -o bin/wowdatabaseeditor-avalonia-win/ Updater/Updater.csproj -r win8-x64 -p:PublishSingleFile=true -p:PublishTrimmed=false -p:DebugType=none
dotnet publish -c Release --self-contained false -f net6.0 -o bin/wowdatabaseeditor-avalonia-mac/ Updater/Updater.csproj -r osx-x64
dotnet publish -c Release --self-contained false -f net6.0 -o bin/wowdatabaseeditor-avalonia-linux/ Updater/Updater.csproj -r linux-x64 -p:PublishSingleFile=true -p:PublishTrimmed=false -p:DebugType=none
dotnet publish -c Release --self-contained false -f net6.0 -o bin/wowdatabaseeditor-avalonia-win/parser WoWPacketParserLoader -r win8-x64
dotnet publish -c Release --self-contained false -f net6.0 -o bin/wowdatabaseeditor-avalonia-mac/parser WoWPacketParserLoader -r osx-x64
dotnet publish -c Release --self-contained false -f net6.0 -o bin/wowdatabaseeditor-avalonia-linux/parser WoWPacketParserLoader -r linux-x64
rename bin\wowdatabaseeditor-avalonia-mac\Updater _Updater
rename bin\wowdatabaseeditor-avalonia-linux\Updater _Updater
rename bin\wowdatabaseeditor-avalonia-win\Updater.exe _Updater.exe
git clone https://%REPO_TOKEN%@github.com/BAndysc/WoWDatabaseEditorExtras --recurse-submodules
cd WoWDatabaseEditorExtras/WoWDatabaseEditor
git checkout %APPVEYOR_REPO_COMMIT%
cd ../
mkdir modules
dotnet publish WDE.Github/WDE.Github.csproj -o modules/ -c Release -f net6.0
cp modules/WDE.Github.dll ../bin/wowdatabaseeditor-avalonia-win/WDE.Github.dll
cp modules/WDE.Github.dll ../bin/wowdatabaseeditor-avalonia-mac/WDE.Github.dll
cp modules/WDE.Github.dll ../bin/wowdatabaseeditor-avalonia-linux/WDE.Github.dll
cd ../
cd bin\wowdatabaseeditor-avalonia-win\
del /f AvaloniaStyles.exe AvaloniaStyles.deps.json AvaloniaStyles.runtimeconfig.json *.pdb Dock.* WoWDatabaseEditorCore.Avalonia.GUI.exe WoWDatabaseEditorCore.Avalonia.GUI.runtimeconfig.json WoWDatabaseEditorCore.Avalonia.GUI.deps.json WoWPacketParserLoader.exe WoWPacketParserLoader.deps.json
cd ..\..\
FOR %%A IN (bin\wowdatabaseeditor-avalonia-win\app.ini,bin\wowdatabaseeditor-avalonia-mac\app.ini,bin\wowdatabaseeditor-avalonia-linux\app.ini) DO (echo COMMIT=%APPVEYOR_REPO_COMMIT% >> %%A & echo BRANCH=%APPVEYOR_REPO_BRANCH% >> %%A & echo VERSION=%APPVEYOR_BUILD_VERSION% >> %%A & echo BUILD_VERSION=%APPVEYOR_BUILD_NUMBER% >> %%A & echo UPDATE_SERVER=%DEPLOY_URL% >> %%A & echo MARKETPLACE=default >> %%A & echo MAPDATA_SERVER=%DEPLOY_URL% >> %%A)
FOR %%A IN (bin\wowdatabaseeditor-avalonia-win\parser,bin\wowdatabaseeditor-avalonia-mac\parser,bin\wowdatabaseeditor-avalonia-linux\parser) DO ( mkdir %%A\Parsers & cd %%A & ( FOR %%X in (WowPacketParserModule.*) DO ( move %%X Parsers\%%X ) ) & cd ..\..\..\ )
echo PLATFORM=Windows >> bin/wowdatabaseeditor-avalonia-win/app.ini
echo PLATFORM=MacOs >> bin/wowdatabaseeditor-avalonia-mac/app.ini
echo PLATFORM=Linux >> bin/wowdatabaseeditor-avalonia-linux/app.ini
curl -fsSL -o bin/wowdatabaseeditor-avalonia-win/storm.dll https://github.com/BAndysc/StormCascLibBinary/releases/download/windows/StormLib.dll
curl -fsSL -o bin/wowdatabaseeditor-avalonia-win/casc.dll https://github.com/BAndysc/StormCascLibBinary/releases/download/windows/CascLib.dll
curl -fsSL -o bin/wowdatabaseeditor-avalonia-linux/libstorm.so https://github.com/BAndysc/StormCascLibBinary/releases/download/linux/libstorm.so
curl -fsSL -o bin/wowdatabaseeditor-avalonia-linux/libcasc.so https://github.com/BAndysc/StormCascLibBinary/releases/download/linux/libcasc.so
Rem Mac OS Bundle
mkdir "WoW Database Editor.app"
mkdir "WoW Database Editor.app\Contents"
mkdir "WoW Database Editor.app\Contents\MacOS"
mkdir "WoW Database Editor.app\Contents\Resources"
copy WoWDatabaseEditorCore.Avalonia\Resources\Info.plist "WoW Database Editor.app\Contents"
copy WoWDatabaseEditorCore.Avalonia\Resources\icon.icns "WoW Database Editor.app\Contents\Resources"
move bin\wowdatabaseeditor-avalonia-mac\* "WoW Database Editor.app\Contents\MacOS"
for /d %%a in (bin\wowdatabaseeditor-avalonia-mac\*) do move "%%~fa" "WoW Database Editor.app\Contents\MacOS"
7z a WoWDatabaseEditorWindows.zip .\bin\wowdatabaseeditor-avalonia-win\*
7z a WoWDatabaseEditorMacOs.zip "WoW Database Editor.app\"
7z a WoWDatabaseEditorLinux.zip .\bin\wowdatabaseeditor-avalonia-linux\*
test_script:
- cmd: >-
cd test
bash database_test.sh localhost 3306 root 'Password12!' 'C:\Program Files\MySQL\MySQL Server 5.7\bin\mysql'
cd ../
dotnet test WDE.MVVM.Test/WDE.MVVM.Test.csproj
dotnet test WDE.RemoteSOAP.Test/WDE.RemoteSOAP.Test.csproj
dotnet test WDE.SmartScriptEditor.Test/WDE.SmartScriptEditor.Test.csproj
dotnet test WDE.Updater.Test/WDE.Updater.Test.csproj
dotnet test WDE.Parameters.Test/WDE.Parameters.Test.csproj
dotnet test WDE.SqlQueryGenerator.Test/WDE.SqlQueryGenerator.Test.csproj
dotnet test WDE.SqlInterpreter.Test/WDE.SqlInterpreter.Test.csproj
dotnet test WDE.Common.Test/WDE.Common.Test.csproj
dotnet test Rendering/TheEngine.Test/TheEngine.Test.csproj
dotnet test WDE.WoWHeadConnector.Test/WDE.WoWHeadConnector.Test.csproj
dotnet test WoWDatabaseEditorCore.Test/WoWDatabaseEditorCore.Test.csproj
Rem dotnet test Modules/WDE.PacketViewer.Test/WDE.PacketViewer.Test.csproj
artifacts:
- path: WoWDatabaseEditorMacOs.zip
name: WoWDatabaseEditorMacOs.zip
- path: WoWDatabaseEditorWindows.zip
name: WoWDatabaseEditorWindows.zip
- path: WoWDatabaseEditorLinux.zip
name: WoWDatabaseEditorLinux.zip
deploy_script:
- cmd: >-
IF NOT "%DEPLOY_KEY%" == "" curl -X POST "%DEPLOY_URL%/Upload" -H "accept: */*" -H "Content-Type: multipart/form-data" -F "branch=%APPVEYOR_REPO_BRANCH%" -F "marketplace=default" -F "platform=windows" -F "version=%APPVEYOR_BUILD_NUMBER%" -F "versionName=Build %APPVEYOR_BUILD_VERSION%" -F "user=%DEPLOY_USER%" -F "key=%DEPLOY_KEY%" -F "[email protected];type=application/zip"
IF NOT "%DEPLOY_KEY%" == "" curl -X POST "%DEPLOY_URL%/Upload" -H "accept: */*" -H "Content-Type: multipart/form-data" -F "branch=%APPVEYOR_REPO_BRANCH%" -F "marketplace=default" -F "platform=macos" -F "version=%APPVEYOR_BUILD_NUMBER%" -F "versionName=Build %APPVEYOR_BUILD_VERSION%" -F "user=%DEPLOY_USER%" -F "key=%DEPLOY_KEY%" -F "[email protected];type=application/zip" -F "make_exec=WoW Database Editor.app/Contents/MacOS/WoWDatabaseEditorCore.Avalonia"
IF NOT "%DEPLOY_KEY%" == "" curl -X POST "%DEPLOY_URL%/Upload" -H "accept: */*" -H "Content-Type: multipart/form-data" -F "branch=%APPVEYOR_REPO_BRANCH%" -F "marketplace=default" -F "platform=linux" -F "version=%APPVEYOR_BUILD_NUMBER%" -F "versionName=Build %APPVEYOR_BUILD_VERSION%" -F "user=%DEPLOY_USER%" -F "key=%DEPLOY_KEY%" -F "[email protected];type=application/zip" -F "make_exec=WoWDatabaseEditorCore.Avalonia" -F "make_exec=_Updater" -F "make_exec=parser/WowPacketParser"
IF NOT "%DEPLOY_KEY%" == "" curl -X POST "%DEPLOY_URL%/Changelog/Add" -H "accept: */*" -H "Content-Type: application/json" -d "{\"version\":{\"branch\":\"%APPVEYOR_REPO_BRANCH%\",\"marketplace\":\"default\",\"version\":%APPVEYOR_BUILD_NUMBER%},\"user\":{\"user\":\"%DEPLOY_USER%\",\"key\":\"%DEPLOY_KEY%\"},\"entry\":\"%APPVEYOR_REPO_COMMIT_MESSAGE%%APPVEYOR_REPO_COMMIT_MESSAGE_EXTENDED%\"}"