-
Notifications
You must be signed in to change notification settings - Fork 11
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
Feat/support projectmatrix and support better crossbuilding #440
base: main
Are you sure you want to change the base?
Feat/support projectmatrix and support better crossbuilding #440
Conversation
36f8dcf
to
6f4cdd4
Compare
|
.value, | ||
doc / skip := BuildAssertions.requireNative(true).value, | ||
Compile / doc / sources := BuildAssertions.requireNative(Seq.empty).value | ||
// Test / test := { val _ = (Test / compile).value; () } // ?? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why was this previously set? What is the benefit?
92e42b4
to
6278bc7
Compare
b44ab58
to
492eead
Compare
492eead
to
a4c166f
Compare
_.flatten | ||
) ++ | ||
Seq(Lint.value) ++ | ||
(if (ciCheckMima.value) Seq(CheckMima.value) else Seq.empty[Step.SingleStep]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps it is better to have dedicated mima jobs? Per Scala version/platform?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
checkMima is now part of the lint job. Can be disabled with checkMima / skip := true
f9cbda1
to
a2bad89
Compare
This PR contains quite some changes but tries to minimize the impact for the user.
After working with multiple zio-repos I noticed the build and ci setups have quite some duplication (copy paste) but also quite some differences (diverging over time). With this PR I hope the projects can scrap a lot of their own boilerplate and reuse as much as is convenient from the plugins from zio-sbt.
There are multiple projects which are building JS, JVM and Native separately in CI, this PR now does that by default by including the platforms in the ci-matrix.
The
I added two new plugins:
ZioSbtProjectPlugin
andZioSbtShared
ZioSbtShared contains banner and tasks utils. Easy helpers to show info to the user.
ZioSbtProjectPlugin sets a default
javaPlatform
to target when building artifacts by setting the-release
flag.The plugin also adds a banner to show what java and scala versions and platforms are being used in the project.
e.g.
I have added multiple compile and test tasks:
compileJVM2_12
compileJVM2_13
compileJVM3
compileJVM
compileJS2_12
compileJS2_13
compileJS3
compileJS
compileNative2_12
compileNative2_13
compileNative3
compileNative
compile2_12
compile2_13
compile3
compile
testJVM2_12
testJVM2_13
testJVM3
testJVM
testJS2_12
testJS2_13
testJS3
testJS
testNative2_12
testNative2_13
testNative3
testNative
test2_12
test2_13
test3
test
When using sbt-projectmatrix the idea is to have all in the same build scope. You will see the welcome message showing tasks for all versions and platforms available. If a compile or test task is tried for a something which is not in the current context then it will be an empty task.
ZioSbtCiPlugin I extended here and there. Based on the platforms and scala versions it will now create a matrix for the ci jobs as default behaviour.
It is now also possible to set a java distribution via
ciDefaultJavaDistribution
.Check the README.md for other changes.
note: this PR also contains migrations to zio-json, as I continued on my previous PR #438