-
Notifications
You must be signed in to change notification settings - Fork 20
/
BuildTests.cmd
204 lines (136 loc) · 5.34 KB
/
BuildTests.cmd
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
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
@echo off
echo.
echo [104;97mDeleting previous build...[0m
for /f %%i in ('dir /a:d /b Release\MuPDFCoreTests\*') do rd /s /q Release\MuPDFCoreTests\%%i
del Release\MuPDFCoreTests\* /s /f /q 1>nul
echo.
echo [104;97mCopying common resources...[0m
xcopy Resources\* Release\MuPDFCoreTests\ /s /y /h >nul
echo.
echo Building with target [94mwin-x64[0m
cd MuPDFCoreTestHost
dotnet publish -c Release /p:PublishProfile=Properties\PublishProfiles\win-x64.pubxml
cd ..
echo.
echo [104;97mCreating ZIP file...[0m
cd Release\MuPDFCoreTests
move win-x64 MuPDFCoreTests-win-x64
bash -c "zip -r MuPDFCoreTests-win-x64.zip MuPDFCoreTests-win-x64 >/dev/null"
for /f %%i in ('dir /a:d /b "MuPDFCoreTests-win-x64"\*') do rd /s /q "MuPDFCoreTests-win-x64"\%%i
del MuPDFCoreTests-win-x64\* /s /f /q 1>nul
rmdir MuPDFCoreTests-win-x64
cd ..\..
echo.
echo Building with target [94mwin-x86[0m
cd MuPDFCoreTestHost
dotnet publish -c Release /p:PublishProfile=Properties\PublishProfiles\win-x86.pubxml /p:PlatformTarget=x86
cd ..
echo.
echo [104;97mCreating ZIP file...[0m
cd Release\MuPDFCoreTests
move win-x86 MuPDFCoreTests-win-x86
bash -c "zip -r MuPDFCoreTests-win-x86.zip MuPDFCoreTests-win-x86 >/dev/null"
for /f %%i in ('dir /a:d /b "MuPDFCoreTests-win-x86"\*') do rd /s /q "MuPDFCoreTests-win-x86"\%%i
del MuPDFCoreTests-win-x86\* /s /f /q 1>nul
rmdir MuPDFCoreTests-win-x86
cd ..\..
echo.
echo Building with target [94mwin-arm64[0m
cd MuPDFCoreTestHost
dotnet publish -c Release /p:PublishProfile=Properties\PublishProfiles\win-arm64.pubxml /p:PlatformTarget=arm64
cd ..
echo.
echo [104;97mCreating ZIP file...[0m
cd Release\MuPDFCoreTests
move win-arm64 MuPDFCoreTests-win-arm64
bash -c "zip -r MuPDFCoreTests-win-arm64.zip MuPDFCoreTests-win-arm64 >/dev/null"
for /f %%i in ('dir /a:d /b "MuPDFCoreTests-win-arm64"\*') do rd /s /q "MuPDFCoreTests-win-arm64"\%%i
del MuPDFCoreTests-win-arm64\* /s /f /q 1>nul
rmdir MuPDFCoreTests-win-arm64
cd ..\..
echo.
echo Building with target [94mlinux-x64[0m
cd MuPDFCoreTestHost
dotnet publish -c Release /p:PublishProfile=Properties\PublishProfiles\linux-x64.pubxml
cd ..
echo.
echo [104;97mCreating tarball...[0m
cd Release\MuPDFCoreTests
move linux-x64 MuPDFCoreTests-linux-x64
bash -c "tar -czf MuPDFCoreTests-linux-x64.tar.gz MuPDFCoreTests-linux-x64"
for /f %%i in ('dir /a:d /b "MuPDFCoreTests-linux-x64"\*') do rd /s /q "MuPDFCoreTests-linux-x64"\%%i
del MuPDFCoreTests-linux-x64\* /s /f /q 1>nul
rmdir MuPDFCoreTests-linux-x64
cd ..\..
echo.
echo Building with target [94mlinux-musl-x64[0m
cd MuPDFCoreTestHost
dotnet publish -c Release /p:PublishProfile=Properties\PublishProfiles\linux-musl-x64.pubxml
cd ..
echo.
echo [104;97mCreating tarball...[0m
cd Release\MuPDFCoreTests
move linux-musl-x64 MuPDFCoreTests-linux-musl-x64
bash -c "tar -czf MuPDFCoreTests-linux-musl-x64.tar.gz MuPDFCoreTests-linux-musl-x64"
for /f %%i in ('dir /a:d /b "MuPDFCoreTests-linux-musl-x64"\*') do rd /s /q "MuPDFCoreTests-linux-musl-x64"\%%i
del MuPDFCoreTests-linux-musl-x64\* /s /f /q 1>nul
rmdir MuPDFCoreTests-linux-musl-x64
cd ..\..
echo.
echo Building with target [94mlinux-arm64[0m
cd MuPDFCoreTestHost
dotnet publish -c Release /p:PublishProfile=Properties\PublishProfiles\linux-arm64.pubxml /p:PlatformTarget=arm64
cd ..
echo.
echo [104;97mCreating tarball...[0m
cd Release\MuPDFCoreTests
move linux-arm64 MuPDFCoreTests-linux-arm64
bash -c "tar -czf MuPDFCoreTests-linux-arm64.tar.gz MuPDFCoreTests-linux-arm64"
for /f %%i in ('dir /a:d /b "MuPDFCoreTests-linux-arm64"\*') do rd /s /q "MuPDFCoreTests-linux-arm64"\%%i
del MuPDFCoreTests-linux-arm64\* /s /f /q 1>nul
rmdir MuPDFCoreTests-linux-arm64
cd ..\..
echo.
echo Building with target [94mlinux-musl-arm64[0m
cd MuPDFCoreTestHost
dotnet publish -c Release /p:PublishProfile=Properties\PublishProfiles\linux-musl-arm64.pubxml
cd ..
echo.
echo [104;97mCreating tarball...[0m
cd Release\MuPDFCoreTests
move linux-musl-arm64 MuPDFCoreTests-linux-musl-arm64
bash -c "tar -czf MuPDFCoreTests-linux-musl-arm64.tar.gz MuPDFCoreTests-linux-musl-arm64"
for /f %%i in ('dir /a:d /b "MuPDFCoreTests-linux-musl-arm64"\*') do rd /s /q "MuPDFCoreTests-linux-musl-arm64"\%%i
del MuPDFCoreTests-linux-musl-arm64\* /s /f /q 1>nul
rmdir MuPDFCoreTests-linux-musl-arm64
cd ..\..
echo.
echo Building with target [94mmac-x64[0m
cd MuPDFCoreTestHost
dotnet publish -c Release /p:PublishProfile=Properties\PublishProfiles\mac-x64.pubxml
cd ..
echo.
echo [104;97mCreating ZIP file...[0m
cd Release\MuPDFCoreTests
move mac-x64 MuPDFCoreTests-mac-x64
bash -c "zip -r MuPDFCoreTests-mac-x64.zip MuPDFCoreTests-mac-x64 >/dev/null"
for /f %%i in ('dir /a:d /b "MuPDFCoreTests-mac-x64"\*') do rd /s /q "MuPDFCoreTests-mac-x64"\%%i
del MuPDFCoreTests-mac-x64\* /s /f /q 1>nul
rmdir MuPDFCoreTests-mac-x64
cd ..\..
echo.
echo Building with target [94mmac-arm64[0m
cd MuPDFCoreTestHost
dotnet publish -c Release /p:PublishProfile=Properties\PublishProfiles\mac-arm64.pubxml /p:PlatformTarget=arm64
cd ..
echo.
echo [104;97mCreating ZIP file...[0m
cd Release\MuPDFCoreTests
move mac-arm64 MuPDFCoreTests-mac-arm64
bash -c "zip -r MuPDFCoreTests-mac-arm64.zip MuPDFCoreTests-mac-arm64 >/dev/null"
for /f %%i in ('dir /a:d /b "MuPDFCoreTests-mac-arm64"\*') do rd /s /q "MuPDFCoreTests-mac-arm64"\%%i
del MuPDFCoreTests-mac-arm64\* /s /f /q 1>nul
rmdir MuPDFCoreTests-mac-arm64
cd ..\..
echo.
echo [94mAll done![0m