@@ -203,3 +203,85 @@ jobs:
203203 if : ${{ failure() && (matrix.os == 'macos-latest') }}
204204 run : |
205205 DYLD_PRINT_LIBRARIES=1 ${{ github.workspace }}/test/.libs/libbitcoin-protocol-test
206+
207+ verify-sln :
208+ strategy :
209+ fail-fast : false
210+
211+ matrix :
212+ include :
213+ - os : windows-latest
214+ configuration : " StaticRelease"
215+ platform : " Win32"
216+ version : " vs2022"
217+
218+ - os : windows-latest
219+ configuration : " StaticDebug"
220+ platform : " Win32"
221+ version : " vs2022"
222+
223+ - os : windows-latest
224+ configuration : " StaticRelease"
225+ platform : " x64"
226+ version : " vs2022"
227+
228+ - os : windows-latest
229+ configuration : " StaticDebug"
230+ platform : " x64"
231+ version : " vs2022"
232+
233+ runs-on : ${{ matrix.os }}
234+
235+ steps :
236+ - name : Add msbuild to PATH
237+ uses : microsoft/setup-msbuild@v1.1
238+
239+ - name : Checkout repository
240+ uses : actions/checkout@v2
241+
242+ - name : Initialize SDK
243+ shell : powershell
244+ run : |
245+ try {
246+ Invoke-WebRequest -Uri "https://go.microsoft.com/fwlink/p/?LinkId=323507" -OutFile "sdksetup.exe"
247+
248+ $FeatureList = "OptionId.WindowsDesktopSoftwareDevelopmentKit OptionId.NetFxSoftwareDevelopmentKit"
249+ $Args = "/q /norestart /features $FeatureList"
250+ $setup = Start-Process -PassThru -FilePath "sdksetup.exe" -ArgumentList $Args
251+
252+ $setup.WaitForExit()
253+ if ($setup.ExitCode -ne 0) {
254+ Write-Host "Test execution failure: " $setup.ExitCode -ForegroundColor Red;
255+ exit $setup.ExitCode;
256+ }
257+ }
258+ catch {
259+ $ERR = $_;
260+ Write-Host "Initialization failure: " $ERR -ForegroundColor Red;
261+ exit $ERR;
262+ }
263+
264+ - name : Execute build
265+ run : .\build.cmd .. ${{ matrix.platform }} ${{ matrix.configuration }} ${{ matrix.version }}
266+
267+ - name : Execute tests
268+ shell : powershell
269+ run : |
270+ Write-Host "Locating test executables..." -ForegroundColor Yellow;
271+ $BC_TEST_EXES = @(Get-ChildItem -Path "$env:${{ github.workspace }}\bin" -recurse | Where-Object { $_.Name -eq "libbitcoin-protocol-test.exe" });
272+ If ($BC_TEST_EXES.Count -ne 1) {
273+ Write-Host "Failure, invalid count of test executables." -ForegroundColor Red;
274+ exit 1;
275+ }
276+ Write-Host "Found single test executable: " $BC_TEST_EXES.FullName -ForegroundColor Green;
277+ $BC_TEST_SINGLETON = $BC_TEST_EXES.FullName;
278+ Write-Host "Executing $BC_TEST_SINGLETON $env:BOOST_UNIT_TEST_OPTIONS" -ForegroundColor Yellow;
279+ try {
280+ Invoke-Expression "$BC_TEST_SINGLETON $env:BOOST_UNIT_TEST_OPTIONS"
281+ }
282+ catch {
283+ $ERR = $_;
284+ Write-Host "Test execution failure: " $ERR -ForegroundColor Red;
285+ exit $ERR;
286+ }
287+ Write-Host "Test execution complete." -ForegroundColor Green;
0 commit comments