Update Toolbar icons to modern SVG style and fix Unicode file execution #10
Workflow file for this run
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: PR Build | |
| on: | |
| pull_request: | |
| types: [opened, synchronize, reopened, ready_for_review] | |
| branches: ["**"] | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: pr-msbuild-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| name: Build ${{ matrix.platform }} Debug (fail on warnings) | |
| runs-on: windows-2022 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| platform: ["Win32", "x64"] | |
| defaults: | |
| run: | |
| shell: pwsh | |
| working-directory: s | |
| env: | |
| BUILD_CONFIGURATION: Debug | |
| SOLUTION_PATH: '.\src\vcxproj\salamand.sln' | |
| LOG_DIRECTORY: build_logs | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| path: s | |
| - name: Setup MSBuild in PATH (VS2022) | |
| uses: microsoft/setup-msbuild@v2 | |
| - name: Setup MSVC Developer Command Prompt (x64 toolchain) | |
| uses: ilammy/msvc-dev-cmd@v1 | |
| with: | |
| arch: x64 | |
| - name: Register MSVC problem matcher | |
| uses: ammaraskar/msvc-problem-matcher@master | |
| - name: Build via MSBuild (Debug | ${{ matrix.platform }}) | |
| run: | | |
| $logDir = Join-Path (Get-Location) $env:LOG_DIRECTORY | |
| New-Item -ItemType Directory -Force -Path $logDir | Out-Null | |
| $suffix = "${{ matrix.platform }}-run$($env:GITHUB_RUN_NUMBER)" | |
| $txtLog = Join-Path $logDir "msbuild-$($env:BUILD_CONFIGURATION)-$suffix.log" | |
| Add-Content -Path $env:GITHUB_ENV -Value "LOG_PATH=$txtLog" | |
| $arguments = @( | |
| $env:SOLUTION_PATH | |
| '/m' | |
| '/t:Rebuild' | |
| "/p:Configuration=$($env:BUILD_CONFIGURATION)" | |
| "/p:Platform=${{ matrix.platform }}" | |
| '/p:PreferredToolArchitecture=x64' | |
| '/warnaserror' | |
| '/nr:false' | |
| '/v:m' | |
| ) | |
| msbuild @arguments 2>&1 | Tee-Object -FilePath $txtLog -Encoding UTF8 | |
| if ($LASTEXITCODE -ne 0) { | |
| Write-Host "MSBuild failed with exit code $LASTEXITCODE" | |
| exit $LASTEXITCODE | |
| } | |
| - name: Upload build logs | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: msbuild-${{ matrix.platform }}-debug-logs | |
| path: | | |
| ${{ env.LOG_PATH }} | |
| if-no-files-found: warn |