diff --git a/.github/workflows/scalatest.yml b/.github/workflows/scalatest.yml index 016092c8bd..2bd419385d 100644 --- a/.github/workflows/scalatest.yml +++ b/.github/workflows/scalatest.yml @@ -24,8 +24,6 @@ jobs: uses: actions/cache@v3 with: path: | - ~/.cache/coursier - ~/.mill/ammonite out !**/assembly.dest !**/assembly.json diff --git a/build.sc b/build.sc index 51bfda94d4..bbb3fe595a 100644 --- a/build.sc +++ b/build.sc @@ -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 } } @@ -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 { @@ -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", @@ -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)