Add Hydra spec for Solo5 pull requests
This commit is contained in:
parent
c1acd31f76
commit
e3589e5a41
|
@ -13,7 +13,7 @@ let
|
||||||
nic_bus = callPackage ./pkgs/nic_bus { };
|
nic_bus = callPackage ./pkgs/nic_bus { };
|
||||||
});
|
});
|
||||||
nova = callPackage ./NOVA { };
|
nova = callPackage ./NOVA { };
|
||||||
solo5 = callPackage ./solo5 { };
|
solo5 = callPackage ./pkgs/solo5 { };
|
||||||
};
|
};
|
||||||
|
|
||||||
toolchainOverlay = import ./toolchain-overlay;
|
toolchainOverlay = import ./toolchain-overlay;
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
{
|
{
|
||||||
"enabled": 1,
|
"enabled": 1,
|
||||||
"hidden": false,
|
"hidden": true,
|
||||||
"description": "Genode packages collection",
|
"description": ".jobsets",
|
||||||
"nixexprinput": "genodepkgs",
|
"nixexprinput": "genodepkgs",
|
||||||
"nixexprpath": "hydra/jobsets.nix",
|
"nixexprpath": "hydra/jobsets.nix",
|
||||||
"checkinterval": 300,
|
"checkinterval": 300,
|
||||||
"schedulingshares": 100,
|
"schedulingshares": 100,
|
||||||
"enableemail": false,
|
"enableemail": false,
|
||||||
"emailoverride": "",
|
"emailoverride": "ehmry@posteo.net",
|
||||||
"keepnr": 3,
|
"keepnr": 3,
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"genodepkgs": {
|
"genodepkgs": {
|
||||||
|
@ -19,6 +19,11 @@
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"value": "https://gitea.c3d2.de/ehmry/nixpkgs.git hybrid-19.09",
|
"value": "https://gitea.c3d2.de/ehmry/nixpkgs.git hybrid-19.09",
|
||||||
"emailresponsible": false
|
"emailresponsible": false
|
||||||
|
},
|
||||||
|
"solo5PullRequests": {
|
||||||
|
"type": "githubpulls",
|
||||||
|
"value": "solo5 solo5",
|
||||||
|
"emailresponsible": false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -1,5 +1,6 @@
|
||||||
{ genodepkgs ? ../default.nix
|
{ genodepkgs ? ../default.nix
|
||||||
, nixpkgs ? import ../nixpkgs.nix
|
, nixpkgs ? import ../nixpkgs.nix
|
||||||
|
, solo5PullRequests
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
|
@ -17,7 +18,9 @@ let
|
||||||
keepnr = 8;
|
keepnr = 8;
|
||||||
};
|
};
|
||||||
|
|
||||||
jobsets = {
|
solo5 = import ./solo5-jobs.nix { pullRequests = solo5PullRequests; };
|
||||||
|
|
||||||
|
jobsets = ({
|
||||||
|
|
||||||
trunk = mkJobSet {
|
trunk = mkJobSet {
|
||||||
description = "Genodepkgs master branch";
|
description = "Genodepkgs master branch";
|
||||||
|
@ -65,6 +68,6 @@ let
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
} // solo5);
|
||||||
|
|
||||||
in { jobsets = pkgs.writeText "jobsets.json" (builtins.toJSON jobsets); }
|
in { jobsets = pkgs.writeText "jobsets.json" (builtins.toJSON jobsets); }
|
||||||
|
|
|
@ -0,0 +1,61 @@
|
||||||
|
# SPDX-FileCopyrightText: Emery Hemingway
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: LicenseRef-Hippocratic-1.1
|
||||||
|
|
||||||
|
{ pullRequests }:
|
||||||
|
|
||||||
|
with builtins;
|
||||||
|
|
||||||
|
let
|
||||||
|
pullRequests' = fromJSON (readFile pullRequests);
|
||||||
|
|
||||||
|
prToJob = pr:
|
||||||
|
{
|
||||||
|
name = "solo5-${toString pr.number}";
|
||||||
|
value = {
|
||||||
|
|
||||||
|
description = pr.title;
|
||||||
|
nixexprpath = "hydra/solo5.nix";
|
||||||
|
enabled = 1;
|
||||||
|
hidden = false;
|
||||||
|
nixexprinput = "genodepkgs";
|
||||||
|
checkinterval = 300;
|
||||||
|
schedulingshares = 100;
|
||||||
|
enableemail = false;
|
||||||
|
emailoverride = "";
|
||||||
|
keepnr = 8;
|
||||||
|
|
||||||
|
inputs = {
|
||||||
|
|
||||||
|
prSrc = {
|
||||||
|
type = "git";
|
||||||
|
value = "${pr.head.repo.clone_url} ${pr.head.ref}";
|
||||||
|
emailresponsible = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
genodepkgs = {
|
||||||
|
type = "git";
|
||||||
|
value = "https://gitea.c3d2.de/ehmry/genodepkgs.git master";
|
||||||
|
emailresponsible = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
nixpkgs = {
|
||||||
|
type = "git";
|
||||||
|
value = "https://gitea.c3d2.de/ehmry/nixpkgs.git hybrid-19.09";
|
||||||
|
emailresponsible = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
nim-overlay = {
|
||||||
|
type = "git";
|
||||||
|
value = "https://git.sr.ht/~ehmry/nim-overlay";
|
||||||
|
emailresponsible = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
jobs = map prToJob (attrValues pullRequests');
|
||||||
|
|
||||||
|
in listToAttrs jobs
|
|
@ -0,0 +1,20 @@
|
||||||
|
# SPDX-FileCopyrightText: Emery Hemingway
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: LicenseRef-Hippocratic-1.1
|
||||||
|
|
||||||
|
{ genodepkgs, nixpkgs, nim-overlay, prSrc }:
|
||||||
|
|
||||||
|
let pkgs = import genodepkgs { inherit nixpkgs nim-overlay; };
|
||||||
|
in {
|
||||||
|
build.x86_64.solo5 = pkgs.solo5.overrideAttrs (attrs: {
|
||||||
|
src = prSrc;
|
||||||
|
preeConfigure = ''
|
||||||
|
cat <<EOM >include/solo5/solo5_version.h.distrib
|
||||||
|
#ifndef __VERSION_H__
|
||||||
|
#define __VERSION_H__
|
||||||
|
#define SOLO5_VERSION "pull-request-test"
|
||||||
|
#endif
|
||||||
|
EOM
|
||||||
|
'';
|
||||||
|
});
|
||||||
|
}
|
|
@ -20,14 +20,20 @@ in stdenv.mkDerivation {
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
configurePhase = "HOSTCC=${buildPackages.stdenv.cc}/bin/cc sh configure.sh";
|
configurePhase = ''
|
||||||
|
runHook preConfigure
|
||||||
|
HOSTCC=${buildPackages.stdenv.cc}/bin/cc sh configure.sh
|
||||||
|
runHook postConfigure
|
||||||
|
'';
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
|
runHook preInstall
|
||||||
mkdir -p $out/bin $tests/bin
|
mkdir -p $out/bin $tests/bin
|
||||||
make install-opam-genode PREFIX=$out
|
make install-opam-genode PREFIX=$out
|
||||||
for test in tests/*/*.genode; do
|
for test in tests/*/*.genode; do
|
||||||
cp $test $tests/bin/solo5-`basename $test .genode`
|
cp $test $tests/bin/solo5-`basename $test .genode`
|
||||||
done
|
done
|
||||||
|
runHook postInstall
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
Loading…
Reference in New Issue