Implementing generate attackers function (#74)
#42
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Windows Build Test | |
| on: | |
| push: | |
| workflow_dispatch: | |
| jobs: | |
| windows-build: | |
| runs-on: windows-2022 | |
| strategy: | |
| matrix: | |
| preset: [ msvc_debug, msvc_release ] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Cache VCPKG | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| C:\vcpkg\installed | |
| C:\vcpkg\packages | |
| C:\vcpkg\buildtrees | |
| ~\AppData\Local\vcpkg\archives | |
| key: ${{ runner.os }}-vcpkg-${{ matrix.preset }}-${{ hashFiles('vcpkg.json') }} | |
| restore-keys: ${{ runner.os }}-vcpkg- | |
| - name: Cache build | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| build/${{ matrix.preset }} | |
| key: ${{ runner.os }}-cmake-${{ matrix.preset }}-${{ hashFiles('CMakeLists.txt', '**/*.cmake') }} | |
| restore-keys: ${{ runner.os }}-cmake- | |
| - name: Configure (${{ matrix.preset }}) | |
| env: | |
| VCPKG_ROOT: C:\vcpkg | |
| shell: pwsh | |
| run: | | |
| $outputFile = "configure_output.txt" | |
| cmake --preset ${{ matrix.preset }} 2>&1 | Tee-Object -FilePath $outputFile | |
| $exitCode = $LASTEXITCODE | |
| if ($exitCode -eq 0) { | |
| Add-Content $env:GITHUB_STEP_SUMMARY "<details><summary>🟢 Configure Results (click to expand)</summary>" | |
| } else { | |
| Add-Content $env:GITHUB_STEP_SUMMARY "## 🔴 Configure Results" | |
| } | |
| Add-Content $env:GITHUB_STEP_SUMMARY "" | |
| Add-Content $env:GITHUB_STEP_SUMMARY '```' | |
| Get-Content $outputFile | Add-Content $env:GITHUB_STEP_SUMMARY | |
| Add-Content $env:GITHUB_STEP_SUMMARY '```' | |
| if ($exitCode -eq 0) { | |
| Add-Content $env:GITHUB_STEP_SUMMARY "</details>" | |
| } | |
| exit $exitCode | |
| - name: Build (${{ matrix.preset }}) | |
| shell: pwsh | |
| run: | | |
| $outputFile = "build_output.txt" | |
| cmake --build --preset ${{ matrix.preset }} 2>&1 | Tee-Object -FilePath $outputFile | |
| $exitCode = $LASTEXITCODE | |
| if ($exitCode -eq 0) { | |
| Add-Content $env:GITHUB_STEP_SUMMARY "<details><summary>🟢 Build Results (click to expand)</summary>" | |
| } else { | |
| Add-Content $env:GITHUB_STEP_SUMMARY "## 🔴 Build Results" | |
| } | |
| Add-Content $env:GITHUB_STEP_SUMMARY "" | |
| Add-Content $env:GITHUB_STEP_SUMMARY '```' | |
| Get-Content $outputFile | Add-Content $env:GITHUB_STEP_SUMMARY | |
| Add-Content $env:GITHUB_STEP_SUMMARY '```' | |
| if ($exitCode -eq 0) { | |
| Add-Content $env:GITHUB_STEP_SUMMARY "</details>" | |
| } | |
| exit $exitCode | |
| - name: Test (${{ matrix.preset }}) | |
| shell: pwsh | |
| run: | | |
| $outputFile = "test_output.txt" | |
| ctest --preset ${{ matrix.preset }} --output-on-failure 2>&1 | Tee-Object -FilePath $outputFile | |
| $exitCode = $LASTEXITCODE | |
| if ($exitCode -eq 0) { | |
| Add-Content $env:GITHUB_STEP_SUMMARY "<details><summary>🟢 Test Results (click to expand)</summary>" | |
| } else { | |
| Add-Content $env:GITHUB_STEP_SUMMARY "## 🔴 Test Results" | |
| } | |
| Add-Content $env:GITHUB_STEP_SUMMARY "" | |
| Add-Content $env:GITHUB_STEP_SUMMARY '```' | |
| Get-Content $outputFile | Add-Content $env:GITHUB_STEP_SUMMARY | |
| Add-Content $env:GITHUB_STEP_SUMMARY '```' | |
| if ($exitCode -eq 0) { | |
| Add-Content $env:GITHUB_STEP_SUMMARY "</details>" | |
| } | |
| exit $exitCode |