-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ci] merge dump-wave into pr workflow
Signed-off-by: Avimitin <[email protected]>
- Loading branch information
Showing
5 changed files
with
33 additions
and
80 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{ lib | ||
, runCommandLocal | ||
, fetchFromGitHub | ||
, mill | ||
, fetchMillDeps | ||
, millSetupHook | ||
|
@@ -22,45 +22,34 @@ | |
, # Try speed up compilation | ||
llvmPackages_14 | ||
, # Compile options | ||
emulatorTypes ? [ "v1024l8b2-test" ] | ||
emulatorTypes ? [ "v1024l8b2-test" "v1024l8b2-test-trace" ] | ||
, emulatorSrc ? null | ||
}: | ||
|
||
assert lib.assertMsg ((builtins.typeOf emulatorTypes) == "list") "`emulatorTypes` is not a `list`"; | ||
|
||
let | ||
srcs = [ | ||
../build.sc | ||
../common.sc | ||
../v | ||
../run | ||
../emulator | ||
../elaborator | ||
../dependencies | ||
../configs | ||
]; | ||
# We can simpliy reference the whole repository, but it will let the emulator build again and again | ||
# even when we are editing GitHub Action workflow. | ||
pureEmulatorSrc = runCommandLocal "prepareEmulatorSrc" { inherit srcs; } '' | ||
mkdir -p $out && cd $out | ||
srcArray=( $srcs ) | ||
for src in ''${srcArray[@]}; do | ||
dest="$(stripHash "$src")" | ||
cp -pr --reflink=auto -- "$src" "$dest" | ||
done | ||
''; | ||
|
||
src = if (builtins.typeOf emulatorSrc != "null") then emulatorSrc else pureEmulatorSrc; | ||
t1 = (fetchFromGitHub { | ||
owner = "chipsalliance"; | ||
repo = "t1"; | ||
rev = "1f6bf0b79682d88dc3e95c24c9567a584d6fd9dd"; | ||
hash = "sha256-okDsnjmEJplIfiIMdb0X1hvMYWEj/Wg7w26XJ2KdXvE="; | ||
fetchSubmodules = true; | ||
}).overrideAttrs (_: { | ||
GIT_CONFIG_COUNT = 1; | ||
GIT_CONFIG_KEY_0 = "url.https://github.com/.insteadOf"; | ||
GIT_CONFIG_VALUE_0 = "[email protected]:"; | ||
}); | ||
in | ||
llvmPackages_14.stdenv.mkDerivation rec { | ||
version = "unstable-2023-10"; | ||
pname = "emulator"; | ||
inherit src; | ||
|
||
src = if (builtins.typeOf emulatorSrc != "null") then emulatorSrc else t1; | ||
|
||
millDeps = fetchMillDeps { | ||
inherit src pname; | ||
millDepsHash = "sha256-Z/CobcyBWB3y81iT+IFVapRn1gJh7ky71es11a4NvCU="; | ||
millDepsHash = "sha256-8dUmHN85GLthNzHCt5vSO/bH+KdOMopLQ6rCgTnoRPk="; | ||
}; | ||
|
||
nativeBuildInputs = [ | ||
|