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