Skip to content

Commit e39a190

Browse files
committed
chore: add support for sbt-test in the new build
1 parent 71fcd1a commit e39a190

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
@@ -497,3 +497,26 @@ jobs:
497497
- uses: sbt/setup-sbt@v1
498498
- name: Test `tasty-core-bootstrapped`
499499
run: ./project/scripts/sbt tasty-core-bootstrapped-new/test
500+
501+
sbt-test:
502+
runs-on: ubuntu-latest
503+
##needs: [scala3-sbt-bridge-bootstrapped,
504+
## scala3-library-bootstrapped,
505+
## scala3-compiler-bootstrapped,
506+
## tasty-core-bootstrapped,
507+
## scala3-library-sjs,
508+
## scala3-tasty-inspector,
509+
## scala3-staging] Add when we add support for caching here
510+
steps:
511+
- name: Git Checkout
512+
uses: actions/checkout@v5
513+
514+
- name: Set up JDK 17
515+
uses: actions/setup-java@v4
516+
with:
517+
distribution: 'temurin'
518+
java-version: 17
519+
cache: 'sbt'
520+
- uses: sbt/setup-sbt@v1
521+
- name: Run `sbt-test`
522+
run: ./project/scripts/sbt sbt-test-new/scripted

build.sbt

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

5757
val `sbt-test` = Build.`sbt-test`
58+
val `sbt-test-new` = Build.`sbt-test-new`
5859

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

project/Build.scala

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2684,6 +2684,40 @@ object Build {
26842684
},
26852685
)
26862686

2687+
// ==============================================================================================
2688+
// ========================================= TEST SUITE =========================================
2689+
// ==============================================================================================
2690+
2691+
lazy val `sbt-test-new` = project.in(file("sbt-test"))
2692+
.enablePlugins(ScriptedPlugin)
2693+
.settings(
2694+
sbtTestDirectory := baseDirectory.value,
2695+
// The batch mode accidentally became the default with no way to disable
2696+
// it in sbt 1.4 (https://github.com/sbt/sbt/issues/5913#issuecomment-716003195).
2697+
// We enable it explicitly here to make it clear that we're using it.
2698+
scriptedBatchExecution := true,
2699+
scriptedLaunchOpts ++= Seq(
2700+
s"-Dplugin.scalaVersion=${dottyVersion}",
2701+
s"-Dplugin.scala2Version=${stdlibVersion(Bootstrapped)}",
2702+
s"-Dplugin.scalaJSVersion=${scalaJSVersion}",
2703+
),
2704+
scriptedBufferLog := true,
2705+
scripted := scripted.dependsOn(
2706+
(`scala3-sbt-bridge-bootstrapped` / publishLocalBin),
2707+
(`scala3-interfaces` / publishLocalBin),
2708+
(`scala3-compiler-bootstrapped-new` / publishLocalBin),
2709+
(`scala3-library-bootstrapped-new` / publishLocalBin),
2710+
(`scala-library-bootstrapped` / publishLocalBin),
2711+
(`scala-library-sjs` / publishLocalBin),
2712+
(`scala3-library-sjs` / publishLocalBin),
2713+
(`tasty-core-bootstrapped-new` / publishLocalBin),
2714+
(`scala3-staging-new` / publishLocalBin),
2715+
(`scala3-tasty-inspector-new` / publishLocalBin),
2716+
(`scaladoc-new` / publishLocalBin),
2717+
(`scala3-bootstrapped-new` / publishLocalBin),
2718+
).evaluated,
2719+
)
2720+
26872721
def dottyLibrary(implicit mode: Mode): Project = mode match {
26882722
case NonBootstrapped => `scala3-library`
26892723
case Bootstrapped => `scala3-library-bootstrapped`

0 commit comments

Comments
 (0)