Light theme: one palette owns every colour, and the title bar chooses… #1216
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: Build | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| # One run per pull request: pushing several commits supersedes the earlier runs, | |
| # so only the state that will actually be reviewed and merged is built — which | |
| # matters more now that a run also publishes and compiles the installer. | |
| # | |
| # Pushes to main deliberately get a group of their own (run_id is unique), so | |
| # they never queue behind each other. Sharing one group and merely setting | |
| # cancel-in-progress: false is NOT enough: a concurrency group holds at most one | |
| # running plus one pending run, so a third push evicts the pending one and a | |
| # quick series of merges would leave a commit with no build result at all. | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }} | |
| cancel-in-progress: ${{ github.event_name == 'pull_request' }} | |
| permissions: | |
| contents: read | |
| jobs: | |
| build: | |
| runs-on: windows-latest | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - name: Determine version | |
| id: version | |
| shell: pwsh | |
| run: | | |
| $latestTag = git describe --tags --match "v*" --abbrev=0 2>$null | |
| if ($LASTEXITCODE -eq 0 -and $latestTag) { | |
| $baseVersion = $latestTag.TrimStart('v') | |
| $commitCount = [int](git rev-list "$latestTag..HEAD" --count) | |
| } else { | |
| $baseVersion = "0.1.0" | |
| $commitCount = [int](git rev-list HEAD --count) | |
| } | |
| $version = if ($commitCount -eq 0 -and $latestTag) { | |
| $baseVersion | |
| } else { | |
| $parts = $baseVersion.Split('.') | |
| $major = [int]$parts[0] | |
| $minor = if ($parts.Length -gt 1) { [int]$parts[1] } else { 0 } | |
| $patch = if ($parts.Length -gt 2) { [int]$parts[2] } else { 0 } | |
| "$major.$minor.$($patch + 1)-dev.$commitCount" | |
| } | |
| "version=$version" >> $env:GITHUB_OUTPUT | |
| - name: Set up .NET | |
| uses: actions/setup-dotnet@v5 | |
| with: | |
| global-json-file: global.json | |
| - name: Restore | |
| run: dotnet restore source/Resonalyze.sln -p:Version="${{ steps.version.outputs.version }}" -p:InformationalVersion="${{ steps.version.outputs.version }}" | |
| - name: Build | |
| run: dotnet build source/Resonalyze.sln --configuration Release --no-restore -p:Version="${{ steps.version.outputs.version }}" -p:InformationalVersion="${{ steps.version.outputs.version }}" | |
| # Every suite filters Category!=Hardware. The hardware tests skip | |
| # themselves without endpoint environment variables, but excluding them | |
| # here keeps a runner with no audio devices from listing nine skips on | |
| # every run. | |
| - name: Test App | |
| run: dotnet test tests/Resonalyze.App.Tests/Resonalyze.App.Tests.csproj --configuration Release --no-build --no-restore --filter "Category!=Hardware" | |
| - name: Test Audio | |
| run: dotnet test tests/Resonalyze.Audio.Tests/Resonalyze.Audio.Tests.csproj --configuration Release --no-build --no-restore --filter "Category!=Hardware" | |
| - name: Test DSP | |
| run: dotnet test tests/Resonalyze.Dsp.Tests/Resonalyze.Dsp.Tests.csproj --configuration Release --no-build --no-restore --filter "Category!=Hardware" | |
| # The single-file publish and the installer script are exercised here so a | |
| # break shows up on the PR. Until this step existed they were first run by | |
| # the release job, which holds the appcast signing key — a bad place to | |
| # discover that Resonalyze.iss no longer compiles. | |
| - name: Publish (single file) | |
| id: publish | |
| shell: pwsh | |
| run: | | |
| $version = "${{ steps.version.outputs.version }}" | |
| $publishDirectory = Join-Path $env:RUNNER_TEMP "publish-check" | |
| # Mirrors the release publish, minus the signing key: this step exists to | |
| # prove the single-file publish still works, not to produce an artifact. | |
| dotnet publish source/Resonalyze.csproj ` | |
| --configuration Release ` | |
| --runtime win-x64 ` | |
| --self-contained true ` | |
| --output $publishDirectory ` | |
| -p:Version=$version ` | |
| -p:InformationalVersion=$version ` | |
| -p:PublishSingleFile=true ` | |
| -p:IncludeNativeLibrariesForSelfExtract=true ` | |
| -p:DebugType=None ` | |
| -p:DebugSymbols=false | |
| if ($LASTEXITCODE -ne 0) { | |
| exit $LASTEXITCODE | |
| } | |
| "publish_directory=$publishDirectory" >> $env:GITHUB_OUTPUT | |
| - name: Compile installer | |
| shell: pwsh | |
| run: | | |
| choco install innosetup --no-progress -y | |
| if ($LASTEXITCODE -ne 0) { | |
| exit $LASTEXITCODE | |
| } | |
| & "${env:ProgramFiles(x86)}\Inno Setup 6\ISCC.exe" ` | |
| installer\Resonalyze.iss ` | |
| "/DAppVersion=${{ steps.version.outputs.version }}" ` | |
| "/DSourceDir=${{ steps.publish.outputs.publish_directory }}" ` | |
| "/DOutputDir=$(Join-Path $env:RUNNER_TEMP 'installer-check')" ` | |
| "/DOutputBaseFilename=Resonalyze-Setup-check" | |
| if ($LASTEXITCODE -ne 0) { | |
| exit $LASTEXITCODE | |
| } |