This repository has been archived by the owner on Dec 1, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 11
/
build.sbt
118 lines (90 loc) · 4.12 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
name := "spatial-lang"
val scalatestVersion = "3.0.1"
val paradiseVersion = "2.1.0"
val assemblySettings = Seq(
test in assembly := {}
)
isSnapshot in ThisBuild := true
val commonSettings = assemblySettings ++ Seq(
version := "0.1-SNAPSHOT",
organization := "edu.stanford.cs.dawn",
scalaVersion := "2.12.1",
test in assembly := {},
// publishTo in ThisBuild := Some(Resolver.file("file", new File(Path.userHome.absolutePath+"/.m2/repository"))),
// POM settings for Sonatype
homepage := Some(url("https://github.com/stanford-ppl/spatial-lang")),
scmInfo := Some(ScmInfo(url("https://github.com/stanford-ppl/spatial-lang"),
"[email protected]:stanford-ppl/spatial-lang.git")),
developers := List(
Developer("Matthew Feldman",
"mattfel1",
url("https://spatial.stanford.edu")),
Developer("David Koeplinger",
"dkoeplin",
url("https://spatial.stanford.edu")),
Developer("Raghu Prabhakar",
"raghup17",
url("https://spatial.stanford.edu")),
Developer("Yaqi Zhang",
"yaqiz",
url("https://spatial.stanford.edu"))
),
licenses += ("MIT", url("https://opensource.org/licenses/MIT")),
publishMavenStyle := true,
// Add sonatype repository settings
publishTo in ThisBuild := {
val nexus = "https://oss.sonatype.org/"
if (isSnapshot.value)
Some("snapshots" at nexus + "content/repositories/snapshots")
else
Some("releases" at nexus + "service/local/staging/deploy/maven2")
},
incOptions := incOptions.value.withRecompileOnMacroDef(false),
libraryDependencies += "org.scalatest" %% "scalatest" % scalatestVersion % "test",
scalacOptions ++= Seq("-language:implicitConversions", "-language:higherKinds"),
scalacOptions ++= Seq("-explaintypes", "-unchecked", "-deprecation", "-feature", "-Xfatal-warnings"),
// Build documentation
scalacOptions in (Compile,doc) ++= Seq("-groups", "-implicits"),
// For when something goes super wrong with scalac
//scalacOptions ++= Seq("-Ytyper-debug"),
//paradise
resolvers += Resolver.sonatypeRepo("snapshots"),
resolvers += Resolver.sonatypeRepo("releases"),
addCompilerPlugin("org.scalamacros" % "paradise" % paradiseVersion cross CrossVersion.full)
)
publishArtifact := false
lazy val spatial = (project in file("spatial/core"))
.dependsOn(argon, forge, virtualized)
.settings(commonSettings)
// .settings(mainClass in assembly := Some("com.example.Main"))
// credentials += Credentials("My Maven Repo", "my.maven.repository", "username", "password"),
// artifact in (Compile, assembly) := {
// val art = (artifact in (Compile, assembly)).value
// art.copy(`classifier` = Some("assembly"))
// },
// addArtifact(artifact in (Compile, assembly), assembly)
// )
lazy val virtualized = (project in file("scala-virtualized"))
.settings(commonSettings)
lazy val forge = (project in file("argon/forge"))
.dependsOn(virtualized)
.settings(commonSettings)
lazy val argon = (project in file("argon/core"))
.dependsOn(forge, virtualized)
.settings(commonSettings)
lazy val apps = project
.dependsOn(spatial, virtualized)
.settings(commonSettings)
.settings(assemblyJarName in assembly := "apps.jar")
val pirApps = List("DotProduct", "OuterProduct", "GEMM_Blocked", "SPMV_CRS", "PageRank_plasticine", "BlackScholes",
"TPCHQ6", "Kmeans_plasticine", "GDA", "Gibbs_Ising2D", "Backprop")
addCommandAlias("pirapps", pirApps.map { app => s"; apps/run-main $app --cgra+" }.mkString("; ") )
addCommandAlias("spatial", "; apps/run-main")
addCommandAlias("make", "; apps/compile")
// GPG Keys
// useGpg := true
// pgpReadOnly := false