Skip to content

Commit

Permalink
try to reduce cache size a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
pieter-bos committed Oct 20, 2023
1 parent d3b94a0 commit 24426b5
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 6 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/scalatest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ jobs:
uses: actions/cache@v3
with:
path: |
~/.cache/coursier
~/.mill/ammonite
out
!**/assembly.dest
!**/assembly.json
Expand Down
19 changes: 15 additions & 4 deletions build.sc
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,7 @@ object util {
os.proc("git", "config", "advice.detachedHead", "false").call(cwd = T.dest)
os.proc("git", "checkout", "FETCH_HEAD").call(cwd = T.dest)
os.walk(T.dest).foreach(_.toIO.setWritable(true))
os.remove.all(T.dest / ".git")
T.dest
}
}
Expand Down Expand Up @@ -403,11 +404,21 @@ object viper extends ScalaModule {
object silverGit extends GitModule {
def url = T { "https://github.com/viperproject/silver.git" }
def commitish = T { "ae4a12399cd0b42bedabf01be2cda93700244bd6" }
def filteredRepo = T {
val workspace = repo()
os.remove.all(workspace / "src" / "test")
workspace
}
}

object siliconGit extends GitModule {
def url = T { "https://github.com/viperproject/silicon.git" }
def commitish = T { "a60324dd46923b861bae7b4a40f807227d693fc3" }
def filteredRepo = T {
val workspace = repo()
os.remove.all(workspace / "src" / "test")
workspace
}
}

object carbonGit extends GitModule {
Expand All @@ -419,7 +430,7 @@ object viper extends ScalaModule {
override def scalaVersion = "2.13.10"
override def scalacOptions = T { Seq("-Xno-patmat-analysis", "-nowarn") }
def repo = silverGit
override def sources = T.sources { repo.repo() / "src" / "main" / "scala" }
override def sources = T.sources { repo.filteredRepo() / "src" / "main" / "scala" }
override def ivyDeps = settings.deps.log ++ Agg(
ivy"org.scala-lang:scala-reflect:2.13.10",
ivy"org.scalatest::scalatest:3.1.2",
Expand Down Expand Up @@ -450,20 +461,20 @@ object viper extends ScalaModule {
object common extends ScalaModule {
override def scalaVersion = "2.13.10"
override def scalacOptions = T { Seq("-Xno-patmat-analysis", "-nowarn") }
override def sources = T.sources { silicon.repo.repo() / "common" / "src" / "main" / "scala" }
override def sources = T.sources { silicon.repo.filteredRepo() / "common" / "src" / "main" / "scala" }
override def moduleDeps = Seq(silver)
}

override def scalaVersion = "2.13.10"
override def scalacOptions = T { Seq("-Xno-patmat-analysis", "-nowarn") }
def repo = siliconGit
override def sources = T.sources { repo.repo() / "src" / "main" / "scala" }
override def sources = T.sources { repo.filteredRepo() / "src" / "main" / "scala" }
override def ivyDeps = settings.deps.log ++ Agg(
ivy"org.apache.commons:commons-pool2:2.9.0",
ivy"io.spray::spray-json:1.3.6",
)
override def resources = T.sources {
repo.repo() / "src" / "main" / "resources"
repo.filteredRepo() / "src" / "main" / "resources"
}
override def unmanagedClasspath = Agg(external.z3.classPath())
override def moduleDeps = Seq(silver, common, buildInfo)
Expand Down

0 comments on commit 24426b5

Please sign in to comment.