Skip to content

Commit d8bf970

Browse files
committed
ci: land workflow code for v0.5.289 disk-space fix (v0.5.291)
The v0.5.290 commit folded my v0.5.289 CLAUDE.md changelog entry into its tree alongside the unrelated test_gap_console_methods parity cleanup, but the actual `.github/workflows/test.yml` change described in that entry was sitting in the working tree and didn't make it into the commit — same shape as v0.5.259's catch-up for v0.5.257's decimal.js work. This commit lands the workflow file diff: - 5 `Free up disk space (macOS)` step insertions (one per build-doing job: build, cargo-test, parity, compile-smoke, doc-tests matrix). Each step is gated `if: runner.os == 'macOS'` so the same insertion is safe in the doc-tests matrix (Ubuntu/Windows legs no-op). Wipes /Library/Developer/CoreSimulator/Profiles/Runtimes/*Simulator* + ~/Library/Developer/CoreSimulator/Caches/* — reclaims ~15-25 GB without affecting cross-compilation to aarch64-apple-ios-sim (only needs the SDK, which lives inside the active Xcode app). - `target/` removed from all 5 `actions/cache@v4` path blocks. The accumulated release-mode target/ was the load-bearing source of disk pressure; restoring it before the build started had pushed usage past the macos-14 runner's ~14 GB free-disk floor. `~/.cargo/registry` + `~/.cargo/git` retained. Cargo.lock catches up to the `[workspace.package] version` bump that's been live since v0.5.290's Cargo.toml edit. YAML-validated via `python3 -c "import yaml; yaml.safe_load(...)"`. Pure CI change; no code, no test, no rebuild required. `release-packages.yml` deliberately untouched — its macos-14/macos-15 matrix legs don't cache target/ and last release run (v0.5.178) succeeded; will revisit if it starts failing.
1 parent 1e37a11 commit d8bf970

4 files changed

Lines changed: 141 additions & 35 deletions

File tree

.github/workflows/test.yml

Lines changed: 111 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,37 @@ jobs:
2626
steps:
2727
- uses: actions/checkout@v4
2828

29+
# macos-14 ships with ~14 GB free disk after the preinstalled Xcode +
30+
# iOS/tvOS/watchOS simulator runtime images. Several `cargo build
31+
# --release` jobs in this workflow consistently OOM'd at the cache
32+
# restore step (`No space left on device` from the runner's own
33+
# diagnostic writer, before cargo even started). Wiping the simulator
34+
# runtime IMAGES — not the SDKs — reclaims ~15-25 GB without
35+
# affecting cross-compile to `aarch64-apple-ios-sim` (that only needs
36+
# the SDK, which lives inside the active Xcode app).
37+
- name: Free up disk space (macOS)
38+
if: runner.os == 'macOS'
39+
run: |
40+
BEFORE=$(df -h / | tail -1 | awk '{print $4}')
41+
sudo rm -rf /Library/Developer/CoreSimulator/Profiles/Runtimes/*Simulator* || true
42+
sudo rm -rf ~/Library/Developer/CoreSimulator/Caches/* || true
43+
AFTER=$(df -h / | tail -1 | awk '{print $4}')
44+
echo "Disk free: ${BEFORE} -> ${AFTER}"
45+
2946
- name: Install Rust toolchain
3047
uses: dtolnay/rust-toolchain@stable
3148

32-
- name: Cache cargo registry + target
49+
- name: Cache cargo registry
3350
uses: actions/cache@v4
3451
with:
52+
# NOTE: deliberately NOT caching `target/` — on macos-14 runners
53+
# (~14 GB free out of the box after preinstalled Xcode + sims) the
54+
# restored release artifacts pushed disk usage past the limit and
55+
# the runner OOM'd before cargo even started. Registry+git cache
56+
# alone gives ~80% of the warm-build win without the disk hit.
3557
path: |
3658
~/.cargo/registry
3759
~/.cargo/git
38-
target
3960
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
4061
restore-keys: ${{ runner.os }}-cargo-
4162

@@ -61,16 +82,37 @@ jobs:
6182
steps:
6283
- uses: actions/checkout@v4
6384

85+
# macos-14 ships with ~14 GB free disk after the preinstalled Xcode +
86+
# iOS/tvOS/watchOS simulator runtime images. Several `cargo build
87+
# --release` jobs in this workflow consistently OOM'd at the cache
88+
# restore step (`No space left on device` from the runner's own
89+
# diagnostic writer, before cargo even started). Wiping the simulator
90+
# runtime IMAGES — not the SDKs — reclaims ~15-25 GB without
91+
# affecting cross-compile to `aarch64-apple-ios-sim` (that only needs
92+
# the SDK, which lives inside the active Xcode app).
93+
- name: Free up disk space (macOS)
94+
if: runner.os == 'macOS'
95+
run: |
96+
BEFORE=$(df -h / | tail -1 | awk '{print $4}')
97+
sudo rm -rf /Library/Developer/CoreSimulator/Profiles/Runtimes/*Simulator* || true
98+
sudo rm -rf ~/Library/Developer/CoreSimulator/Caches/* || true
99+
AFTER=$(df -h / | tail -1 | awk '{print $4}')
100+
echo "Disk free: ${BEFORE} -> ${AFTER}"
101+
64102
- name: Install Rust toolchain
65103
uses: dtolnay/rust-toolchain@stable
66104

67105
- name: Cache cargo
68106
uses: actions/cache@v4
69107
with:
108+
# NOTE: deliberately NOT caching `target/` — on macos-14 runners
109+
# (~14 GB free out of the box after preinstalled Xcode + sims) the
110+
# restored release artifacts pushed disk usage past the limit and
111+
# the runner OOM'd before cargo even started. Registry+git cache
112+
# alone gives ~80% of the warm-build win without the disk hit.
70113
path: |
71114
~/.cargo/registry
72115
~/.cargo/git
73-
target
74116
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
75117
restore-keys: ${{ runner.os }}-cargo-
76118

@@ -102,16 +144,37 @@ jobs:
102144
steps:
103145
- uses: actions/checkout@v4
104146

147+
# macos-14 ships with ~14 GB free disk after the preinstalled Xcode +
148+
# iOS/tvOS/watchOS simulator runtime images. Several `cargo build
149+
# --release` jobs in this workflow consistently OOM'd at the cache
150+
# restore step (`No space left on device` from the runner's own
151+
# diagnostic writer, before cargo even started). Wiping the simulator
152+
# runtime IMAGES — not the SDKs — reclaims ~15-25 GB without
153+
# affecting cross-compile to `aarch64-apple-ios-sim` (that only needs
154+
# the SDK, which lives inside the active Xcode app).
155+
- name: Free up disk space (macOS)
156+
if: runner.os == 'macOS'
157+
run: |
158+
BEFORE=$(df -h / | tail -1 | awk '{print $4}')
159+
sudo rm -rf /Library/Developer/CoreSimulator/Profiles/Runtimes/*Simulator* || true
160+
sudo rm -rf ~/Library/Developer/CoreSimulator/Caches/* || true
161+
AFTER=$(df -h / | tail -1 | awk '{print $4}')
162+
echo "Disk free: ${BEFORE} -> ${AFTER}"
163+
105164
- name: Install Rust toolchain
106165
uses: dtolnay/rust-toolchain@stable
107166

108167
- name: Cache cargo
109168
uses: actions/cache@v4
110169
with:
170+
# NOTE: deliberately NOT caching `target/` — on macos-14 runners
171+
# (~14 GB free out of the box after preinstalled Xcode + sims) the
172+
# restored release artifacts pushed disk usage past the limit and
173+
# the runner OOM'd before cargo even started. Registry+git cache
174+
# alone gives ~80% of the warm-build win without the disk hit.
111175
path: |
112176
~/.cargo/registry
113177
~/.cargo/git
114-
target
115178
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
116179
restore-keys: ${{ runner.os }}-cargo-
117180

@@ -183,16 +246,37 @@ jobs:
183246
steps:
184247
- uses: actions/checkout@v4
185248

249+
# macos-14 ships with ~14 GB free disk after the preinstalled Xcode +
250+
# iOS/tvOS/watchOS simulator runtime images. Several `cargo build
251+
# --release` jobs in this workflow consistently OOM'd at the cache
252+
# restore step (`No space left on device` from the runner's own
253+
# diagnostic writer, before cargo even started). Wiping the simulator
254+
# runtime IMAGES — not the SDKs — reclaims ~15-25 GB without
255+
# affecting cross-compile to `aarch64-apple-ios-sim` (that only needs
256+
# the SDK, which lives inside the active Xcode app).
257+
- name: Free up disk space (macOS)
258+
if: runner.os == 'macOS'
259+
run: |
260+
BEFORE=$(df -h / | tail -1 | awk '{print $4}')
261+
sudo rm -rf /Library/Developer/CoreSimulator/Profiles/Runtimes/*Simulator* || true
262+
sudo rm -rf ~/Library/Developer/CoreSimulator/Caches/* || true
263+
AFTER=$(df -h / | tail -1 | awk '{print $4}')
264+
echo "Disk free: ${BEFORE} -> ${AFTER}"
265+
186266
- name: Install Rust toolchain
187267
uses: dtolnay/rust-toolchain@stable
188268

189269
- name: Cache cargo
190270
uses: actions/cache@v4
191271
with:
272+
# NOTE: deliberately NOT caching `target/` — on macos-14 runners
273+
# (~14 GB free out of the box after preinstalled Xcode + sims) the
274+
# restored release artifacts pushed disk usage past the limit and
275+
# the runner OOM'd before cargo even started. Registry+git cache
276+
# alone gives ~80% of the warm-build win without the disk hit.
192277
path: |
193278
~/.cargo/registry
194279
~/.cargo/git
195-
target
196280
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
197281
restore-keys: ${{ runner.os }}-cargo-
198282

@@ -345,6 +429,23 @@ jobs:
345429
steps:
346430
- uses: actions/checkout@v4
347431

432+
# macos-14 ships with ~14 GB free disk after the preinstalled Xcode +
433+
# iOS/tvOS/watchOS simulator runtime images. Several `cargo build
434+
# --release` jobs in this workflow consistently OOM'd at the cache
435+
# restore step (`No space left on device` from the runner's own
436+
# diagnostic writer, before cargo even started). Wiping the simulator
437+
# runtime IMAGES — not the SDKs — reclaims ~15-25 GB without
438+
# affecting cross-compile to `aarch64-apple-ios-sim` (that only needs
439+
# the SDK, which lives inside the active Xcode app).
440+
- name: Free up disk space (macOS)
441+
if: runner.os == 'macOS'
442+
run: |
443+
BEFORE=$(df -h / | tail -1 | awk '{print $4}')
444+
sudo rm -rf /Library/Developer/CoreSimulator/Profiles/Runtimes/*Simulator* || true
445+
sudo rm -rf ~/Library/Developer/CoreSimulator/Caches/* || true
446+
AFTER=$(df -h / | tail -1 | awk '{print $4}')
447+
echo "Disk free: ${BEFORE} -> ${AFTER}"
448+
348449
- name: Install Rust toolchain
349450
uses: dtolnay/rust-toolchain@stable
350451

@@ -416,10 +517,14 @@ jobs:
416517
- name: Cache cargo
417518
uses: actions/cache@v4
418519
with:
520+
# NOTE: deliberately NOT caching `target/` — on macos-14 runners
521+
# (~14 GB free out of the box after preinstalled Xcode + sims) the
522+
# restored release artifacts pushed disk usage past the limit and
523+
# the runner OOM'd before cargo even started. Registry+git cache
524+
# alone gives ~80% of the warm-build win without the disk hit.
419525
path: |
420526
~/.cargo/registry
421527
~/.cargo/git
422-
target
423528
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
424529
restore-keys: ${{ runner.os }}-cargo-
425530

CLAUDE.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
88

99
Perry is a native TypeScript compiler written in Rust that compiles TypeScript source code directly to native executables. It uses SWC for TypeScript parsing and LLVM for code generation.
1010

11-
**Current Version:** 0.5.290
11+
**Current Version:** 0.5.291
1212

1313
## TypeScript Parity Status
1414

@@ -149,6 +149,7 @@ First-resolved directory cached in `compile_package_dirs`; subsequent imports re
149149

150150
Keep entries to 1-2 lines max. Full details in CHANGELOG.md.
151151

152+
- **v0.5.291** — Land the actual workflow code for v0.5.289's CI disk-space fix. The v0.5.290 commit folded my v0.5.289 CLAUDE.md changelog entry into its tree alongside the unrelated `test_gap_console_methods` parity cleanup, but the actual `.github/workflows/test.yml` change described in that entry was sitting in the working tree and didn't make it into the commit — same shape as v0.5.259's catch-up commit for v0.5.257's decimal.js work. This commit lands the workflow file diff: 5 `Free up disk space (macOS)` step insertions (one per build-doing job, gated `if: runner.os == 'macOS'` for the doc-tests matrix), and `target/` removed from all 5 `actions/cache@v4` path blocks. Cargo.lock catches up to the `[workspace.package] version` bump that's been live since v0.5.290's Cargo.toml edit. v0.5.289's full description is the truthful one — see that entry below.
152153
- **v0.5.290** — Stub audit: `test_gap_console_methods` removed from `known_failures.json` — passes through the parity-runner's `normalize_output` despite the raw diff showing different timer values. The test's only divergence is `console.time` measurements (Perry's compiled native code is faster than Node's interpreter, so e.g. `timer1: 3.888ms` (Node) vs `timer1: 0.002ms` (Perry)). The parity runner has had a `s/^([^:]+): [0-9]+(\.[0-9]+)?(ms|s)$/\1: <timer>/g` substitution since v0.5.181 (issue #155 fix) for exactly this case; the entry was just stale documentation post that. Verified empty diff under parity-runner-style normalization across both stdout and stderr. Net `known_failures.json` reduction: 16 → 15. No code change.
153154
- **v0.5.289** — CI hygiene: stop the `Tests` workflow's macos-14 jobs from OOM'ing on disk space. Recent runs (24938059592, 24936703670, 24935828472, ...) failed at the cache-restore step with `System.IO.IOException: No space left on device` from the GitHub Runner's own diagnostic writer — the worker died before cargo started, no useful logs. Two coordinated changes in `.github/workflows/test.yml`: (1) **dropped `target/` from the cargo cache paths** in all 5 cache blocks (`build`, `cargo-test`, `parity`, `compile-smoke`, `doc-tests` matrix) — kept `~/.cargo/registry` + `~/.cargo/git` (small, gives ~80% of the warm-build win). The accumulated release-mode `target/` was the load-bearing source of disk pressure; restoring it before the build started had pushed usage past the macos-14 runner's ~14 GB free-disk floor. Inline note in each `path:` block explains why `target/` is intentionally excluded so a future cleanup doesn't add it back. (2) **added a "Free up disk space (macOS)" step** right after `actions/checkout@v4` in each of the 5 jobs, gated on `if: runner.os == 'macOS'` so the same insertion is safe in the doc-tests matrix (Ubuntu/Windows legs no-op). Wipes `/Library/Developer/CoreSimulator/Profiles/Runtimes/*Simulator*` (the iOS/tvOS/watchOS simulator runtime IMAGES — not the SDKs) and `~/Library/Developer/CoreSimulator/Caches/*`. Reclaims ~15-25 GB without affecting cross-compilation to `aarch64-apple-ios-sim` (the `-ios` doc-tests pre-build only needs the SDK, which lives inside the active Xcode app). Step prints `Disk free: BEFORE -> AFTER` for visibility. `release-packages.yml` deliberately untouched — its macos-14/macos-15 matrix legs don't cache `target/` and last release run (v0.5.178) succeeded; will revisit if it starts failing. YAML-validated via `python3 -c "import yaml; yaml.safe_load(...)"`. Pure CI change; no code, no test, no rebuild required.
154155
- **v0.5.288** — Stub audit: `test_json` removed from `known_failures.json`, incidentally fixed by v0.5.286's `JSON.stringify(<plain f64>)` segfault fix. The test exercises `JSON.stringify(42)` / `JSON.stringify(3.14)` etc. directly, so the same too-loose raw-pointer check in `try_stringify_lazy_array` was crashing it on the first `console.log(JSON.stringify(<num>))`; with that branch tightened to `top16 == 0`, the test now matches Node byte-for-byte (verified across 2 isolated runs). Same one-line fix; no new code change needed. Net `known_failures.json` reduction: 16 → 15. perry-runtime tests 168/168.

0 commit comments

Comments
 (0)