forked from uxmal/pytocs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathappveyor.yml
53 lines (43 loc) · 2.15 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
version: 1.1.0.{build}
init:
- git config --global core.autocrlf true
image: Visual Studio 2017
platform: Any CPU
configuration: Debug
build:
project: src/pytocs.sln
verbosity: minimal
environment:
artifacts_dir: bin
before_build:
- nuget restore src/pytocs.sln
after_build:
- ps : >-
$shortHash = $env:APPVEYOR_REPO_COMMIT.Substring(0, 10);
$versionCli = ls ./src/Cli/bin/$env:CONFIGURATION/net471/pytocs.exe | % VersionInfo | % ProductVersion;
$versionGui = ls ./src/Gui/bin/$env:CONFIGURATION/net471/Pytocs.Gui.exe | % VersionInfo | % ProductVersion;
mkdir $env:artifacts_dir;
;
<# zip pytocs.exe, append version and short hash #>;
"[after_build] compressing pytocs.exe (.NET Framework)...";
cp -r ./assets/cli-full ./src/Cli/bin/$env:CONFIGURATION/net471/.;
7z a $env:artifacts_dir/pytocs-cli-net471-$versionCli-$shortHash.zip ./src/Cli/bin/$env:CONFIGURATION/net471/.;
"[after_build] compressing pytocs.dll (.NET Core)...";
cp -r ./assets/cli-core ./src/Cli/bin/$env:CONFIGURATION/netcoreapp2.1/.;
7z a $env:artifacts_dir/pytocs-cli-netcore21-$versionCli-$shortHash.zip ./src/Cli/bin/$env:CONFIGURATION/netcoreapp2.1/.;
;
<# zip Pytocs.Gui.exe, append version and short hash #>;
"[after_build] compressing Pytocs.Gui (.NET Framework)...";
cp -r ./assets/gui-full ./src/Gui/bin/$env:CONFIGURATION/net471/.;
7z a $env:artifacts_dir/pytocs-gui-net471-$versionGui-$shortHash.zip ./src/Gui/bin/$env:CONFIGURATION/net471/.;
"[after_build] compressing Pytocs.Gui (.NET Core)...";
cp -r ./assets/gui-core ./src/Gui/bin/$env:CONFIGURATION/netcoreapp2.1/.;
7z a $env:artifacts_dir/pytocs-gui-netcore21-$versionGui-$shortHash.zip ./src/Gui/bin/$env:CONFIGURATION/netcoreapp2.1/.;
;
test_script:
- cmd: dir /s .\src\Core\bin\%CONFIGURATION%
- cmd: '%xunit20%\xunit.console ./src/Pytocs.Tests/bin/%CONFIGURATION%/net471/Pytocs.UnitTests.dll -appveyor'
# - cmd: python ./subjects/regressionTests.py --check-output --configuration=%CONFIGURATION%
artifacts:
- path: '**\Pytocs-*.zip'
name: Pytocs executables