mirror of
https://github.com/Mic92/nix-fast-build.git
synced 2024-09-11 17:57:59 +03:00
Combine the power of nix-eval-jobs with nix-output-monitor to speed-up your evaluation and building process.
bin | ||
nix_ci_build | ||
.envrc | ||
.gitignore | ||
default.nix | ||
flake.lock | ||
flake.nix | ||
pyproject.toml | ||
README.md | ||
treefmt.nix |
nix-ci-build
Combine the power of nix-eval-jobs
with nix-output-monitor
to supercharge your ci evaluation and building process.
Why nix-ci-build
?
Problem: Evaluating and building big flakes i.e. with numerous NixOS machines can be painfully slow.
Our Solution: nix-ci-build
offers a seamless experience by evaluating and building your nix packages concurrently, drastically reducing the overall time.
How Does It Work?
Under the hood:
- It leverages the output from
nix-eval-jobs
to evaluate flake attributes in parallel. - For each flake attribute, a separate
nix-build
process is spawned. - Lastly,
nix-output-monitor
to show the build progress nicely.
Usage
To get started, simply run:
$ nix-ci-build
or:
$ nix run github:Mic92/nix-ci-build
This command will concurrently evaluate and build the attributes .#checks.$currentSystem
.
Enjoy faster and more efficient NixOS builds with nix-ci-build
!
Reference
usage: nix-ci-build [-h] [-f FLAKE] [-j MAX_JOBS] [--option OPTION]
[--systems SYSTEMS] [--retries RETRIES] [--skip-cached]
[--copy-to COPY_TO] [--verbose]
[--eval-max-memory-size EVAL_MAX_MEMORY_SIZE]
[--eval-workers EVAL_WORKERS]
options:
-h, --help show this help message and exit
-f FLAKE, --flake FLAKE
Flake url to evaluate/build (default: .#checks
-j MAX_JOBS, --max-jobs MAX_JOBS
Maximum number of build jobs to run in parallel (0 for
unlimited)
--option OPTION Nix option to set
--systems SYSTEMS Comma-separated list of systems to build for (default:
current system)
--retries RETRIES Number of times to retry failed builds
--skip-cached Skip builds that are already present in the binary
cache (default: false)
--copy-to COPY_TO Copy build results to the given path (passed to nix
copy, i.e. file:///tmp/cache?compression=none)
--verbose Print verbose output
--eval-max-memory-size EVAL_MAX_MEMORY_SIZE
Maximum memory size for nix-eval-jobs (in MiB) per
worker. After the limit is reached, the worker is
restarted.
--eval-workers EVAL_WORKERS
Number of evaluation threads spawned