Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

drop sbt 1.3.x support & speedup CI by parallelizing scripted #412

Merged
merged 5 commits into from
Sep 23, 2024

Conversation

bjaglin
Copy link
Collaborator

@bjaglin bjaglin commented Apr 22, 2024

Goals

  • simplify the build
  • run scripted tests in parallel (20min -> 8min for CI)

Why can we do it?

TODO

@bjaglin bjaglin force-pushed the dropsbt13 branch 4 times, most recently from a9ee330 to 5186725 Compare April 22, 2024 22:55
@bjaglin bjaglin force-pushed the dropsbt13 branch 12 times, most recently from dae31f4 to aa7033a Compare April 23, 2024 21:40
@bjaglin bjaglin mentioned this pull request Apr 23, 2024
@@ -73,6 +73,8 @@ scalacOptions ++= List(
enablePlugins(ScriptedPlugin)
sbtPlugin := true
scriptedBufferLog := false
scriptedBatchExecution := true
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

despite the intent of sbt/sbt#6151, scriptedBatchExecution is never true by default (because binVersion is "1" on sbt 1.x)

@bjaglin bjaglin changed the title drop sbt 1.3.x support drop sbt 1.3.x support [on hold until sbt-scalafix 0.13.x] Apr 23, 2024
@bjaglin bjaglin changed the title drop sbt 1.3.x support [on hold until sbt-scalafix 0.13.x] drop sbt 1.3.x support [on hold until sbt-scalafix 0.13.0] Apr 23, 2024
@bjaglin bjaglin force-pushed the dropsbt13 branch 2 times, most recently from 9eac61b to afdf5e3 Compare April 24, 2024 07:03
@bjaglin bjaglin changed the title drop sbt 1.3.x support [on hold until sbt-scalafix 0.13.0] drop sbt 1.3.x support & parallelize CI [on hold until sbt-scalafix 0.13.0] Apr 24, 2024
@bjaglin bjaglin force-pushed the dropsbt13 branch 2 times, most recently from fde3f81 to 87e05d2 Compare April 24, 2024 09:46
@@ -73,8 +73,9 @@ scalacOptions ++= List(
enablePlugins(ScriptedPlugin)
sbtPlugin := true
scriptedBufferLog := false
scriptedBatchExecution := true
scriptedParallelInstances := 2
Copy link
Collaborator Author

@bjaglin bjaglin Apr 24, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried 4 initially, but it brings transient failures on CI (every other run roughly...). Anyway, it seems slower overall when it passes, probably because of increased CPU/memory pressure, as standard VMs are 4 vCPU/16GB, and we request 4GB heap for the main process and 2GB per scripted batch.

@bjaglin bjaglin force-pushed the dropsbt13 branch 16 times, most recently from c137041 to 749823f Compare April 24, 2024 20:15
@bjaglin bjaglin force-pushed the dropsbt13 branch 2 times, most recently from a8d98c5 to 0dc413b Compare May 1, 2024 18:34
@@ -40,14 +45,17 @@ jobs:
- uses: coursier/setup-action@v1
with:
jvm: temurin:21
- run: sbt "test; scripted sbt-scalafix/* skip-windows/*"
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sbt-1.5/* was ignored on JDK21 until now. The fix was simply to bump a compatible scala 3 version (per the compatibility matrix).

@bjaglin bjaglin changed the title drop sbt 1.3.x support & speedup CI by parallelizing scripted [on hold until sbt-scalafix 0.13.0] drop sbt 1.3.x support & speedup CI by parallelizing scripted Sep 23, 2024
scriptedBatchExecution effectively ignores custom build.properties, so this
takes a different approach, running one sbt version per execution, spread
over JDK versions for simplicity.
@bjaglin bjaglin marked this pull request as ready for review September 23, 2024 23:09
@bjaglin bjaglin merged commit 112e9a5 into scalacenter:main Sep 23, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant