ReviewOS

also looking at this

craft-native/craft

fix(ci): unblock the three failing native lifecycle legs

#37
Merged glennmichael123 wants to merge fix/native-lifecycle-and-release into main
4 files +130 -20
.github/workflows/native-lifecycle.ymlmodified+29-9
Changes to .github/workflows/native-lifecycle.yml
@@ -30,18 +30,19 @@ jobs:
3030 fail-fast: false
3131 matrix:
3232 include:
33 # `name` is the whole identity of a leg: it is the evidence label the
34 # script writes under, the artifact name, and the path the upload
35 # reads back. It used to be two fields, `name` and `report`, and they
36 # disagreed on Windows — the script wrote windows-x64/ while the
37 # upload looked in win32-x64/ and failed with "No files were found".
3338 - os: macos-15
3439 name: darwin-arm64
35 report: darwin-arm64
3640 - os: macos-15-intel
3741 name: darwin-x64
38 report: darwin-x64
3942 - os: ubuntu-24.04
4043 name: linux-x64
41 report: linux-x64
4244 - os: windows-2025
4345 name: windows-x64
44 report: win32-x64
4546 runs-on: ${{ matrix.os }}
4647 timeout-minutes: 30
4748 env:
@@ -60,9 +61,28 @@ jobs:
6061 if: runner.os == 'Windows'
6162 shell: pwsh
6263 run: |
63 choco install wixtoolset --version=3.14.1 --yes --no-progress
64 $bin = Get-ChildItem "${env:ProgramFiles(x86)}\WiX Toolset v3*\bin" -Directory | Select-Object -First 1
65 if (-not $bin) { throw 'WiX Toolset bin directory not found' }
64 # The windows-2025 image already ships WiX v3 — 3.14.1.20250415 as of
65 # this writing — and `choco install --version=3.14.1` is a *downgrade*
66 # against it, which choco refuses:
67 #
68 # A newer version of wixtoolset (v3.14.1.20250415) is already installed.
69 # Chocolatey installed 0/1 packages. 1 packages failed.
70 #
71 # So the step failed before it ever looked for the toolset it needed,
72 # and every Windows lifecycle run died at setup. Look first, install
73 # only when it is genuinely absent, and take whatever v3 the image
74 # provides rather than pinning under it.
75 $wixBin = {
76 Get-ChildItem "${env:ProgramFiles(x86)}\WiX Toolset v3*\bin" -Directory -ErrorAction SilentlyContinue |
77 Sort-Object Name -Descending | Select-Object -First 1
78 }
79 $bin = & $wixBin
80 if (-not $bin) {
81 choco install wixtoolset --version=3.14.1 --yes --no-progress
82 $bin = & $wixBin
83 }
84 if (-not $bin) { throw 'WiX Toolset v3 bin directory not found' }
85 Write-Host "Using WiX at $($bin.FullName)"
6686 $bin.FullName | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
6787
6888 - name: Test packaging API
renamed throughout · 9 hidden lines
Changes to .github/workflows/native-lifecycle.yml
@@ -77,7 +97,7 @@ jobs: renamed throughout
7797 with:
7898 name: native-lifecycle-${{ matrix.name }}
7999 path: |
80 artifacts/native-lifecycle/${{ matrix.report }}/report.json
81 artifacts/native-lifecycle/${{ matrix.report }}/work/packages-*/**
100 artifacts/native-lifecycle/${{ matrix.name }}/report.json
101 artifacts/native-lifecycle/${{ matrix.name }}/work/packages-*/**
82102 if-no-files-found: error
83103 retention-days: 90