Skip to content

Commit 26f7ebb

Browse files
committed
chore: add support for sbt-test in the new build
1 parent cacd117 commit 26f7ebb

File tree

3 files changed

+58
-0
lines changed

3 files changed

+58
-0
lines changed

.github/workflows/stdlib.yaml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -462,3 +462,26 @@ jobs:
462462
- uses: sbt/setup-sbt@v1
463463
- name: Test `tasty-core-bootstrapped`
464464
run: ./project/scripts/sbt tasty-core-bootstrapped-new/test
465+
466+
sbt-test:
467+
runs-on: ubuntu-latest
468+
##needs: [scala3-sbt-bridge-bootstrapped,
469+
## scala3-library-bootstrapped,
470+
## scala3-compiler-bootstrapped,
471+
## tasty-core-bootstrapped,
472+
## scala3-library-sjs,
473+
## scala3-tasty-inspector,
474+
## scala3-staging] Add when we add support for caching here
475+
steps:
476+
- name: Git Checkout
477+
uses: actions/checkout@v5
478+
479+
- name: Set up JDK 17
480+
uses: actions/setup-java@v4
481+
with:
482+
distribution: 'temurin'
483+
java-version: 17
484+
cache: 'sbt'
485+
- uses: sbt/setup-sbt@v1
486+
- name: Run `sbt-test`
487+
run: ./project/scripts/sbt sbt-test-new/scripted

build.sbt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ val sjsJUnitTests = Build.sjsJUnitTests
5656
val sjsCompilerTests = Build.sjsCompilerTests
5757

5858
val `sbt-test` = Build.`sbt-test`
59+
val `sbt-test-new` = Build.`sbt-test-new`
5960

6061
inThisBuild(Build.thisBuildSettings)
6162
inScope(Global)(Build.globalSettings)

project/Build.scala

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2445,6 +2445,40 @@ object Build {
24452445
},
24462446
)
24472447

2448+
// ==============================================================================================
2449+
// ========================================= TEST SUITE =========================================
2450+
// ==============================================================================================
2451+
2452+
lazy val `sbt-test-new` = project.in(file("sbt-test"))
2453+
.enablePlugins(ScriptedPlugin)
2454+
.settings(
2455+
sbtTestDirectory := baseDirectory.value,
2456+
// The batch mode accidentally became the default with no way to disable
2457+
// it in sbt 1.4 (https://github.com/sbt/sbt/issues/5913#issuecomment-716003195).
2458+
// We enable it explicitly here to make it clear that we're using it.
2459+
scriptedBatchExecution := true,
2460+
scriptedLaunchOpts ++= Seq(
2461+
s"-Dplugin.scalaVersion=${dottyVersion}",
2462+
s"-Dplugin.scala2Version=${stdlibVersion(Bootstrapped)}",
2463+
s"-Dplugin.scalaJSVersion=${scalaJSVersion}",
2464+
),
2465+
scriptedBufferLog := true,
2466+
scripted := scripted.dependsOn(
2467+
(`scala3-sbt-bridge-bootstrapped` / publishLocalBin),
2468+
(`scala3-interfaces` / publishLocalBin),
2469+
(`scala3-compiler-bootstrapped-new` / publishLocalBin),
2470+
(`scala3-library-bootstrapped-new` / publishLocalBin),
2471+
(`scala-library-bootstrapped` / publishLocalBin),
2472+
(`scala-library-sjs` / publishLocalBin),
2473+
(`scala3-library-sjs` / publishLocalBin),
2474+
(`tasty-core-bootstrapped-new` / publishLocalBin),
2475+
(`scala3-staging-new` / publishLocalBin),
2476+
(`scala3-tasty-inspector-new` / publishLocalBin),
2477+
(`scaladoc-new` / publishLocalBin),
2478+
(`scala3-bootstrapped-new` / publishLocalBin),
2479+
).evaluated,
2480+
)
2481+
24482482
def dottyLibrary(implicit mode: Mode): Project = mode match {
24492483
case NonBootstrapped => `scala3-library`
24502484
case Bootstrapped => `scala3-library-bootstrapped`

0 commit comments

Comments
 (0)