mirror of
https://github.com/nestriness/nestri.git
synced 2026-09-19 09:15:19 +03:00
fix(nesdoctor): fall back to the SoC name on Apple Silicon, and print raw probes
The macOS arm added in the previous commit did not change anything -- the runner still reported `gpu=unknown`. Checked rather than assumed, which is the only reason it is known. Two possible causes and no way to choose between them from here: either the `system_profiler SPDisplaysDataType` parsing is wrong, or that machine is a headless virtual Mac with no display adapter to enumerate at all, in which case `unknown` was the correct answer and there is nothing to fix. The second is likely and the first is not ruled out. So, rather than guessing again: on an arm64 Mac the GPU *is* the SoC, so the chip name is a true and useful answer even with no display attached. `sysctl -n machdep.cpu.brand_string` works headless and yields "Apple M1 (integrated)". Intel Macs get no fallback, because there the GPU may be integrated or discrete and a guess would be wrong rather than coarse. And the CI step now dumps the **raw** output of each platform's probes -- `system_profiler`, `Get-CimInstance Win32_VideoController`, `Get-PSDrive`, `df -Pk`, `/sys/class/drm` -- into its own log group. A field that comes back empty can then be told apart from a parser that is wrong, which is exactly the distinction that cost this round trip. All of it is `|| true`: the step exists for looking, and a probe that misbehaves on a runner must never fail a release.
This commit is contained in:
23
.github/workflows/release-nesdoctor.yml
vendored
23
.github/workflows/release-nesdoctor.yml
vendored
@@ -130,6 +130,29 @@ jobs:
|
||||
echo "::group::${{ matrix.target }} — JSON"
|
||||
cat "$RUNNER_TEMP/probe.json" 2>/dev/null || echo "(no json written)"
|
||||
echo "::endgroup::"
|
||||
# The raw output of the platform probes, so a field that comes back
|
||||
# empty can be told apart from a parser that is wrong. `gpu=unknown`
|
||||
# on the macOS runner could be either, and guessing which cost a
|
||||
# round trip.
|
||||
echo "::group::${{ matrix.target }} — raw platform probes"
|
||||
case "${{ runner.os }}" in
|
||||
macOS)
|
||||
system_profiler SPDisplaysDataType 2>&1 | head -40 || true
|
||||
sysctl -n machdep.cpu.brand_string 2>&1 || true
|
||||
df -Pk 2>&1 | head -20 || true
|
||||
;;
|
||||
Windows)
|
||||
powershell -NoProfile -Command \
|
||||
"Get-CimInstance Win32_VideoController | Format-List Name,AdapterCompatibility,AdapterRAM" 2>&1 | head -30 || true
|
||||
powershell -NoProfile -Command \
|
||||
"Get-PSDrive -PSProvider FileSystem | Format-Table Name,Free,Used" 2>&1 | head -20 || true
|
||||
;;
|
||||
Linux)
|
||||
df -Pk 2>&1 | head -20 || true
|
||||
ls -l /sys/class/drm/ 2>&1 | head -20 || true
|
||||
;;
|
||||
esac
|
||||
echo "::endgroup::"
|
||||
|
||||
- name: Package
|
||||
shell: bash
|
||||
|
||||
Reference in New Issue
Block a user