Skip to content

Commit

Permalink
[ci] remove graalvm support
Browse files Browse the repository at this point in the history
The lihaoyi::requests library use a global mutable memory region to
store HTTP session, and that memory region doesn't handle well in
graalvm version < 24. We don't want to bump the whole nixpkgs for now,
so let's just drop that buggy thing.

Signed-off-by: Avimitin <[email protected]>
Avimitin authored and sequencer committed Jan 12, 2025
1 parent 41e4c40 commit 5dd37b7
Showing 2 changed files with 8 additions and 4 deletions.
3 changes: 2 additions & 1 deletion script/ci/src/Main.scala
Original file line number Diff line number Diff line change
@@ -214,7 +214,8 @@ object Main:
def findCurrentJobURL() =
val runID = sys.env("GITHUB_RUN_ID")
val jobName = sys.env("GITHUB_JOB_NAME")
Logger.info(s"Getting URL for Run ID: ${runID}, job ${jobName}")
Logger.info(s"Getting URL for Run ID: ${runID}, job '${jobName}'")

val response = requests.get.stream(s"https://api.github.com/repos/chipsalliance/t1/actions/runs/${runID}/jobs")
val ciData = ujson.read(response)
ciData
9 changes: 6 additions & 3 deletions script/default.nix
Original file line number Diff line number Diff line change
@@ -3,13 +3,14 @@
, fetchMillDeps
, makeWrapper

, add-determinism
, metals
, mill
, graalvm-ce
}:

let
mkHelper = { moduleName, scriptSrc, outName }:
mkHelper = { moduleName, scriptSrc, outName, enableNativeExe ? true }:
let
self = stdenv.mkDerivation rec {
name = "t1-${moduleName}-script";
@@ -54,12 +55,13 @@ let
nativeBuildInputs = [
mill
graalvm-ce
add-determinism

makeWrapper
passthru.millDeps.setupHook
];

enableNativeExe = true;
inherit enableNativeExe;

buildPhase = ''
runHook preBuild
@@ -85,6 +87,7 @@ let
else
mkdir -p $out/share/java
mv out/${moduleName}/assembly.dest/out.jar $out/share/java/${moduleName}.jar
add-determinism $out/share/java/${moduleName}.jar
makeWrapper ${mill.jre}/bin/java $out/bin/${outName} \
--add-flags "-jar $out/share/java/${moduleName}.jar"
fi
@@ -99,5 +102,5 @@ let
in
{
t1-helper = mkHelper { moduleName = "emu"; scriptSrc = ./emu; outName = "t1-helper"; };
ci-helper = mkHelper { moduleName = "ci"; scriptSrc = ./ci; outName = "ci-helper"; };
ci-helper = mkHelper { moduleName = "ci"; scriptSrc = ./ci; outName = "ci-helper"; enableNativeExe = false; };
}

0 comments on commit 5dd37b7

Please sign in to comment.