diff --git a/.github/workflows/stdlib.yaml b/.github/workflows/stdlib.yaml index 3d58ce115f89..688d631eb2f9 100644 --- a/.github/workflows/stdlib.yaml +++ b/.github/workflows/stdlib.yaml @@ -333,3 +333,26 @@ jobs: - uses: sbt/setup-sbt@v1 - name: Test `tasty-core-bootstrapped` run: ./project/scripts/sbt tasty-core-bootstrapped-new/test + + sbt-test: + runs-on: ubuntu-latest + ##needs: [scala3-sbt-bridge-bootstrapped, + ## scala3-library-bootstrapped, + ## scala3-compiler-bootstrapped, + ## tasty-core-bootstrapped, + ## scala3-library-sjs, + ## scala3-tasty-inspector, + ## scala3-staging] Add when we add support for caching here + steps: + - name: Git Checkout + uses: actions/checkout@v5 + + - name: Set up JDK 17 + uses: actions/setup-java@v4 + with: + distribution: 'temurin' + java-version: 17 + cache: 'sbt' + - uses: sbt/setup-sbt@v1 + - name: Run `sbt-test` + run: ./project/scripts/sbt sbt-test-new/scripted diff --git a/build.sbt b/build.sbt index ca1925c76bda..52728e2a7e68 100644 --- a/build.sbt +++ b/build.sbt @@ -59,6 +59,7 @@ val sjsJUnitTests = Build.sjsJUnitTests val sjsCompilerTests = Build.sjsCompilerTests val `sbt-test` = Build.`sbt-test` +val `sbt-test-new` = Build.`sbt-test-new` inThisBuild(Build.thisBuildSettings) inScope(Global)(Build.globalSettings) diff --git a/project/Build.scala b/project/Build.scala index 0ce02826aa71..a560dd149a74 100644 --- a/project/Build.scala +++ b/project/Build.scala @@ -2368,6 +2368,27 @@ object Build { }.taskValue, ) + // ============================================================================================== + // ========================================= TEST SUITE ========================================= + // ============================================================================================== + + lazy val `sbt-test-new` = project.in(file("sbt-test")) + .enablePlugins(ScriptedPlugin) + .settings( + sbtTestDirectory := baseDirectory.value, + // The batch mode accidentally became the default with no way to disable + // it in sbt 1.4 (https://github.com/sbt/sbt/issues/5913#issuecomment-716003195). + // We enable it explicitly here to make it clear that we're using it. + scriptedBatchExecution := true, + scriptedLaunchOpts ++= Seq( + s"-Dplugin.scalaVersion=${dottyVersion}", + s"-Dplugin.scala2Version=${stdlibVersion(Bootstrapped)}", + s"-Dplugin.scalaJSVersion=${scalaJSVersion}", + ), + scriptedBufferLog := true, + scripted := scripted.dependsOn(`scala3-bootstrapped-new` / publishLocalBin).evaluated + ) + def dottyLibrary(implicit mode: Mode): Project = mode match { case NonBootstrapped => `scala3-library` case Bootstrapped => `scala3-library-bootstrapped`