Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add release.nix for hydra consumption #97

Merged
merged 16 commits into from Mar 14, 2020

Conversation

samueldr
Copy link
Member

@samueldr samueldr commented Mar 14, 2020

This adds all the necessary machinery to eval the significant bits of the project on an Hydra instance.

This evals all the overlay packages, and all the devices, for all systems configured in the hydra jobset (defaults to builtins.currentSystem), with cross-compilation enabled where relevant.

The tested aggregate job is intended to stretch Nixpkgs compatibility. That job should track all breakage Nixpkgs may introduce.

This also adds some trace output to the usual builds. This is especially useful when using nix-instantiate to figure out which config failed to eval.


Note

This is blocked on #91, though really, on a replacement PR for #91, where an actually bootable cross-compilable stage-2 is being built by default.


Closes #40.

A device-only "release.nix", something like release-device.nix may be helpful for the simpler use case of one individual wanting to make an hydra jobset for a specific device and nothing else.

This is useful when doing a "batch eval", where you can see which device
caused the eval to fail more easily.
Those are sent as a parameter to the derivation. This is part of the
internal API allowing the coming release.nix to make generic builds for
the overlay.
Will be used by the release.nix configurations. Though these may be just
as useful as the x86_64 one is!
This file, to be checked via a CI task, should always contain the full
list of devices from the devices folder.

Though, with that said, a device line may be commented out.

All devices have to be ordered alphabetically, including those commented
out.
This release.nix is intended to provide:

 * Builds for our overlay
 * Builds for all devices
Only to remind the poor soul that their build has some side-effects.
This begins to smell like spaghetti :/
@samueldr samueldr added the 4. type: enhancement New feature or request label Mar 14, 2020
@samueldr samueldr changed the title Add release.nix for hydra consumption [WIP] Add release.nix for hydra consumption Mar 14, 2020
Copy link
Member

@grahamc grahamc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

default_configuration =
let
configPathFromNixPath = (builtins.tryEval <mobile-nixos-configuration>).value;
in
if configPathFromNixPath != false then [ configPathFromNixPath ]
else if (builtins.pathExists ./local.nix) then [ (import ./local.nix) ]
else if (builtins.pathExists ./local.nix) then builtins.trace "WARNING: evaluation includes ./local.nix" [ (import ./local.nix) ]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice.

@samueldr samueldr force-pushed the feature/hydra branch 2 times, most recently from ad1ee77 to 1130301 Compare March 14, 2020 02:39
@samueldr samueldr changed the title [WIP] Add release.nix for hydra consumption Add release.nix for hydra consumption Mar 14, 2020
@samueldr samueldr merged commit a6d221c into NixOS:master Mar 14, 2020
@samueldr samueldr deleted the feature/hydra branch March 14, 2020 02:52
@knedlsepp
Copy link
Member

Will we see this on the official hydra.nixos.org?

@samueldr
Copy link
Member Author

Yes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4. type: enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants