Skip to content

Commit 23f2927

Browse files
committed
Limit CI parallelism and improve install phase error handling
Add max-parallel: 1 to build-linux matrix to prevent concurrent jobs from overwhelming the Magic Nix Cache. Refactor mkInstallPhase to properly detect missing library files and fail with a clear error message instead of silently succeeding.
1 parent a1e9403 commit 23f2927

2 files changed

Lines changed: 13 additions & 2 deletions

File tree

.github/workflows/nix.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ jobs:
4343
needs: check
4444
strategy:
4545
fail-fast: false
46+
max-parallel: 1
4647
matrix:
4748
target:
4849
- x86_64_unknown_linux_gnu

flake.nix

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,18 @@
6262
# Find and copy the shared library with NAPI-RS naming convention
6363
# Cargo builds a cdylib (.so on Linux, .dylib on macOS)
6464
# Node.js expects native addons to have .node extension
65-
if ! find target -name "liblightning_js.so" -exec cp {} $out/lib/${nodeName} \; 2>/dev/null; then
66-
find target -name "liblightning_js.dylib" -exec cp {} $out/lib/${nodeName} \; 2>/dev/null || true
65+
found=""
66+
for ext in so dylib; do
67+
lib=$(find target -name "liblightning_js.$ext" -type f | head -1)
68+
if [ -n "$lib" ]; then
69+
cp "$lib" "$out/lib/${nodeName}"
70+
found=1
71+
break
72+
fi
73+
done
74+
if [ -z "$found" ]; then
75+
echo "ERROR: Could not find liblightning_js.so or liblightning_js.dylib"
76+
exit 1
6777
fi
6878
'';
6979

0 commit comments

Comments
 (0)