From 142f7efba7bddc8cdf9bc6fe4819b7e858197671 Mon Sep 17 00:00:00 2001 From: Calvin Grunewald Date: Wed, 2 Sep 2026 19:22:56 -0700 Subject: [PATCH] Fix Windows installer fixture --- .github/workflows/installer-smoke-test.yml | 4 ++-- scripts/create-windows-fixtures.ps1 | 7 ++++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/installer-smoke-test.yml b/.github/workflows/installer-smoke-test.yml index 3633acc..514b629 100644 --- a/.github/workflows/installer-smoke-test.yml +++ b/.github/workflows/installer-smoke-test.yml @@ -24,7 +24,7 @@ jobs: shell_name: fish completion_file: .config/fish/completions/archdev.fish steps: - - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Build fixture release run: | chmod +x install.sh scripts/create-unix-fixtures.sh @@ -60,7 +60,7 @@ jobs: name: Windows Installer runs-on: windows-latest steps: - - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Build fixture release shell: pwsh run: ./scripts/create-windows-fixtures.ps1 -OutputDir "$env:RUNNER_TEMP\release" -Version 0.31.0 diff --git a/scripts/create-windows-fixtures.ps1 b/scripts/create-windows-fixtures.ps1 index 8608cbf..19cd422 100644 --- a/scripts/create-windows-fixtures.ps1 +++ b/scripts/create-windows-fixtures.ps1 @@ -16,7 +16,12 @@ public static class Program { $FixtureBinaryRoot = Join-Path ([IO.Path]::GetTempPath()) ("archdev-fixture-bin-" + [Guid]::NewGuid().ToString("N")) New-Item -ItemType Directory -Path $FixtureBinaryRoot | Out-Null $FixtureBinary = Join-Path $FixtureBinaryRoot "archdev.exe" -Add-Type -TypeDefinition $Source -OutputAssembly $FixtureBinary -OutputType ConsoleApplication +$SourcePath = Join-Path $FixtureBinaryRoot "Program.cs" +$Compiler = Join-Path $env:WINDIR "Microsoft.NET\Framework64\v4.0.30319\csc.exe" +if (-not (Test-Path $Compiler)) { throw "Windows C# compiler not found at $Compiler" } +Set-Content -Path $SourcePath -Value $Source +& $Compiler /nologo /target:exe "/out:$FixtureBinary" $SourcePath +if ($LASTEXITCODE -ne 0) { throw "Windows fixture compilation failed" } foreach ($Arch in @("arm64", "x64")) { $Fixture = Join-Path ([IO.Path]::GetTempPath()) ("archdev-fixture-" + [Guid]::NewGuid().ToString("N")) New-Item -ItemType Directory -Path $Fixture | Out-Null