forked from idrassi/HashCheck
-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
72 lines (64 loc) · 3.89 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
version: 2.5.0.1
image: Visual Studio 2019
cache:
- packages -> **\packages.config
before_build:
- cd "%APPVEYOR_BUILD_FOLDER%"
- nuget restore
build_script:
- cd "%APPVEYOR_BUILD_FOLDER%"
# the NO_PPL (no-multithreading) debug versions
- msbuild HashCheck.sln /p:Configuration=Debug;Platform=Win32;TempCDefines=NO_PPL /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
- msbuild HashCheck.sln /p:Configuration=Debug;Platform=x64;TempCDefines=NO_PPL /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
- copy Bin\Win32\Debug\HashCheck.dll Bin\Win32\Debug\HashCheck-no_ppl.dll
- copy Bin\x64\Debug\HashCheck.dll Bin\x64\Debug\HashCheck-no_ppl.dll
# the FORCE_PPL debug versions
- msbuild HashCheck.sln /p:Configuration=Debug;Platform=Win32;TempCDefines=FORCE_PPL /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
- msbuild HashCheck.sln /p:Configuration=Debug;Platform=x64;TempCDefines=FORCE_PPL /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
# the release versions
- msbuild HashCheck.sln /p:Configuration=Release;Platform=Win32 /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
- msbuild HashCheck.sln /p:Configuration=Release;Platform=x64 /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
before_test:
- cd "%APPVEYOR_BUILD_FOLDER%\UnitTests"
- C:\Python35-x64\python get-sha-test-vectors.py
- C:\Python35-x64\python get-md5-test-vectors.py
- C:\Python35-x64\python gen-big-test-vector.py
# tests for disambiguating vectors of the same bit length
- copy vectors\SHA256ShortMsg.rsp.sha256 vectors\SHA256ShortMsg.rsp.asc
- copy vectors\SHA3_256ShortMsg.rsp.sha3-256 vectors\SHA3_256ShortMsg.rsp.asc
# negative tests
- copy mismatch.sha256 vectors\
- copy mismatch.sha256 vectors\mismatch.asc
- copy unreadable.sha256 vectors\
test_script:
- cd "%APPVEYOR_BUILD_FOLDER%"
# the NO_PPL versions
- regsvr32 /i:"NoCopy NoUninstall" /n /s Bin\Win32\Debug\HashCheck-no_ppl.dll
- packages\xunit.runner.console.2.1.0\tools\xunit.console.x86 UnitTests\bin\Release\UnitTests.dll -appveyor
- regsvr32 /i:"NoCopy NoUninstall" /n /s Bin\x64\Debug\HashCheck-no_ppl.dll
- packages\xunit.runner.console.2.1.0\tools\xunit.console UnitTests\bin\Release\UnitTests.dll -appveyor
# the FORCE_PPL versions (before each test, delete the NO_PPL version to ensure it's not under test)
- regsvr32 /i:"NoCopy NoUninstall" /n /s Bin\Win32\Debug\HashCheck.dll
- del Bin\Win32\Debug\HashCheck-no_ppl.dll
- packages\xunit.runner.console.2.1.0\tools\xunit.console.x86 UnitTests\bin\Release\UnitTests.dll -appveyor
- regsvr32 /i:"NoCopy NoUninstall" /n /s Bin\x64\Debug\HashCheck.dll
- del Bin\x64\Debug\HashCheck-no_ppl.dll
- packages\xunit.runner.console.2.1.0\tools\xunit.console UnitTests\bin\Release\UnitTests.dll -appveyor
# the release versions (before each test, delete the FORCE_PPL version to ensure it's not under test)
- regsvr32 /i /n /s Bin\Win32\Release\HashCheck.dll
- del Bin\Win32\Debug\HashCheck.dll
- packages\xunit.runner.console.2.1.0\tools\xunit.console.x86 UnitTests\bin\Release\UnitTests.dll -appveyor
- regsvr32 /i /n /s Bin\x64\Release\HashCheck.dll
- del Bin\x64\Debug\HashCheck.dll
- packages\xunit.runner.console.2.1.0\tools\xunit.console UnitTests\bin\Release\UnitTests.dll -appveyor
after_test:
- cd "%APPVEYOR_BUILD_FOLDER%\installer"
- '"C:\Program Files (x86)\NSIS\makensis" HashCheck.nsi'
- copy HashCheckSetup-v*.exe "%APPVEYOR_BUILD_FOLDER%"
- ps: (Get-FileHash -Algorithm SHA256 HashCheckSetup-v*.exe).Hash.ToString().ToLower() + " *" + (dir HashCheckSetup-v*.exe).Name > ((dir HashCheckSetup-v*.exe).Name + ".sha256")
- copy HashCheckSetup-v*.exe.sha256 "%APPVEYOR_BUILD_FOLDER%"
artifacts:
- path: 'HashCheckSetup-v*.exe'
name: installer
- path: 'HashCheckSetup-v*.exe.sha256'
name: checksum