From ac92b4c2eace9544e6af2bf9eadcf6ea1132b846 Mon Sep 17 00:00:00 2001 From: Anton Sviridov Date: Thu, 12 Sep 2024 10:53:31 +0100 Subject: [PATCH 1/4] Only install coursier and sbt in docker container --- bin/docker-setup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/docker-setup.sh b/bin/docker-setup.sh index fbd686da..843f6103 100755 --- a/bin/docker-setup.sh +++ b/bin/docker-setup.sh @@ -2,7 +2,7 @@ set -eux curl -fLo /usr/local/bin/coursier https://github.com/coursier/coursier/releases/download/v2.1.5/coursier chmod +x /usr/local/bin/coursier -coursier setup --yes +coursier setup --yes --apps coursier,sbt curl -fLo maven.zip https://archive.apache.org/dist/maven/maven-3/3.9.1/binaries/apache-maven-3.9.1-bin.zip unzip -d /opt/maven maven.zip From 0bee0135dde03a6863699e9d8fee13656b435941 Mon Sep 17 00:00:00 2001 From: Anton Sviridov Date: Thu, 12 Sep 2024 11:26:42 +0100 Subject: [PATCH 2/4] Remove unnecessary copying --- build.sbt | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/build.sbt b/build.sbt index eaa153c8..3e0b3214 100644 --- a/build.sbt +++ b/build.sbt @@ -1,3 +1,5 @@ +import java.nio.file.StandardCopyOption +import java.nio.file.CopyOption import sbtdocker.DockerfileBase import scala.xml.{Node => XmlNode, NodeSeq => XmlNodeSeq, _} import scala.xml.transform.{RewriteRule, RuleTransformer} @@ -591,19 +593,11 @@ lazy val fatjarPackageSettings = List[Def.Setting[_]]( oldStrategy(x) }, (Compile / Keys.`package`) := { - val slimJar = (Compile / Keys.`package`).value - val fatJar = crossTarget.value / (assembly / assemblyJarName).value - val _ = assembly.value - IO.copyFile(fatJar, slimJar, CopyOptions().withOverwrite(true)) - slimJar + assembly.value }, (Compile / packageBin / packagedArtifact) := { - val (art, slimJar) = (Compile / packageBin / packagedArtifact).value - val fatJar = - new File(crossTarget.value + "/" + (assembly / assemblyJarName).value) - val _ = assembly.value - IO.copy(List(fatJar -> slimJar), CopyOptions().withOverwrite(true)) - (art, slimJar) + val (artifact, _) = (Compile / packageBin / packagedArtifact).value + (artifact, assembly.value) }, pomPostProcess := { node => new RuleTransformer( From 0e4364d15c3c147ee7c426f15c8edf67ab5586e4 Mon Sep 17 00:00:00 2001 From: Anton Sviridov Date: Thu, 12 Sep 2024 11:41:19 +0100 Subject: [PATCH 3/4] Fix dockerised tests --- .github/workflows/ci.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 55fca90d..b16d8577 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -46,13 +46,14 @@ jobs: - name: Build Dockerised CLI run: sbt cli/docker - - run: | - + - name: Test repos + shell: bash + run: | set -eu check_repo() { REPO=$1 mkdir -p .repos/$REPO - git clone https://github.com/$REPO.git .repos/$REPO + git clone https://github.com/$REPO.git .repos/$REPO && cd .repos/$REPO && git submodule update --init docker run -v $PWD/.repos/$REPO:/sources -w /sources sourcegraph/scip-java:latest scip-java index file .repos/$REPO/index.scip || (echo "$REPO SCIP index doesn't exist!"; exit 1) From 11f8606111f6d5a9e0eeceb6e4ddfb00ec320912 Mon Sep 17 00:00:00 2001 From: Anton Sviridov Date: Thu, 12 Sep 2024 12:07:14 +0100 Subject: [PATCH 4/4] remove unused imports --- build.sbt | 2 -- 1 file changed, 2 deletions(-) diff --git a/build.sbt b/build.sbt index 3e0b3214..f89e886c 100644 --- a/build.sbt +++ b/build.sbt @@ -1,5 +1,3 @@ -import java.nio.file.StandardCopyOption -import java.nio.file.CopyOption import sbtdocker.DockerfileBase import scala.xml.{Node => XmlNode, NodeSeq => XmlNodeSeq, _} import scala.xml.transform.{RewriteRule, RuleTransformer}