kitsune-soc / kitsune

🦊 (fast) ActivityPub-federated microblogging
https://joinkitsune.org
Other
299 stars 19 forks source link

Fix and improve the nix flake #512

Closed haraldh closed 6 months ago

haraldh commented 6 months ago
haraldh commented 6 months ago

Want me to disable cargo test in the "Nix checks" action (nix build)? There is a cargo nextest already, and you probably don't want to edit flake.nix constantly to disable tests, which need docker

aumetra commented 6 months ago

Yeah, I think testing inside the nix build isn't really needed since we have our CI to ensure buildability.

haraldh commented 6 months ago

Done as a separate commit, so it is easy to revert.

aumetra commented 6 months ago

Thank you for introducing the crane library, I saw a bit about it but never really looked into it too much.
About the Nix build though, is it doing a full release build? The timings seem like it. Can we downgrade that to a debug build in CI maybe?

haraldh commented 6 months ago

I had a misconfig in the crane calls, so it did not use the cached dependency build... Fixed that. Additionally the last commit changes the default to the dev profile, which is the debug mode. This although populates the github cache with lots more payload, because the debug artifacts are way bigger.

haraldh commented 6 months ago

Don't know why the build has failed.. no logs available. Maybe it ran out of RAM??

aumetra commented 6 months ago

Just gonna rerun it, maybe it works now? If not, then I'll have a look.
Yeah, I'd assume either RAM or disk space. Either way it's not good. I really need to start profiling the compilation and figure out where all the RAM is going

haraldh commented 6 months ago

I had to change the nix build TMPDIR for my system, because it builds in /tmp and this is a tmpfs

haraldh commented 6 months ago
kitsune-cli> installing /build/source/target/debug/kitsune-cli
kitsune-cli> cp: error copying '/build/source/target/debug/kitsune-cli' to '/nix/store/yjnadx1arhqmg9yj4y955w8ar3x8hnyr-kitsune-cli-0.0.1-pre.6/bin/kitsune-cli': No space left on device
error (ignored): error: cannot unlink '/tmp/nix-build-kitsune-0.0.1-pre.6.drv-0/source/target/debug/deps': Directory not empty
error: writing to file: No space left on device

Seems like a 2 debug builds in parallel is too big :)

aumetra commented 6 months ago

Thank you for working on this! This looks really good