Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
208 commits
Select commit Hold shift + click to select a range
5a39336
Add streaming pipeline for low-VRAM GPUs (fits under 8 GB at k=28)
Apr 20, 2026
413cbf2
README: document streaming (≤8 GB) pipeline and its automatic dispatch
Apr 20, 2026
2b98a1d
Parallelize compute_bucket_offsets and drop the l_count_max host fence
Apr 20, 2026
29df0dc
README: explain CUDA autodetect and the fat-build fallback
Apr 20, 2026
d939ddf
README: hoist Hardware compatibility, move Performance to the bottom
Apr 20, 2026
63fe0a0
Bump pinned-slot count to 3, batch channel to depth 2
Apr 20, 2026
577d1d3
Fixed claude's typos.
Apr 20, 2026
ddba1fa
Port to SYCL/AdaptiveCpp; CUDA backend opt-in via XCHPLOT2_BUILD_CUDA
Apr 20, 2026
18f612f
Stable parallel SYCL radix sort for non-CUDA builds + parity test
Apr 20, 2026
4af9ecd
GpuBufferPool: include xs_temp_bytes in pair_bytes
Apr 21, 2026
2209f41
Auto-detect ACPP_TARGETS in CMake and build.rs
Apr 21, 2026
7b9b936
README: link to cuda-only branch for NVIDIA-only users
Apr 21, 2026
f1680b8
README: refresh Performance numbers post-SYCL port
Apr 21, 2026
2440568
README: list AdaptiveCpp + auto-fetched + optional runtime deps
Apr 21, 2026
577c30f
Add Containerfile + install-deps.sh + FetchContent fallback for Adapt…
Apr 21, 2026
2687670
Containerfile: end-to-end NVIDIA build + bit-identical plot output
Apr 21, 2026
250cad4
README: bump pool VRAM threshold to ~17 GB free / 18 GB+ cards
Apr 21, 2026
aebbd99
README: add WIP status note up top
Apr 21, 2026
71e600f
build.rs: read AdaptiveCpp lib dir from CMake instead of hardcoding
Apr 21, 2026
c701693
GpuBufferPool + streaming pipeline: free-on-throw, clearer OOM message
Apr 21, 2026
320daf8
SortSycl: ping-pong over caller buffers, drop internal alt allocation
Apr 21, 2026
1d1d794
SortCuda: switch to CUB DoubleBuffer mode to match SortSycl scratch p…
Apr 21, 2026
f8ad976
Add compose.yaml + bundle parity tests in container image
Apr 21, 2026
e8026b6
Add scripts/build-container.sh — host-side GPU autodetect for compose
Apr 21, 2026
080e827
Bump version to 0.2.0
Apr 21, 2026
671a54b
Containerfile: parametrize LLVM root for AMD/ROCm bitcode compatibility
Apr 21, 2026
d0548c7
scripts: install rocminfo on AMD path; better no-GPU error
Apr 21, 2026
9a13a05
build-container.sh: capture rocminfo/nvidia-smi output before grep
Apr 21, 2026
72b47eb
build-container.sh: SIGPIPE fix in gfx detection (was killing the scr…
Apr 21, 2026
c6b1b1e
gitignore docs/ — internal design notes, never user-facing
Apr 21, 2026
179858d
Containerfile: skip Ubuntu llvm-18 on AMD path; add LLVM linkage diag
Apr 21, 2026
8cf1aa1
compose: pin ROCm to 6.2 + drop LLVM_ROOT override
Apr 21, 2026
99483c7
compose: use rocm/dev-ubuntu-24.04:6.2-complete for the rocm service
Apr 21, 2026
ed0b310
Conditionalize cuda_fp16.h via CudaHalfShim — fixes AMD/HIP build clash
Apr 21, 2026
7911ce7
Guard cuda_runtime.h via CudaHalfShim; symlink clang-offload-bundler …
Apr 21, 2026
256b8bc
Drop raw cuda_fp16.h from GpuPipeline; fan-out bundler symlinks
Apr 21, 2026
921b5fc
install-deps: drop CUDA headers from AMD paths
Apr 21, 2026
614e59e
build.rs: gate cudart/cudadevrt link on XCHPLOT2_BUILD_CUDA=ON
Apr 21, 2026
28f47b8
build.rs: autodetect XCHPLOT2_BUILD_CUDA from nvcc availability
Apr 21, 2026
d8a4685
build.rs: link libamdhip64 when ACPP_TARGETS targets HIP
Apr 21, 2026
7171a72
CMakeLists: move plot_file_parity out of CUDA-gated block
Apr 21, 2026
a9ccffc
compose + README: document AMD rootless seccomp/cap requirements
Apr 21, 2026
2f97623
README: mark AMD ROCm path as validated end-to-end
Apr 22, 2026
c160a25
install-deps: pin AdaptiveCpp to LLVM 16-20; ROCm device libs detect
Apr 22, 2026
15ff9b9
GpuBufferPool: split d_pair_a / d_pair_b sizing — saves ~2-3 GB at k=28
Apr 22, 2026
8cbfd89
GpuPipeline: replace stubbed phase timers with chrono-based wall timing
Apr 22, 2026
498e472
XsKernel: per-sub-phase wall timing (gen / sort / pack) under env flag
Apr 22, 2026
2acc9bd
CMakeLists: force -O3 on SYCL TUs so AdaptiveCpp's acpp doesn't AOT a…
Apr 22, 2026
8fd1ddc
Revert: target_compile_options(-O2/-O3) on pos2_gpu broke AMD parity
Apr 22, 2026
b1f9f3a
Containerfile: install clang-18 + libclang-cpp18 + libomp-18-dev in r…
Apr 22, 2026
10dd84c
Containerfile: ship builder stage as runtime — pragmatic correctness fix
Apr 22, 2026
313758a
compose + build script: fail loud on missing ACPP_GFX (root cause of …
Apr 22, 2026
2347bf2
Containerfile: restore slim runtime stage (~1 GB image-size win)
Apr 22, 2026
6d60aa5
README: document AMD container's sudo + privileged + ACPP_GFX trifecta
Apr 22, 2026
235394e
CMakeLists: re-enable -O3 for SYCL TUs (was wrongly blamed for ACPP_G…
Apr 22, 2026
2fd1606
gpu: port bitsliced AES to SYCL for sub_group-cooperative hashing
Apr 22, 2026
3f2f795
gpu: portable attrs on bp_sbox_circuit so SYCL TUs can include it
Apr 22, 2026
d709c88
gpu: per-thread coarsening for Xs gen + T1/T2/T3 match kernels
Apr 22, 2026
3100701
gpu: revert per-thread coarsening (net loss at k=28 on RX 6700 XT)
Apr 22, 2026
c67e371
gpu: instrument streaming-path with [phase-timing] output
Apr 22, 2026
2122c62
gpu: drop unused d_keys_in slot in d_storage — pool now fits 12 GiB
Apr 22, 2026
3f85a76
gpu: lazy pinned-host alloc in GpuBufferPool — single-plot saves ~1.2 s
Apr 22, 2026
b9c888f
gpu: wire bitsliced AES through native __builtin_amdgcn_ballot_w32
Apr 22, 2026
623b193
gpu: switch bs_ballot to __acpp_if_target_hip for host-pass safety
Apr 22, 2026
b6aab03
gpu: revert bitsliced wiring (round 2) — native ballot was necessary …
Apr 22, 2026
8f82924
gpu: lazy d_pair_a alloc overlapping with Xs gen — saves first-plot wall
Apr 22, 2026
e366ee8
gpu: free d_pair_a between plots in batch — smaller-card pool compat
Apr 22, 2026
6c3eccf
gpu: split xs-sort keys_a to d_storage tail — drops pool VRAM min ~1.…
Apr 23, 2026
c3ad967
docs: tighten streaming peak (~7.3 GB measured), add AMD row, fix VRA…
Apr 23, 2026
2cd9796
added a donate section to the readme.
Apr 23, 2026
f87d179
ci: add GitHub Actions workflow (shellcheck, actionlint, Rust)
Apr 23, 2026
a687c54
plot-write: atomic .partial + rename; SIGINT/SIGTERM cooperative stop…
Apr 23, 2026
ab0b25f
batch+cli: skip-existing / continue-on-error / disk preflight / verif…
Apr 23, 2026
f683c84
docs: CONTRIBUTING + SECURITY; README env-vars table + new flags
Apr 23, 2026
addb7e9
sycl: install async_handler on the persistent queue — clean exit on a…
Apr 23, 2026
19a9798
batch: preflight streaming-path VRAM before pinned-host alloc
Apr 23, 2026
d170e85
batch: widen streaming preflight margin to 1 GiB — sidestep AdaptiveC…
Apr 23, 2026
8b4d8e9
batch: revert streaming preflight margin to 256 MB
Apr 24, 2026
38532b7
T2 match: plumb bucket_begin/bucket_end params (stage 1 of N)
Apr 24, 2026
e24e8fa
T2 match: streaming-path N=2 tiling (stage 2 of N)
Apr 24, 2026
061a8ea
T2 match: half-cap device staging + D2H per pass (stage 3 of N)
Apr 24, 2026
2ec93fc
T2 match: JIT H2D d_t2_meta/xbits only for their gather calls (stage …
Apr 24, 2026
ea1f89b
CMakeLists: set CMAKE_POSITION_INDEPENDENT_CODE ON globally
Apr 24, 2026
015381e
T1 sort: park d_t1_meta on pinned host across sort phase (stage 4b of N)
Apr 24, 2026
2b98f4a
batch: update streaming peak anchor to 6240 MB, trim preflight margin…
Apr 24, 2026
bbd6745
T1+T2 sort: park *_keys_merged on pinned host across gather peaks (st…
Apr 24, 2026
641f4dc
T3 match: plumb bucket_begin/bucket_end params (stage 4d.1 of N)
Apr 24, 2026
8680396
T3 match: streaming-path N=2 tiling + prepare/range refactor (stage 4…
Apr 24, 2026
eea2959
T3 match: half-cap d_t3 staging + D2H per pass (stage 4d.3 of N)
Apr 24, 2026
798acaa
Xs phase: inline gen+sort+pack, free keys_a/vals_a after sort (stage …
Apr 24, 2026
60ea6f4
batch: re-anchor streaming_peak to 5200 MB after stage 4e (stage 5 re…
Apr 24, 2026
72e93e4
batch: amortise streaming pinned-host scratch across plots (stage 4f …
Apr 24, 2026
0887dde
streaming: add plain tier (skip parks + single-pass T2 match)
Apr 24, 2026
81191dd
readme: document 3-tier streaming dispatch (pool | plain | compact)
Apr 24, 2026
a4ebaf9
T3 match: one-shot full-cap in plain tier (skip N=2 staging + h_t3)
Apr 24, 2026
5b6757d
readme: document experimental Windows build path (NVIDIA/MSVC)
Apr 24, 2026
68431d3
ci: fix actionlint deprecation + shellcheck warnings
Apr 24, 2026
00c82b2
Bump version to 0.3.0
Apr 24, 2026
7b23a63
batch: multi-GPU via --devices flag (thread-per-device)
Apr 24, 2026
36ac72d
scripts: add test-multi-gpu.sh smoke test for --devices
Apr 24, 2026
855bb45
readme: document --devices multi-GPU flag + test-multi-gpu.sh
Apr 24, 2026
d1a885d
Bump version to 0.4.0
Apr 24, 2026
d884a51
scripts: fix shellcheck SC2002 in test-multi-gpu.sh (useless cat)
Apr 24, 2026
7c775a6
readme: note multi-GPU scaling in perf + add XCHPLOT2_TEST_GPU_COUNT …
Apr 24, 2026
8c7428b
readme: add Quick start + VRAM → Multi-GPU cross-link
Apr 24, 2026
30e874f
readme: tighten status + branches blockquotes for scannability
Apr 24, 2026
72620bc
readme: document Radeon Pro W5700 / RDNA1 gfx1013 spoof workaround
Apr 24, 2026
65ea42c
amd: autodetect RDNA1 (gfx1010/1011/1012) → gfx1013 spoof
Apr 24, 2026
c5ea80d
scripts: test-multi-gpu.sh — bypass keygen via batch manifest
Apr 24, 2026
b3d6e20
cli: xchplot2 parity-check subcommand
Apr 24, 2026
2e33a8d
parity: extract derive_plot_id + Stats/compare to ParityCommon.hpp
Apr 24, 2026
250cbc3
build.rs: prefer GPU-vendor detection over nvcc-presence
Apr 24, 2026
d11912e
cmake: force-include cuda_fp16.h in every CUDA TU
Apr 24, 2026
fd5e71e
install-deps: skip AdaptiveCpp's CUDA probe on --gpu amd builds
Apr 24, 2026
56950a9
readme: Windows → cuda-only branch + VS SDK + LIB troubleshooting
Apr 24, 2026
47be6b7
readme: collapse Windows section to a 2-path note
Apr 24, 2026
b052f73
readme: fix OS bullet — match collapsed Windows section (anchor + text)
Apr 24, 2026
114f17b
readme: add Native Windows build walkthrough under the viable-paths note
Apr 24, 2026
feca367
build.rs: gate NVIDIA auto-detect on sm_61 minimum (our README floor)
Apr 24, 2026
9f4b3c6
readme: add native Windows SYCL build section (adventurous path)
Apr 24, 2026
2125c08
Bump version to 0.5.0
Apr 24, 2026
6e603a5
readme: micro-polish — Windows-section nudge + sm_61 auto-detect note
Apr 24, 2026
251302e
scripts: cross-device parity test in test-multi-gpu.sh
Apr 24, 2026
d4e2fef
cmake: auto-find /opt/adaptivecpp + auto-probe ld.lld for FetchContent
Apr 25, 2026
f9a7f13
install-deps: add lld to apt + dnf package lists
Apr 25, 2026
4581495
Bump version to 0.5.1
Apr 25, 2026
33fb11f
install-deps: two-tier GPU detection + fail-fast on no GPU
Apr 26, 2026
7014bdf
readme: install-deps.sh + LLVM rows reflect recent behaviour changes
Apr 26, 2026
d1cc9be
build.rs: preflight critical system deps before invoking cmake
Apr 26, 2026
8f509e7
readme: four small clarifications from the latest audit
Apr 26, 2026
ea07aff
sort: split nvcc/SYCL boundary so .cu files don't reach sycl.hpp
Apr 26, 2026
17adca0
Bump version to 0.5.2
Apr 26, 2026
9d91b44
cmake: stub cli_devlink.cu to fix cargo install device-link
Apr 26, 2026
04f45a5
notice: add AdaptiveCpp, AMD ROCm/HIP, Intel oneAPI sections
Apr 26, 2026
fe7bd09
container: pin CUDA 12.9 base for pre-Turing GPUs (Pascal/Volta)
Apr 26, 2026
957fd7e
container: fat binary for mixed-GPU rigs (1070 + 3060, etc.)
Apr 26, 2026
e9a309e
build: preflight nvcc/arch compatibility (CUDA 13 + Pascal/Volta)
Apr 26, 2026
b9b83f9
cmake: share pos2_gpu CUDA objects via OBJECT lib for cargo install
Apr 26, 2026
bd1dd2d
cmake: avoid duplicate CUDA .o in pos2_gpu + xchplot2_cli (nvlink fix)
Apr 26, 2026
5edfbcb
container: silence rocm ACPP_GFX:? check on non-rocm builds
Apr 26, 2026
6fc536f
cmake: pull CUDA OBJECT lib into sycl_sort_parity (CUB-adapter fix)
Apr 26, 2026
99f8972
container: add CPU build path (AdaptiveCpp OpenMP backend)
Apr 26, 2026
0801aff
container: in-container preflight message + --no-cache build flag
Apr 27, 2026
53aebca
build: link libomp when ACPP_TARGETS=omp (CPU backend)
Apr 27, 2026
e25abc6
cpu: --cpu flag + SyclBackend dispatch (commit 2 of CPU support)
Apr 27, 2026
e03869e
readme: document --cpu and the cpu container service
Apr 27, 2026
bc42d43
container: close the script-vs-compose UX gap
Apr 27, 2026
a983873
readme: tldr "Pick a path" guide at top of Build section
Apr 27, 2026
fa9f163
build: friendlier preflight when host deps are missing
Apr 27, 2026
13d5959
cpu: route --cpu through pos2-chip's Plotter (replaces SYCL→OMP)
Apr 27, 2026
39cd289
container: cuda service GPU pass-through works under Docker too
Apr 27, 2026
d1f1720
batch: --tier plain|compact|auto CLI flag for streaming pipeline
Apr 27, 2026
4b23a23
sycl: filter to CUDA-backend devices on CUB builds (mixed-vendor host)
Apr 27, 2026
1773d08
cmake: rescan link group + allow-multiple-definition on xchplot2 exe
Apr 27, 2026
d96bc30
batch: minimal streaming tier (~3.83 GiB floor) for 4 GiB cards
Apr 27, 2026
ed29c12
Bump version to 0.6.0
Apr 27, 2026
b76da89
batch: XCHPLOT2_SYCL_CPU_BENCH=1 routes --cpu through SYCL pipeline
Apr 27, 2026
5287c9a
docs: AMD 4 GiB targets in build-container example list
Apr 27, 2026
b62dd1e
ci: split CUDA_ARCH assignment from export (shellcheck SC2155)
Apr 27, 2026
9d44f78
cpu: accept pool-PK 128-byte memos (not just pool-PH 112-byte)
Apr 27, 2026
af6963b
scripts: split container host bootstrap into install-container-deps.sh
Apr 27, 2026
5d40e37
scripts: install-container-deps.sh --dry-run + CDI-WARN explanation
Apr 27, 2026
0676c2e
ci: install-container-deps.sh dry-run fixtures + container smoke
Apr 27, 2026
67e268f
ci: harden install-container-deps run.sh against CWD-dependent ROOT
Apr 27, 2026
942e804
keygen-rs: cargo fmt
Apr 27, 2026
9f21d2a
ci: add dependabot + cargo-fmt + typos + markdownlint + hadolint + co…
Apr 27, 2026
c061698
build(deps): bump actions/checkout from 5 to 6
dependabot[bot] Apr 27, 2026
7612d8f
build(deps): bump sha2 from 0.10.9 to 0.11.0 in /keygen-rs
dependabot[bot] Apr 27, 2026
752a39b
Merge pull request #4 from Jsewill/dependabot/github_actions/actions/…
Jsewill Apr 27, 2026
444c2e4
build(deps): bump hadolint/hadolint-action from 3.1.0 to 3.3.0
dependabot[bot] Apr 27, 2026
90db2b0
build(deps): bump DavidAnson/markdownlint-cli2-action from 18 to 23
dependabot[bot] Apr 27, 2026
2ad7501
Merge pull request #5 from Jsewill/dependabot/cargo/keygen-rs/sha2-0.…
Jsewill Apr 27, 2026
66c0a18
Merge pull request #3 from Jsewill/dependabot/github_actions/hadolint…
Jsewill Apr 27, 2026
a7bfab7
Merge pull request #2 from Jsewill/dependabot/github_actions/DavidAns…
Jsewill Apr 27, 2026
529f9ce
docs(Containerfile): correct stale LLVM_ROOT override claim
Apr 28, 2026
347f06e
streaming: print exact bytes (not truncated MB) on alloc failures
Apr 28, 2026
7bafbae
streaming: add SYCL-radix scratch overhead to peak predictions
Apr 28, 2026
71f5bb5
streaming: validate t1_count + reject zero-byte allocs early
Apr 28, 2026
ea4a0a5
cpu-bench: fix --cpu + XCHPLOT2_SYCL_CPU_BENCH=1 device selection
Apr 28, 2026
0ca34c9
streaming: fix 4^k scaling in peak predictions
Apr 28, 2026
aa8272b
streaming minimal: 5200 → 3754 MB peak at k=28 (fits 4 GiB cap)
Apr 28, 2026
16be27b
pool: include alloc bytes + underlying err in OOM diagnostics
Apr 28, 2026
9af7a27
parity: add sycl_t1_parity, broaden 0-entries diag for generic JIT
Apr 29, 2026
6b8ded1
diag: replace mis-lowering with miscompile (typos CI)
Apr 29, 2026
b58851b
diag: POS2GPU_T1_DEBUG=1 logs d_xs sample + t1_count around T1 match
May 1, 2026
b342fb3
build: skip CUDA runtime/fp16 includes when ROCm is also present
May 1, 2026
2d3f310
diag: POS2GPU_T1_DEBUG=1 — sample Xs gen/sort outputs at head/mid/tail
May 1, 2026
83feef7
diag: trivial-kernel + d_aes_tables sanity in POS2GPU_T1_DEBUG=1
May 1, 2026
12e1242
fix(amd): provide __half via hip_fp16.h fallback in CudaHalfShim
May 1, 2026
8772db6
build: embed AdaptiveCpp + ROCm rpath for plain-cmake binaries
May 1, 2026
2377535
build: kernel-dispatch self-test at first SYCL queue construction
May 1, 2026
1f7ca45
build: XCHPLOT2_NO_GFX_SPOOF=1 opts out of the gfx1013 RDNA1 workaround
May 1, 2026
61cee17
tools: add hellosycl — minimal SYCL kernel-dispatch sanity check
May 2, 2026
8c22623
build: link libamdhip64 directly so AdaptiveCpp HIP backend loads
May 2, 2026
8d12a55
build: default RDNA1 to ACPP_TARGETS=generic; gfx1013 spoof now opt-in
May 2, 2026
6b00eb6
build: link libamdhip64 whenever ROCm is reachable, not just hip:* ta…
May 2, 2026
375fd77
build: add amd_gpu_present() — separate AMD detection from gfx target
May 3, 2026
8b32ed7
build: lower NVIDIA arch floor to sm_50 (Maxwell); fix wrong half-int…
May 3, 2026
bc97066
docs: README hardware section reflects sm_50 floor + RDNA1 generic de…
May 3, 2026
a5e3a8d
diag: fix wrong "should be 0xC66363A5" hint in d_aes_tables dump
May 3, 2026
6748749
docs: add Troubleshooting section covering AMD + spurious BUILD_CUDA …
May 3, 2026
771837c
docs: troubleshooting CUB entry now mentions the queue-init selftest …
May 3, 2026
41df00a
fix(build): amd_gpu_present() falls back to /sys/class/drm vendor probe
May 3, 2026
1ed7bfe
feat(sort): runtime backend dispatch — single binary handles NVIDIA +…
May 3, 2026
c6377e8
feat(cli): `xchplot2 devices` lists visible GPUs + sort routing
May 3, 2026
df5e7ea
feat(cli): --devices all means everything; --devices gpu means all-GP…
May 4, 2026
ea2d3f5
fix(batch): work-queue dispatch — fast workers keep pulling instead o…
May 4, 2026
60fde5d
build(deps): bump chia from 0.42.0 to 0.42.1 in /keygen-rs
dependabot[bot] May 4, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Build artifacts (out-of-source, copied per Containerfile)
build/
build-*/
target/

# pos2-chip is FetchContent-cloned at CMake configure time inside the
# container; no need to ship a host-side copy.
third_party/

# Generated plot files left over from local benchmarks.
*.plot2

# Editor / tooling
.vscode/
.idea/
.cache/
compile_commands.json

# Profiling artifacts
*.nsys-rep
*.qdrep
*.qdstrm
*.ncu-rep

# git history is irrelevant to the build itself.
.git/
21 changes: 21 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
version: 2

# Dependabot bumps deps via PR. Two ecosystems:
# - cargo: the keygen-rs subcrate's BLS / sha2 / address-codec stack.
# The build.rs at repo root only references env state and has no
# runtime crate deps, so it doesn't need its own entry.
# - github-actions: action versions in .github/workflows/.
# Weekly cadence keeps PR volume low; bump to daily if security
# advisories pile up.
updates:
- package-ecosystem: cargo
directory: /keygen-rs
schedule:
interval: weekly
open-pull-requests-limit: 5

- package-ecosystem: github-actions
directory: /
schedule:
interval: weekly
open-pull-requests-limit: 5
148 changes: 148 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,148 @@
name: CI

on:
pull_request:
push:
branches: [main]

permissions:
contents: read

jobs:
shell:
name: ShellCheck
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Install shellcheck
run: sudo apt-get update && sudo apt-get install -y shellcheck
- name: Lint scripts/
# Recurse so scripts/test/install-container-deps/run.sh and any
# future helpers under scripts/ stay covered.
run: find scripts -name '*.sh' -print0 | xargs -0 shellcheck

actions:
name: actionlint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: reviewdog/action-actionlint@v1
with:
fail_level: error

rust:
name: Rust (keygen-rs)
runs-on: ubuntu-latest
defaults:
run:
working-directory: keygen-rs
steps:
- uses: actions/checkout@v6
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy, rustfmt
- uses: Swatinem/rust-cache@v2
with:
workspaces: keygen-rs
- name: cargo fmt --check
run: cargo fmt --all --check
- name: cargo check
run: cargo check --all-targets --locked || cargo check --all-targets
- name: cargo clippy (advisory)
run: cargo clippy --all-targets -- -W clippy::all
continue-on-error: true
- name: cargo test
run: cargo test --all-targets

hadolint:
name: hadolint Containerfile
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: hadolint/hadolint-action@v3.3.0
with:
dockerfile: Containerfile
# CUDA / ROCm base images make version-pinning warnings (DL3008,
# DL3009) impractical — package versions shift between base image
# rolls and the toolkit pin lives in BASE_DEVEL. Same for the
# `set -o pipefail` warnings on RUN-with-pipe (DL4006) — those
# pipes are bootstrap-time noise, not runtime data paths. Filter
# to errors so we still catch real bugs (root, ADD vs COPY,
# missing && \, COPY --chown typos, etc.).
failure-threshold: error

compose-config:
name: docker compose config validate
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: docker compose config --quiet
# Catches typos in service names / build-arg keys / unresolvable
# ${VAR} placeholders without ever pulling a base image. ~5s.
run: docker compose -f compose.yaml config --quiet

typos:
name: typos
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: crate-ci/typos@master

markdownlint:
name: markdownlint README
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: DavidAnson/markdownlint-cli2-action@v23
with:
globs: README.md

install-container-deps-dryrun:
name: install-container-deps.sh — dry-run fixtures
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Diff --dry-run output against fixtures
# Runs --dry-run for every (distro × engine × gpu) tuple in
# arch / ubuntu / fedora containers and diffs against the
# checked-in fixtures under scripts/test/install-container-deps/.
# No mutating sudo calls — completes in ~60s.
run: scripts/test/install-container-deps/run.sh

install-container-deps-smoke:
name: install-container-deps.sh smoke (${{ matrix.engine }} ${{ matrix.gpu }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- engine: podman
gpu: cpu
- engine: podman
gpu: amd
- engine: docker
gpu: cpu
# NVIDIA smoke is intentionally skipped: nvidia-ctk cdi generate
# needs a real GPU + driver to populate the spec, and the dry-run
# fixtures already cover the planning logic for that path.
steps:
- uses: actions/checkout@v6
- name: Real install in ubuntu:24.04 + assert idempotent re-run
env:
ENGINE: ${{ matrix.engine }}
GPU: ${{ matrix.gpu }}
# Validates that engine + GPU-runtime packages actually install
# from the real apt repos (catches package-name drift / repo
# availability), and that re-running the script is a no-op.
run: |
docker run --rm \
-e ENGINE -e GPU \
-v "$PWD/scripts:/s:ro" \
docker.io/ubuntu:24.04 \
bash -ec '
apt-get update -qq
apt-get install -y -qq sudo curl ca-certificates gnupg >/dev/null
/s/install-container-deps.sh --engine "$ENGINE" --gpu "$GPU"
# Idempotence: a clean second run must still exit 0.
/s/install-container-deps.sh --engine "$ENGINE" --gpu "$GPU"
'
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
build/
build-*/
*.plot2
.cache/
compile_commands.json
Expand All @@ -18,3 +19,4 @@ target/
# pos2-chip is fetched here automatically by CMake at configure time.
# See CMakeLists.txt → FetchContent_Declare(pos2_chip).
third_party/
docs/
12 changes: 12 additions & 0 deletions .markdownlint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"_comment": "README is prose-heavy and includes terminal output, wide tables, and mixed list markers. Disable rules that produce noise without catching real issues. MD051 is also disabled because markdownlint's link-fragment slug algorithm differs from GitHub's (e.g. `### Multi-GPU: --devices` slugs differently between the two).",
"MD004": false,
"MD013": false,
"MD026": false,
"MD028": false,
"MD031": false,
"MD032": false,
"MD040": false,
"MD051": false,
"MD060": false
}
Loading