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