Mic92 / nix-fast-build

Combine the power of nix-eval-jobs with nix-output-monitor to speed-up your evaluation and building process.
MIT License
226 stars 10 forks source link

Skipping non-native derivations even when supported by extra-platforms #51

Closed SomeoneSerge closed 8 months ago

SomeoneSerge commented 8 months ago
      run: >
          nix run github:Mic92/nix-fast-build
          -- --skip-cached --no-nom
          --flake
          ".#checks.aarch64-linux"

https://github.com/SomeoneSerge/llama.cpp/blob/998c9b2cf6c77f365b50b6645b41ff81eaedd450/.github/workflows/nix-ci.yml#L102-L106

...run on an x86_64-linux (ubuntu-latest) host, configured with extra-platforms = aarch64-linux

...results in the successful exit but 0 actual builds happening. The same command works fine if nix.conf instead contains system = aarch64-linux and extra-platforms: x86_64-linux

Encountered in https://github.com/ggerganov/llama.cpp/pull/4709

Mic92 commented 8 months ago

nix run github:Mic92/nix-fast-build -- --systems "aarch64-linux x86_64-linux" should work.

Mic92 commented 8 months ago

Afaik this option is set by the binfmt wrapper as well. But since emulation is slow, I would not want to make check the value of extra-platforms to decide what systems to build. The explicit --systems flag seems like a better trade off that will also work if remote builders are used.

SomeoneSerge commented 8 months ago

--systems is what I went with as well

Re: binfmt wrapper

Afaiu with the ubuntu runners one has to passthe flag manually

Re: what systems to build based on extra platforms

I had to pass the .#checks.${system} manually anyway, which is why I thought it weird that nixfastbuild performs additional filtering

Mic92 commented 8 months ago

It uses nix-eval-jobs to get the system of builds and does the filtering there. It does not try to figure out the system based the flake attr path yet since this may be not well defined in some cases. Once we got flake schema we can re-think that.