@@ -22,16 +22,18 @@ import sloth.patching.BytecodePatcher
2222 */
2323object BloopWarmup {
2424 // First access boots the daemon; concurrent accessors block on lazy-val init until it's ready.
25+ // Skipped on CI where --server=false disables Bloop entirely.
2526 private lazy val booted : Unit = {
26- val dir = os.temp.dir(prefix = " sloth-bloop-warmup-" )
27- os.write.over(dir / " Warmup.scala" , " object Warmup\n " )
28- // Generous startup timeout so a cold daemon (JVM download + start) doesn't trip the 30s default.
29- os.proc(" scala-cli" , " compile" , " --jvm" , " 17" , " --bloop-startup-timeout" , " 180s" , " -S" , " 3.3.8" , dir.toString)
30- .call(check = false , stderr = os.Pipe , stdout = os.Pipe )
31- os.remove.all(dir)
27+ if (! TestPaths .isCI) {
28+ val dir = os.temp.dir(prefix = " sloth-bloop-warmup-" )
29+ os.write.over(dir / " Warmup.scala" , " object Warmup\n " )
30+ os.proc(" scala-cli" , " compile" , " --jvm" , " 17" , " --bloop-startup-timeout" , " 180s" , " -S" , " 3.3.8" , dir.toString)
31+ .call(check = false , stderr = os.Pipe , stdout = os.Pipe )
32+ os.remove.all(dir)
33+ }
3234 }
3335
34- /** Ensure the Bloop daemon is running before launching parallel compilations. Idempotent. */
36+ /** Ensure the Bloop daemon is running before launching parallel compilations. Idempotent. No-op on CI. */
3537 def ensure (): Unit = booted
3638}
3739
@@ -121,7 +123,7 @@ class ExampleRunner(
121123 // default target and is therefore only run on the JDK-25 leg (used as a static reference here).
122124 val releaseArgs = if (scalaVersion.startsWith(" 3.8" )) Seq .empty else Seq (" --release" , " 9" )
123125 val result = os
124- .proc(" scala-cli" , " compile" , " --jvm" , " 17" , " --bloop-startup-timeout " , " 180s " , releaseArgs, " -S" , scalaVersion, targetDir.toString)
126+ .proc(" scala-cli" , " compile" , " --jvm" , " 17" , TestPaths .scalaCliServerArgs , releaseArgs, " -S" , scalaVersion, targetDir.toString)
125127 .call(cwd = targetDir, stderr = os.Pipe , stdout = os.Pipe , check = false )
126128
127129 // Only log output if compilation failed or not in quiet mode
0 commit comments