-
Notifications
You must be signed in to change notification settings - Fork 167
/
appveyor.yml
48 lines (38 loc) · 1.66 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
version: 2.0.1.{build}
init:
- git config --global core.autocrlf true
image: Visual Studio 2022
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/net6.0/pytocs.exe | % VersionInfo | % ProductVersion;
$versionGui = ls ./src/Gui/bin/$env:CONFIGURATION/net6.0/Pytocs.Gui.exe | % VersionInfo | % ProductVersion;
mkdir $env:artifacts_dir;
;
<# zip pytocs.exe, append version and short hash #>;
"[after_build] compressing pytocs.exe (.NET 6.0)...";
cp -r ./assets/cli-full ./src/Cli/bin/$env:CONFIGURATION/net6.0/.;
7z a $env:artifacts_dir/pytocs-cli-net6.0-$versionCli-$shortHash.zip ./src/Cli/bin/$env:CONFIGURATION/net6.0/.;
;
<# zip Pytocs.Gui.exe, append version and short hash #>;
"[after_build] compressing Pytocs.Gui (.NET 6.0)...";
cp -r ./assets/gui-full ./src/Gui/bin/$env:CONFIGURATION/net6.0/.;
7z a $env:artifacts_dir/pytocs-gui-net6.0-$versionGui-$shortHash.zip ./src/Gui/bin/$env:CONFIGURATION/net6.0/.;
;
test_script:
- cmd: dir /s .\src\Core\bin\%CONFIGURATION%
- cmd: 'dotnet test ./src/Pytocs.Tests/UnitTests.csproj'
# - cmd: '%xunit20%\xunit.console ./src/Pytocs.Tests/bin/%CONFIGURATION%/net6.0/Pytocs.UnitTests.dll -appveyor'
# - cmd: python ./subjects/regressionTests.py --check-output --configuration=%CONFIGURATION%
artifacts:
- path: '**\Pytocs-*.zip'
name: Pytocs executables