build.yml 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. name: Build
  2. on:
  3. push:
  4. branches: [main]
  5. paths-ignore:
  6. - '**.md'
  7. - 'docs/**'
  8. pull_request:
  9. paths-ignore:
  10. - '**.md'
  11. - 'docs/**'
  12. workflow_dispatch:
  13. permissions:
  14. contents: read
  15. jobs:
  16. windows:
  17. name: Windows Release
  18. runs-on: windows-latest
  19. timeout-minutes: 20
  20. steps:
  21. - name: Checkout source and pinned dependencies
  22. uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
  23. with:
  24. submodules: recursive
  25. - name: Set up .NET SDK
  26. uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6.0.0
  27. with:
  28. dotnet-version: 9.0.x
  29. - name: Build public single executable
  30. shell: pwsh
  31. run: ./tools/Build.ps1
  32. - name: Build runtime checks
  33. shell: pwsh
  34. run: dotnet build ./tools/SmokeTest/SmokeTest.csproj -c Release -v:minimal
  35. - name: Check themes and public executable
  36. shell: powershell
  37. run: |
  38. $launcher = Join-Path $env:GITHUB_WORKSPACE 'artifacts\PCL-Communist-2.99.0.0\PCL Communist.exe'
  39. $hostExe = Join-Path $env:GITHUB_WORKSPACE 'tools\SmokeTest\bin\Release\net48\SmokeTest.exe'
  40. $results = Join-Path $env:RUNNER_TEMP 'pcl-runtime-results'
  41. $testArguments = '"' + $launcher + '" "' + $results + '"'
  42. ./tools/Test-IsolatedProcess.ps1 -Executable $hostExe -ArgumentLine $testArguments -OutputDirectory $results -TimeoutSeconds 60
  43. Get-Content -LiteralPath (Join-Path $results 'test-console.txt')
  44. - name: Check standalone startup
  45. shell: powershell
  46. run: |
  47. $fixture = Join-Path $env:RUNNER_TEMP 'pcl-standalone'
  48. New-Item -ItemType Directory -Path $fixture | Out-Null
  49. Copy-Item -LiteralPath './artifacts/PCL-Communist-2.99.0.0/PCL Communist.exe' -Destination $fixture
  50. ./tools/Test-IsolatedProcess.ps1 -Executable (Join-Path $fixture 'PCL Communist.exe') -OutputDirectory (Join-Path $env:RUNNER_TEMP 'pcl-startup-results') -TimeoutSeconds 10 -ExpectMainWindow
  51. - name: Upload executable
  52. uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
  53. with:
  54. name: PCL-Communist
  55. path: artifacts/PCL-Communist-2.99.0.0/PCL Communist.exe
  56. if-no-files-found: error
  57. - name: Upload runtime diagnostics
  58. if: failure()
  59. uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
  60. with:
  61. name: runtime-diagnostics
  62. path: |
  63. ${{ runner.temp }}/pcl-runtime-results
  64. ${{ runner.temp }}/pcl-startup-results
  65. if-no-files-found: ignore