Cache Zig package downloads in CI to prevent TLS flakes (#2423)
* Cache Zig package downloads in CI to prevent TLS flakes The ui-regressions job fails intermittently with TlsInitializationFailed when xcodebuild's Zig build phase fetches dependencies from deps.files.ghostty.org. Unlike Swift packages (cached + retried), Zig package downloads had no caching. Add ~/.cache/zig cache steps to all four Zig-using jobs (tests, tests-build-and-lag, ui-regressions in ci.yml, and build-ghosttykit.yml) keyed on the ghostty build.zig.zon files. * Use shared Zig cache key prefix across all CI jobs Whichever job runs first warms the cache for all others, since all jobs fetch the same Zig packages. --------- Co-authored-by: Lawrence Chen <lawrencecchen@users.noreply.github.com>
This commit is contained in:
parent
02e5ef9455
commit
e2e5f87b74
2 changed files with 29 additions and 0 deletions
8
.github/workflows/build-ghosttykit.yml
vendored
8
.github/workflows/build-ghosttykit.yml
vendored
|
|
@ -60,6 +60,14 @@ jobs:
|
||||||
export DEVELOPER_DIR="$XCODE_DIR"
|
export DEVELOPER_DIR="$XCODE_DIR"
|
||||||
xcodebuild -version
|
xcodebuild -version
|
||||||
|
|
||||||
|
- name: Cache Zig packages
|
||||||
|
if: steps.check-release.outputs.exists == 'false'
|
||||||
|
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4
|
||||||
|
with:
|
||||||
|
path: ~/.cache/zig
|
||||||
|
key: zig-packages-${{ hashFiles('ghostty/build.zig.zon', 'ghostty/build.zig.zon.json') }}
|
||||||
|
restore-keys: zig-packages-
|
||||||
|
|
||||||
- name: Build GhosttyKit.xcframework
|
- name: Build GhosttyKit.xcframework
|
||||||
if: steps.check-release.outputs.exists == 'false'
|
if: steps.check-release.outputs.exists == 'false'
|
||||||
run: |
|
run: |
|
||||||
|
|
|
||||||
21
.github/workflows/ci.yml
vendored
21
.github/workflows/ci.yml
vendored
|
|
@ -129,6 +129,13 @@ jobs:
|
||||||
zig version
|
zig version
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
- name: Cache Zig packages
|
||||||
|
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4
|
||||||
|
with:
|
||||||
|
path: ~/.cache/zig
|
||||||
|
key: zig-packages-${{ hashFiles('ghostty/build.zig.zon', 'ghostty/build.zig.zon.json') }}
|
||||||
|
restore-keys: zig-packages-
|
||||||
|
|
||||||
- name: Cache DerivedData
|
- name: Cache DerivedData
|
||||||
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4
|
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4
|
||||||
with:
|
with:
|
||||||
|
|
@ -293,6 +300,13 @@ jobs:
|
||||||
zig version
|
zig version
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
- name: Cache Zig packages
|
||||||
|
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4
|
||||||
|
with:
|
||||||
|
path: ~/.cache/zig
|
||||||
|
key: zig-packages-${{ hashFiles('ghostty/build.zig.zon', 'ghostty/build.zig.zon.json') }}
|
||||||
|
restore-keys: zig-packages-
|
||||||
|
|
||||||
- name: Cache DerivedData
|
- name: Cache DerivedData
|
||||||
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4
|
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4
|
||||||
with:
|
with:
|
||||||
|
|
@ -447,6 +461,13 @@ jobs:
|
||||||
zig version
|
zig version
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
- name: Cache Zig packages
|
||||||
|
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4
|
||||||
|
with:
|
||||||
|
path: ~/.cache/zig
|
||||||
|
key: zig-packages-${{ hashFiles('ghostty/build.zig.zon', 'ghostty/build.zig.zon.json') }}
|
||||||
|
restore-keys: zig-packages-
|
||||||
|
|
||||||
- name: Cache Swift packages
|
- name: Cache Swift packages
|
||||||
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4
|
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4
|
||||||
with:
|
with:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue