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