Combine the power of nix-eval-jobs with nix-output-monitor to speed-up your evaluation and building process.
Go to file
Jörg Thalheim ae50c356c2 disable wait_stdin for now
This does not work yet
2023-09-13 13:07:38 +02:00
bin add bin wrapper for local dev 2023-09-08 11:08:50 +02:00
nix_ci_build disable wait_stdin for now 2023-09-13 13:07:38 +02:00
.envrc first commit 2023-09-08 10:13:07 +02:00
.gitignore gitigore: add python section 2023-09-08 11:11:45 +02:00
default.nix first commit 2023-09-08 10:13:07 +02:00
flake.lock add treefmt 2023-09-10 19:27:00 +02:00
flake.nix add treefmt 2023-09-10 19:27:00 +02:00
pyproject.toml first commit 2023-09-08 10:13:07 +02:00
README.md README: link to nix run 2023-09-13 11:30:14 +02:00
treefmt.nix add treefmt 2023-09-10 19:27:00 +02:00

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:

  1. It leverages the output from nix-eval-jobs to evaluate flake attributes in parallel.
  2. For each flake attribute, a separate nix-build process is spawned.
  3. 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