From 4fe1c763d896c1c5e6d3e3a9d9c50b43279fc7c6 Mon Sep 17 00:00:00 2001 From: Matthew de Detrich Date: Mon, 29 Jan 2024 21:54:52 +1100 Subject: [PATCH] Only run inliner in CI --- build.sbt | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/build.sbt b/build.sbt index 307b9b1..2e00787 100644 --- a/build.sbt +++ b/build.sbt @@ -145,14 +145,18 @@ val flagsFor13 = Seq( val flagsFor3 = Seq.empty ThisBuild / scalacOptions ++= { - CrossVersion.partialVersion(scalaVersion.value) match { - case Some((2, n)) if n == 13 => - flagsFor13 - case Some((2, n)) if n == 12 => - flagsFor12 - case Some((3, _)) => - Seq.empty - } + if (insideCI.value) { + val log = sLog.value + log.info("Running in CI, enabling Scala2 optimizer") + CrossVersion.partialVersion(scalaVersion.value) match { + case Some((2, n)) if n == 13 => + flagsFor13 + case Some((2, n)) if n == 12 => + flagsFor12 + case Some((3, _)) => + Seq.empty + } + } else Seq.empty } IntegrationTest / parallelExecution := false