Build matrix
This commit is contained in:
parent
6fb0b1ec66
commit
80a4dbe8b9
4 changed files with 64 additions and 12 deletions
41
nix/ci.nix
41
nix/ci.nix
|
@ -1,6 +1,37 @@
|
|||
args@{ pkgs ? import ./default.nix args, system ? null, ... }:
|
||||
let
|
||||
sources = import ./sources.nix;
|
||||
lib = import (sources."nixpkgs" + "/lib");
|
||||
inherit (import sources."project.nix" { inherit lib; }) dimension;
|
||||
in
|
||||
|
||||
{
|
||||
inherit (pkgs) arion tests;
|
||||
doc = pkgs.recurseIntoAttrs (import ../doc { inherit pkgs; });
|
||||
}
|
||||
dimension "Nixpkgs version" {
|
||||
"nixos-19_03" = {
|
||||
nixpkgsSource = "nixpkgs";
|
||||
};
|
||||
"nixos-unstable" = {
|
||||
nixpkgsSource = "nixos-unstable";
|
||||
|
||||
# Broken on unstable, wontfix because doc tooling will be changed.
|
||||
# TODO: reenable
|
||||
enableDoc = false;
|
||||
};
|
||||
} (
|
||||
_name: { nixpkgsSource, enableDoc ? true }:
|
||||
|
||||
|
||||
dimension "System" {
|
||||
"x86_64-linux" = {};
|
||||
# TODO: darwin
|
||||
# "x86_64-darwin" = { enableNixOSTests = false; };
|
||||
} (
|
||||
system: {}:
|
||||
let
|
||||
pkgs = import ./. { inherit system; nixpkgsSrc = sources.${nixpkgsSource}; };
|
||||
in
|
||||
{
|
||||
inherit (pkgs) arion tests;
|
||||
} // lib.optionalAttrs enableDoc {
|
||||
doc = pkgs.recurseIntoAttrs (import ../doc { inherit pkgs; });
|
||||
}
|
||||
)
|
||||
)
|
||||
|
|
|
@ -1,9 +1,6 @@
|
|||
/**
|
||||
* This is the entry-point for all nix execution in this project.
|
||||
*/
|
||||
{ sources ? import ./sources.nix
|
||||
, nixpkgsSrc ? sources.nixpkgs
|
||||
, system ? null
|
||||
, system ? builtins.currentSystem
|
||||
, ...
|
||||
}:
|
||||
|
||||
|
@ -15,6 +12,5 @@ import nixpkgsSrc ({
|
|||
# all the packages are defined there:
|
||||
(import ./overlay.nix)
|
||||
];
|
||||
} // (if system == null then {} else {
|
||||
inherit system;
|
||||
}))
|
||||
})
|
||||
|
|
|
@ -8,7 +8,7 @@ let
|
|||
in
|
||||
{
|
||||
|
||||
arion = import ./arion.nix { pkgs = self; };
|
||||
inherit (import ./.. { pkgs = self; }) arion;
|
||||
tests = super.callPackage ../tests {};
|
||||
doc = super.callPackage ../doc {};
|
||||
|
||||
|
|
|
@ -11,6 +11,19 @@
|
|||
"url": "https://github.com/nmattia/niv/archive/1dd094156b249586b66c16200ecfd365c7428dc0.tar.gz",
|
||||
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
|
||||
},
|
||||
"nixos-unstable": {
|
||||
"branch": "nixos-unstable",
|
||||
"description": "A read-only mirror of NixOS/nixpkgs tracking the released channels. Send issues and PRs to",
|
||||
"homepage": "https://github.com/NixOS/nixpkgs",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs-channels",
|
||||
"rev": "cb4332e3eb6dfdb653f1fc7397a0292df228a533",
|
||||
"sha256": "1722wphznqhpfny08rcy19l85r2l893ckjc3h1vfivj6aj64fwjr",
|
||||
"type": "tarball",
|
||||
"url": "https://github.com/NixOS/nixpkgs-channels/archive/cb4332e3eb6dfdb653f1fc7397a0292df228a533.tar.gz",
|
||||
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz",
|
||||
"version": ""
|
||||
},
|
||||
"nixpkgs": {
|
||||
"branch": "nixos-19.03",
|
||||
"description": "A read-only mirror of NixOS/nixpkgs tracking the released channels. Send issues and PRs to",
|
||||
|
@ -22,5 +35,17 @@
|
|||
"type": "tarball",
|
||||
"url": "https://github.com/NixOS/nixpkgs-channels/archive/6420e2649fa9e267481fb78e602022dab9d1dcd1.tar.gz",
|
||||
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
|
||||
},
|
||||
"project.nix": {
|
||||
"branch": "master",
|
||||
"description": "A configuration manager for your projects",
|
||||
"homepage": null,
|
||||
"owner": "hercules-ci",
|
||||
"repo": "project.nix",
|
||||
"rev": "33e5f3cb25feff4ccd00f8c60a05976e2ee01802",
|
||||
"sha256": "0c3q3il5h6q3ms8m6da51knvjsfvpz12sh3a3av4d2a5ikm5ncl1",
|
||||
"type": "tarball",
|
||||
"url": "https://github.com/hercules-ci/project.nix/archive/33e5f3cb25feff4ccd00f8c60a05976e2ee01802.tar.gz",
|
||||
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue