ci: add npc difftest
All checks were successful
Run CTests within npc / npc-test (push) Successful in 8m53s
Build abstract machine with nix / build-abstract-machine (pull_request) Successful in 4m37s

This commit is contained in:
xinyangli 2024-04-05 11:30:52 +08:00
parent 6f7d7ba383
commit e1438e25ed
Signed by: xin
SSH key fingerprint: SHA256:qZ/tzd8lYRtUFSrfBDBMcUqV4GHKxqeqRA3huItgvbk
7 changed files with 143 additions and 12 deletions

View file

@ -2,7 +2,8 @@
lib,
stdenv,
am-kernels,
dtc
dtc,
defconfig ? "alldefconfig",
}:
stdenv.mkDerivation rec {
@ -31,27 +32,27 @@ stdenv.mkDerivation rec {
configurePhase = ''
export NEMU_HOME=$(pwd)
make alldefconfig
make ${defconfig}
'';
buildPhase = ''
make
'';
doCheck = true;
checkPhase = ''
doCheck = (defconfig == "alldefconfig");
checkPhase = if doCheck then ''
export IMAGES_PATH=${am-kernels}/share/binary
make test
'';
'' else "";
installPhase = ''
mkdir -p $out/bin
mkdir -p $out/lib
make PREFIX=$out install
'';
shellHook = ''
export NEMU_HOME=$(pwd)
export IMAGES_PATH=${am-kernels}/share/binary
'';
meta = with lib; {