Skip to content

Commit 42464e0

Browse files
committed
Implement sbt-launch.jar download
1 parent 2523f0f commit 42464e0

File tree

1,961 files changed

+103
-276
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,961 files changed

+103
-276
lines changed

.github/workflows/ci.yml

+47-5
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,26 @@ jobs:
2727
- os: ubuntu-latest
2828
java: 8
2929
jobtype: 6
30+
- os: ubuntu-latest
31+
java: 8
32+
jobtype: 7
33+
- os: macos-latest
34+
java: 8
35+
jobtype: 8
36+
- os: windows-latest
37+
java: 8
38+
jobtype: 9
3039
runs-on: ${{ matrix.os }}
3140
env:
3241
JAVA_OPTS: -Xms800M -Xmx2G -Xss6M -XX:ReservedCodeCacheSize=128M -server -Dsbt.io.virtual=false -Dfile.encoding=UTF-8
42+
JVM_OPTS: -Xms800M -Xmx2G -Xss6M -XX:ReservedCodeCacheSize=128M -server -Dsbt.io.virtual=false -Dfile.encoding=UTF-8
3343
SCALA_212: 2.12.13
3444
SCALA_213: 2.13.3
3545
UTIL_TESTS: utilCache/test;utilControl/test;utilInterface/test;utilLogging/test;utilPosition/test;utilRelation/test;utilScripted/test;utilTracking/test
3646
SBT_LOCAL: false
47+
TEST_SBT_VER: 1.5.0
48+
SBT_ETC_FILE: $HOME/etc/sbt/sbtopts
49+
3750
steps:
3851
- name: Checkout sbt/sbt
3952
uses: actions/checkout@v2
@@ -71,19 +84,19 @@ jobs:
7184
rm -rf "$HOME/.sbt/scripted/" || true
7285
case ${{ matrix.jobtype }} in
7386
1)
74-
sbt -v "mimaReportBinaryIssues ; javafmtCheck ; Test / javafmtCheck; scalafmtCheckAll ; scalafmtSbtCheck; serverTestProj/scalafmtCheckAll; headerCheck ;test:headerCheck ;whitesourceOnPush ;test:compile; publishLocal; test; serverTestProj/test; doc; $UTIL_TESTS; ++$SCALA_213; $UTIL_TESTS"
87+
./sbt -v "mimaReportBinaryIssues ; javafmtCheck ; Test / javafmtCheck; scalafmtCheckAll ; scalafmtSbtCheck; serverTestProj/scalafmtCheckAll; headerCheck ;test:headerCheck ;whitesourceOnPush ;test:compile; publishLocal; test; serverTestProj/test; doc; $UTIL_TESTS; ++$SCALA_213; $UTIL_TESTS"
7588
;;
7689
2)
77-
sbt -v "scripted actions/* apiinfo/* compiler-project/* ivy-deps-management/* reporter/* tests/* watch/* classloader-cache/* package/*"
90+
./sbt -v "scripted actions/* apiinfo/* compiler-project/* ivy-deps-management/* reporter/* tests/* watch/* classloader-cache/* package/*"
7891
;;
7992
3)
80-
sbt -v "dependencyTreeProj/publishLocal; scripted dependency-graph/* dependency-management/* plugins/* project-load/* java/* run/* nio/*"
93+
./sbt -v "dependencyTreeProj/publishLocal; scripted dependency-graph/* dependency-management/* plugins/* project-load/* java/* run/* nio/*"
8194
;;
8295
4)
83-
sbt -v "repoOverrideTest:scripted dependency-management/*; scripted source-dependencies/* project/*"
96+
./sbt -v "repoOverrideTest:scripted dependency-management/*; scripted source-dependencies/* project/*"
8497
;;
8598
5)
86-
sbt -v "++$SCALA_213!; test;"
99+
./sbt -v "++$SCALA_213!; test;"
87100
;;
88101
6)
89102
# build from fresh IO, LM, and Zinc
@@ -95,6 +108,35 @@ jobs:
95108
rm -r $(find $HOME/.sbt/boot -name "*-SNAPSHOT") || true
96109
sbt -v -Dsbt.version=$BUILD_VERSION "++$SCALA_213; $UTIL_TESTS; ++$SCALA_212; $UTIL_TESTS; scripted actions/* source-dependencies/*1of3 dependency-management/*1of4 java/*"
97110
;;
111+
7)
112+
# test launcher script
113+
echo build using JDK 8 test using JDK 8 and JDK 11
114+
cd launcher-package
115+
sbt -Dsbt.build.version=$TEST_SBT_VER rpm:packageBin debian:packageBin
116+
sbt -Dsbt.build.version=$TEST_SBT_VER universal:packageBin universal:stage integrationTest/test
117+
cd citest && ./test.sh
118+
$HOME/bin/jabba install $JDK11 && exec $HOME/bin/jabba which --home $JDK11
119+
java -Xmx32m -version
120+
./test.sh
121+
;;
122+
8)
123+
# test launcher script
124+
echo build using JDK 8, test using JDK 8, on macOS
125+
cd launcher-package
126+
bin/coursier resolve
127+
sbt -Dsbt.build.version=$TEST_SBT_VER universal:packageBin universal:stage integrationTest/test
128+
cd citest && ./test.sh
129+
;;
130+
9)
131+
# test launcher script
132+
echo build using JDK 8, test using JDK 8, on Windows
133+
cd launcher-package
134+
bin/coursier.bat resolve
135+
sbt -Dsbt.build.version=$TEST_SBT_VER universal:packageBin universal:stage integrationTest/test
136+
cd citest
137+
./test.bat
138+
test3/test3.bat
139+
;;
98140
*)
99141
echo unknown jobtype
100142
exit 1

build.sbt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1038,7 +1038,7 @@ lazy val mainProj = (project in file("main"))
10381038
// Strictly for bringing implicits and aliases from subsystems into the top-level sbt namespace through a single package object
10391039
// technically, we need a dependency on all of mainProj's dependencies, but we don't do that since this is strictly an integration project
10401040
// with the sole purpose of providing certain identifiers without qualification (with a package object)
1041-
lazy val sbtProj = (project in file("sbt"))
1041+
lazy val sbtProj = (project in file("sbt-app"))
10421042
.dependsOn(mainProj)
10431043
.settings(
10441044
testedBaseSettings,

launcher-package/LICENSE

-202
This file was deleted.

launcher-package/README.md

-60
This file was deleted.

launcher-package/build.sbt

+4
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,10 @@ val root = (project in file(".")).
249249
packageName in Universal := packageName.value, // needs to be set explicitly due to a bug in native-packager
250250
version in Universal := sbtVersionToRelease,
251251

252+
mappings in Universal += {
253+
(baseDirectory.value.getParentFile / "sbt") -> ("bin" + java.io.File.separator + "sbt")
254+
},
255+
252256
mappings in Universal := {
253257
val t = (target in Universal).value
254258
val prev = (mappings in Universal).value

0 commit comments

Comments
 (0)