You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Maybe it is not and there is just no way to configure it, but at least the cache cleanup size is not documented.
Feel free to close, if this is out of scope and the user is supposed to handle it or if github has its own logic
that should be relied on.
Side node: uses: actions/checkout@v4 is available, currently uses: actions/checkout@v3 is used.
I have written shell scripts for each architecture to workaround that:
name: cion:
pull_request:
push:
branches:
- masterconcurrency:
# Cancels pending runs when a PR gets updated.group: ${{ github.head_ref || github.run_id }}-${{ github.actor }}cancel-in-progress: truepermissions:
# Sets permission policy for `GITHUB_TOKEN`contents: read# not needed here https://github.com/actions/cachejobs:
aarch64-macos:
timeout-minutes: 20runs-on: "macos-latest"env:
ARCH: "aarch64"steps:
- name: Checkoutuses: actions/checkout@v4
- name: Setup Ziguses: mlugg/setup-zig@v1with:
version: mastermirror: 'https://pkg.machengine.org/zig'
- name: Build and Testrun: ci/aarch64-macos.sh# other confix similar for x86_64 linux and windows..
windows
# x86_64-windows CI script to clean cache, if necessaryfunctionCheckLastExitCode {
if (!$?) { exit1 }
return0
}
$MAX_SIZE_B=2147483648#2 GB = 2*(1024)**3 B
[string] $ZIG_CACHE_DIR=$(zig env | jq '. "global_cache_dir"')
if (Test-Path$ZIG_CACHE_DIR) {
$CHECK_SIZE_B= (gci $ZIG_CACHE_DIR| measure Length -s).Sum
if ($CHECK_SIZE_B-gt$MAX_SIZE_B) {
Write-Host"Removing global zig cache dir.."Remove-Item-Recurse -Force -ErrorAction Ignore -Path $ZIG_CACHE_DIR
CheckLastExitCode
}
}
zig env
CheckLastExitCode
zig build -Dno_opt_deps -Dno_cross test --summary all
CheckLastExitCode
macos
#!/usr/bin/env sh# aarch64-macos CI script to clean cache, if necessary# set -xset -o errexit # abort on nonzero exitstatusset -o nounset # abort on unbound variable
MAX_SIZE_B=2097152 #2 GB = 2*(1024)**2 KB
ZIG_CACHE_DIR="$(zig env | jq '. "global_cache_dir"')"iftest -e "$ZIG_CACHE_DIR";then
CHECK_SIZE_B=$(du -ks "$ZIG_CACHE_DIR"| cut -f1)iftest"$CHECK_SIZE_B" -ge $MAX_SIZE_B;thenecho"$CHECK_SIZE_B > $MAX_SIZE_B, removing global zig cache dir.."
rm -fr "$ZIG_CACHE_DIR"fifi
zig env
zig build -Dno_opt_deps -Dno_cross test --summary all
linux
#!/usr/bin/env sh# x86_64-linux CI script to clean cache, if necessary# set -xset -o errexit # abort on nonzero exitstatusset -o nounset # abort on unbound variable
MAX_SIZE_B=2097152 #2 GB = 2*(1024)**2 KB
ZIG_CACHE_DIR="$(zig env | jq '. "global_cache_dir"')"iftest -e "$ZIG_CACHE_DIR";then
CHECK_SIZE_B=$(du -ks "$ZIG_CACHE_DIR"| cut -f1)iftest"$CHECK_SIZE_B" -ge $MAX_SIZE_B;thenecho"$CHECK_SIZE_B > $MAX_SIZE_B, removing global zig cache dir.."
rm -fr "$ZIG_CACHE_DIR"fifi
zig env
zig build -Dno_opt_deps -Dno_cross test --summary all
The text was updated successfully, but these errors were encountered:
Maybe it is not and there is just no way to configure it, but at least the cache cleanup size is not documented.
Feel free to close, if this is out of scope and the user is supposed to handle it or if github has its own logic
that should be relied on.
Side node:
uses: actions/checkout@v4
is available, currentlyuses: actions/checkout@v3
is used.I have written shell scripts for each architecture to workaround that:
windows
macos
linux
The text was updated successfully, but these errors were encountered: