53 lines
1.7 KiB
YAML
53 lines
1.7 KiB
YAML
name: Build WeirdPerformance 2.4-B GC test
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- test/wp24b-gc-safe-sweep
|
|
paths:
|
|
- 'experiments/wp24b-gc/**'
|
|
- '.github/workflows/wp24b-gc.yml'
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: mlugg/setup-zig@v2
|
|
with:
|
|
version: master
|
|
- name: Build x86 ReleaseSmall DLL
|
|
working-directory: experiments/wp24b-gc
|
|
run: |
|
|
set -euo pipefail
|
|
zig build --fetch
|
|
python3 - <<'PY'
|
|
from pathlib import Path
|
|
matches = list(Path("zig-pkg").glob("zhook-*/src/zhook.zig"))
|
|
if len(matches) != 1:
|
|
raise SystemExit(f"expected one pinned zhook source, found {len(matches)}")
|
|
p = matches[0]
|
|
text = p.read_text(encoding="utf-8")
|
|
old = "var patch: [MAX_STOLEN]u8 = .{0x90} ** MAX_STOLEN;"
|
|
new = "var patch: [MAX_STOLEN]u8 = @splat(0x90);"
|
|
if old not in text:
|
|
raise SystemExit("expected pinned zhook repeat initializer not found")
|
|
p.write_text(text.replace(old, new), encoding="utf-8")
|
|
PY
|
|
zig build -Doptimize=small
|
|
test -s zig-out/bin/weirdperformance_gc24b.dll
|
|
file zig-out/bin/weirdperformance_gc24b.dll
|
|
sha256sum zig-out/bin/weirdperformance_gc24b.dll | tee SHA256SUMS.txt
|
|
- uses: actions/upload-artifact@v4
|
|
with:
|
|
name: WeirdPerformance-2.4-B-GC-Safe-Sweep
|
|
path: |
|
|
experiments/wp24b-gc/zig-out/bin/weirdperformance_gc24b.dll
|
|
experiments/wp24b-gc/SHA256SUMS.txt
|
|
experiments/wp24b-gc/README.md
|
|
if-no-files-found: error
|