-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.sbt
124 lines (117 loc) · 4.93 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
lazy val sparkVersion = "3.2.2"
lazy val scalaCheckVersion = "1.16.0"
lazy val scalatestVersion = "3.2.13"
lazy val scala212Version = "2.12.15"
lazy val scala213Version = "2.13.8"
Global / onChangedBuildSource := ReloadOnSourceChanges
ThisBuild / organization := "com.github.pierrenodet"
ThisBuild / organizationName := "Pierre Nodet"
ThisBuild / homepage := Some(url(s"https://github.com/pierrenodet/aruku"))
ThisBuild / startYear := Some(2019)
ThisBuild / licenses := Seq(License.Apache2)
ThisBuild / developers := List(
Developer(
"pierrenodet",
"Pierre Nodet",
url("https://github.com/pierrenodet")
)
)
ThisBuild / scalaVersion := scala213Version
ThisBuild / crossScalaVersions := Seq(scala212Version, scala213Version)
ThisBuild / githubWorkflowJavaVersions := Seq("8", "11").map(JavaSpec.temurin(_))
ThisBuild / githubWorkflowTargetTags ++= Seq("v*")
ThisBuild / githubWorkflowPublishTargetBranches +=
RefPredicate.StartsWith(Ref.Tag("v"))
ThisBuild / githubWorkflowPublish := Seq(
WorkflowStep.Sbt(
List("ci-release"),
env = Map(
"PGP_PASSPHRASE" -> "${{ secrets.PGP_PASSPHRASE }}",
"PGP_SECRET" -> "${{ secrets.PGP_SECRET }}",
"SONATYPE_PASSWORD" -> "${{ secrets.SONATYPE_PASSWORD }}",
"SONATYPE_USERNAME" -> "${{ secrets.SONATYPE_USERNAME }}"
)
),
WorkflowStep.Sbt(
List("docs/docusaurusPublishGhpages"),
env = Map("GIT_DEPLOY_KEY" -> "${{ secrets.GIT_DEPLOY_KEY }}")
)
)
ThisBuild / githubWorkflowBuild := Seq(WorkflowStep.Sbt(List("coverage", "test", "coverageReport")))
ThisBuild / githubWorkflowBuildPostamble := Seq(WorkflowStep.Run(List("bash <(curl -s https://codecov.io/bash)")))
ThisBuild / resolvers ++= Resolver.sonatypeOssRepos("public")
ThisBuild / resolvers ++= Resolver.sonatypeOssRepos("snapshots")
ThisBuild / versionScheme := Some("semver-spec")
lazy val commonSettings = Seq(
Compile / doc / scalacOptions --= Seq("-Xfatal-warnings"),
Compile / doc / scalacOptions ++= Seq(
"-groups",
"-sourcepath",
(LocalRootProject / baseDirectory).value.getAbsolutePath,
"-doc-source-url",
"https://github.com/pierrenodet/aruku/blob/v" + version.value + "€{FILE_PATH}.scala"
),
Test / run / fork := true,
Test / parallelExecution := false
)
lazy val aruku = project
.in(file("."))
.enablePlugins(AutomateHeaderPlugin)
.enablePlugins(ScalaUnidocPlugin)
.settings(commonSettings)
.settings(publish / skip := true)
.dependsOn(core)
.aggregate(core)
lazy val core = project
.in(file("modules/core"))
.enablePlugins(AutomateHeaderPlugin)
.settings(commonSettings)
.settings(
name := "aruku-core",
description := "A Random Walk Engine for Apache Spark",
libraryDependencies ++= Seq(
"org.apache.spark" %% "spark-core" % sparkVersion % Provided,
"org.apache.spark" %% "spark-graphx" % sparkVersion % Provided,
"org.scalacheck" %% "scalacheck" % scalaCheckVersion % Test,
"org.scalatest" %% "scalatest" % scalatestVersion % Test,
"org.scalatestplus" %% ("scalacheck" + "-" + scalaCheckVersion
.split("\\.")
.toList
.take(2)
.mkString("-")) % (scalatestVersion + ".0") % Test,
"org.scalatest" %% "scalatest-funsuite" % scalatestVersion % Test
)
)
lazy val docs = project
.in(file("modules/aruku-docs"))
.dependsOn(core)
.enablePlugins(MdocPlugin, DocusaurusPlugin, ScalaUnidocPlugin)
.settings(commonSettings)
.settings(
moduleName := "aruku-docs",
publish / skip := true,
mdocVariables := Map("VERSION" -> version.value.takeWhile(_ != '+')),
mdocIn := new File("modules/docs"),
ScalaUnidoc / unidoc / unidocProjectFilter := inProjects(core),
ScalaUnidoc / unidoc / target := (LocalRootProject / baseDirectory).value / "website" / "static" / "api",
cleanFiles += (ScalaUnidoc / unidoc / target).value,
docusaurusCreateSite := docusaurusCreateSite.dependsOn(Compile / unidoc).value,
docusaurusPublishGhpages := docusaurusPublishGhpages.dependsOn(Compile / unidoc).value,
githubWorkflowArtifactUpload := false
)
.settings(
libraryDependencies ++= Seq(
"org.apache.spark" %% "spark-core" % sparkVersion % Provided,
"org.apache.spark" %% "spark-graphx" % sparkVersion % Provided
)
)
lazy val benchmarks = project
.in(file("modules/benchmarks"))
.dependsOn(core)
.settings(
publish / skip := true,
githubWorkflowArtifactUpload := false,
name := "aruku-benchmarks"
)
.enablePlugins(JmhPlugin)