-
Notifications
You must be signed in to change notification settings - Fork 7
/
build.sbt
56 lines (46 loc) · 1.81 KB
/
build.sbt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
ThisBuild / tlBaseVersion := "0.2"
ThisBuild / organization := "com.armanbilge"
ThisBuild / organizationName := "Arman Bilge"
ThisBuild / developers += tlGitHubDev("armanbilge", "Arman Bilge")
ThisBuild / startYear := Some(2022)
ThisBuild / crossScalaVersions := Seq("3.3.3", "2.13.14")
ThisBuild / githubWorkflowJavaVersions := Seq(JavaSpec.temurin("17"))
ThisBuild / githubWorkflowBuild ~= { steps =>
steps.flatMap {
case step: WorkflowStep.Sbt if step.commands == List("Test/nativeLink") =>
List(WorkflowStep.Sbt(List("compile"), name = Some("Compile")))
case step: WorkflowStep.Sbt if step.commands == List("test") => Nil
case step => List(step)
}
}
ThisBuild / githubWorkflowBuild +=
WorkflowStep.Run(
List("clang-format --dry-run --Werror uring/src/main/resources/scala-native/*.c"),
name = Some("Check formatting of C sources")
)
ThisBuild / githubWorkflowPublishPreamble +=
WorkflowStep.Use(
UseRef.Public("typelevel", "await-cirrus", "main"),
name = Some("Wait for Cirrus CI")
)
val fs2Version = "3.11.0"
val munitCEVersion = "2.0.0"
ThisBuild / nativeConfig ~= { c =>
if (Option(System.getenv("CI")).contains("true"))
c.withLinkingOptions(c.linkingOptions :+ "-luring")
else
c.withCompileOptions(c.compileOptions :+ "-I/home/linuxbrew/.linuxbrew/include")
.withLinkingOptions(c.linkingOptions :+ "/home/linuxbrew/.linuxbrew/lib/liburing.a")
}
lazy val root = tlCrossRootProject.aggregate(uring)
lazy val uring = project
.in(file("uring"))
.enablePlugins(ScalaNativePlugin)
.settings(
name := "fs2-io_uring",
libraryDependencies ++= Seq(
"co.fs2" %%% "fs2-io" % fs2Version,
"org.typelevel" %%% "munit-cats-effect" % munitCEVersion % Test
),
Test / testOptions += Tests.Argument("+l")
)