Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only install coursier and sbt in docker container #751

Merged
merged 4 commits into from
Sep 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion bin/docker-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
14 changes: 3 additions & 11 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -591,19 +591,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
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I squinted hard at this and I feel like copying is not necessary, as the actual path to the jar doesn't matter.

My hunch is that for some reason copying causes issues (sbt/io#371) which result in flaky CI.

Tests all seem green as well, so I doubt there's a change in published artifacts. Will check the snapshot deployment on maven central to confirm jars are still usable.

},
(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(
Expand Down
Loading