summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/jobs/integrate/bootstrap112
-rwxr-xr-xscripts/jobs/integrate/ide3
-rwxr-xr-xscripts/jobs/validate/test2
3 files changed, 50 insertions, 67 deletions
diff --git a/scripts/jobs/integrate/bootstrap b/scripts/jobs/integrate/bootstrap
index a81c672d6e..11cf659229 100644
--- a/scripts/jobs/integrate/bootstrap
+++ b/scripts/jobs/integrate/bootstrap
@@ -87,6 +87,7 @@ moduleVersioning=${moduleVersioning-"versions.properties"}
publishPrivateTask=${publishPrivateTask-"publish"}
publishSonatypeTaskCore=${publishSonatypeTaskCore-"publish-signed"}
publishSonatypeTaskModules=${publishSonatypeTaskModules-"publish-signed"}
+publishStarrPrivateTask=${publishStarrPrivateTask-$publishPrivateTask} # set to "init" to speed up testing of the script (if you already built STARR before)
publishLockerPrivateTask=${publishLockerPrivateTask-$publishPrivateTask} # set to "init" to speed up testing of the script (if you already built locker before)
forceRebuild=${forceRebuild-no}
@@ -183,7 +184,7 @@ sbtBuild() {
sbtResolve() {
cd $baseDir/resolutionScratch_
touch build.sbt
- # Can be set to `full` if a module requires cross-versioning against the full Scala version, like the continuations plugin.
+ # Can be set to `full` if a module requires cross-versioning against the full Scala version, like the continuations plugin used to.
cross=${4-binary}
echo "### sbtResolve: $SBT_CMD $sbtArgs " "${scalaVersionTasks[@]}" "\"$1\" % \"$2\" % \"$3\" cross CrossVersion.$cross"
$SBT_CMD $sbtArgs "${scalaVersionTasks[@]}" \
@@ -208,12 +209,17 @@ sbtResolve() {
# scala-xml depends on scala-library, so sbt tries to find the scala-library of the version that we are currently building,
# which exists only in private-repo.
+docTask() {
+ if [ "$1" == "yes" ]; then echo doc; else echo set publishArtifact in packageDoc in Compile := false; fi
+}
+
buildXML() {
if [ "$XML_BUILT" != "yes" ] && [ "$forceRebuild" != "yes" ] && ( sbtResolve "org.scala-lang.modules" "scala-xml" $XML_VER )
then echo "Found scala-xml $XML_VER; not building."
else
update scala scala-xml "$XML_REF" && gfxd
- sbtBuild 'set version := "'$XML_VER'-DOC"' $clean doc 'set version := "'$XML_VER'"' test "${buildTasks[@]}"
+ doc="$(docTask $XML_BUILT)"
+ sbtBuild 'set version := "'$XML_VER'-DOC"' $clean "$doc" 'set version := "'$XML_VER'"' test "${buildTasks[@]}"
XML_BUILT="yes" # ensure the module is built and published when buildXML is invoked for the second time, see comment above
fi
}
@@ -223,7 +229,8 @@ buildParsers() {
then echo "Found scala-parser-combinators $PARSERS_VER; not building."
else
update scala scala-parser-combinators "$PARSERS_REF" && gfxd
- sbtBuild 'set version := "'$PARSERS_VER'-DOC"' $clean doc 'set version := "'$PARSERS_VER'"' test "${buildTasks[@]}"
+ doc="$(docTask $PARSERS_BUILT)"
+ sbtBuild 'set version := "'$PARSERS_VER'-DOC"' $clean "$doc" 'set version := "'$PARSERS_VER'"' test "${buildTasks[@]}"
PARSERS_BUILT="yes"
fi
}
@@ -233,61 +240,31 @@ buildPartest() {
then echo "Found scala-partest $PARTEST_VER; not building."
else
update scala scala-partest "$PARTEST_REF" && gfxd
- sbtBuild 'set version :="'$PARTEST_VER'"' 'set VersionKeys.scalaXmlVersion := "'$XML_VER'"' 'set VersionKeys.scalaCheckVersion := "'$SCALACHECK_VER'"' $clean test "${buildTasks[@]}"
+ doc="$(docTask $PARTEST_BUILT)"
+ sbtBuild 'set version :="'$PARTEST_VER'"' 'set VersionKeys.scalaXmlVersion := "'$XML_VER'"' 'set VersionKeys.scalaCheckVersion := "'$SCALACHECK_VER'"' $clean "$doc" test "${buildTasks[@]}"
PARTEST_BUILT="yes"
fi
}
-buildContinuations() {
- if [ "$CONT_PLUG_BUILT" != "yes" ] && [ "$forceRebuild" != "yes" ] && ( sbtResolve "org.scala-lang.plugins" "scala-continuations-plugin" $CONTINUATIONS_VER full )
- then echo "Found scala-continuations-plugin $CONTINUATIONS_VER; not building."
- else
- update scala scala-continuations $CONTINUATIONS_REF && gfxd
-
- $SBT_CMD $sbtArgs 'project plugin' "${scalaVersionTasks[@]}" "${publishTasks[@]}" \
- 'set version := "'$CONTINUATIONS_VER'"' $clean "compile:package" test "${buildTasks[@]}" # https://github.com/scala/scala-continuations/pull/4
- CONT_PLUG_BUILT="yes"
- fi
-
- if [ "$CONT_LIB_BUILT" != "yes" ] && [ "$forceRebuild" != "yes" ] && ( sbtResolve "org.scala-lang.plugins" "scala-continuations-library" $CONTINUATIONS_VER )
- then echo "Found scala-continuations-library $CONTINUATIONS_VER; not building."
- else
- update scala scala-continuations $CONTINUATIONS_REF && gfxd
- $SBT_CMD $sbtArgs 'project library' "${scalaVersionTasks[@]}" "${publishTasks[@]}" \
- 'set version := "'$CONTINUATIONS_VER'"' $clean test "${buildTasks[@]}"
- CONT_LIB_BUILT="yes"
- fi
-}
-
buildSwing() {
if [ "$SWING_BUILT" != "yes" ] && [ "$forceRebuild" != "yes" ] && ( sbtResolve "org.scala-lang.modules" "scala-swing" $SWING_VER )
then echo "Found scala-swing $SWING_VER; not building."
else
update scala scala-swing "$SWING_REF" && gfxd
- sbtBuild 'set version := "'$SWING_VER'"' $clean test "${buildTasks[@]}"
+ doc="$(docTask $SWING_BUILT)"
+ sbtBuild 'set version := "'$SWING_VER'"' $clean "$doc" test "${buildTasks[@]}"
SWING_BUILT="yes"
fi
}
-buildActorsMigration(){
- if [ "$ACTORS_MIGRATION_BUILT" != "yes" ] && [ "$forceRebuild" != "yes" ] && ( sbtResolve "org.scala-lang" "scala-actors-migration" $ACTORS_MIGRATION_VER )
- then echo "Found scala-actors-migration $ACTORS_MIGRATION_VER; not building."
- else
- update scala actors-migration "$ACTORS_MIGRATION_REF" && gfxd
- # not running tests because
- # [error] Test scala.actors.migration.NestedReact.testNestedReactAkka failed: java.util.concurrent.TimeoutException: Futures timed out after [20 seconds]
- sbtBuild 'set version := "'$ACTORS_MIGRATION_VER'"' 'set VersionKeys.continuationsVersion := "'$CONTINUATIONS_VER'"' $clean "${buildTasks[@]}"
- ACTORS_MIGRATION_BUILT="yes"
- fi
-}
-
# should only be called with publishTasks publishing to private-repo
buildScalacheck(){
if [ "$SCALACHECK_BUILT" != "yes" ] && [ "$forceRebuild" != "yes" ] && ( sbtResolve "org.scalacheck" "scalacheck" $SCALACHECK_VER )
then echo "Found scalacheck $SCALACHECK_VER; not building."
else
update rickynils scalacheck $SCALACHECK_REF && gfxd
- sbtBuild 'set version := "'$SCALACHECK_VER'"' 'set VersionKeys.scalaParserCombinatorsVersion := "'$PARSERS_VER'"' $clean publish # test times out NOTE: never published to sonatype
+ doc="$(docTask $SCALACHECK_BUILT)"
+ sbtBuild 'set version := "'$SCALACHECK_VER'"' 'set VersionKeys.scalaParserCombinatorsVersion := "'$PARSERS_VER'"' $clean "$doc" publish # test times out NOTE: never published to sonatype
SCALACHECK_BUILT="yes"
fi
}
@@ -298,9 +275,7 @@ buildModules() {
buildTasks=($publishPrivateTask)
buildXML
buildParsers
- buildContinuations
buildSwing
- buildActorsMigration
buildScalacheck
buildPartest
}
@@ -310,9 +285,7 @@ buildPublishedModules() {
buildTasks=($publishSonatypeTaskModules)
buildXML
buildParsers
- buildContinuations
buildSwing
- buildActorsMigration
buildPartest
}
@@ -352,7 +325,7 @@ scalaVerToBinary() {
determineScalaVersion() {
cd $WORKSPACE
parseScalaProperties "versions.properties"
- echo "repo_ref=2.11.x" >> $baseDir/jenkins.properties # for the -dist downstream jobs that build the actual archives
+ echo "repo_ref=2.12.x" >> $baseDir/jenkins.properties # for the -dist downstream jobs that build the actual archives
# each of the branches below defines the following vars: SCALA_VER_BASE, SCALA_VER_SUFFIX, SCALADOC_SOURCE_LINKS_VER, publishToSonatype
@@ -418,41 +391,31 @@ deriveModuleVersions() {
# use versions.properties as defaults when no version specified on the command line
XML_VER=${XML_VER-$scala_xml_version_number}
PARSERS_VER=${PARSERS_VER-$scala_parser_combinators_version_number}
- CONTINUATIONS_VER=${CONTINUATIONS_VER-$scala_continuations_plugin_version_number}
SWING_VER=${SWING_VER-$scala_swing_version_number}
- ACTORS_MIGRATION_VER=${ACTORS_MIGRATION_VER-$actors_migration_version_number}
PARTEST_VER=${PARTEST_VER-$partest_version_number}
SCALACHECK_VER=${SCALACHECK_VER-$scalacheck_version_number}
XML_REF="v$XML_VER"
PARSERS_REF="v$PARSERS_VER"
- CONTINUATIONS_REF="v$CONTINUATIONS_VER"
SWING_REF="v$SWING_VER"
- ACTORS_MIGRATION_REF="v$ACTORS_MIGRATION_VER"
PARTEST_REF="v$PARTEST_VER"
SCALACHECK_REF="$SCALACHECK_VER" # no `v` in their tags
else
# use HEAD as default when no revision is specified on the command line
XML_REF=${XML_REF-"HEAD"}
PARSERS_REF=${PARSERS_REF-"HEAD"}
- CONTINUATIONS_REF=${CONTINUATIONS_REF-"HEAD"}
SWING_REF=${SWING_REF-"HEAD"}
- ACTORS_MIGRATION_REF=${ACTORS_MIGRATION_REF-"HEAD"}
PARTEST_REF=${PARTEST_REF-"HEAD"}
SCALACHECK_REF=${SCALACHECK_REF-"HEAD"}
XML_VER=$(deriveVersion scala scala-xml "$XML_REF")
PARSERS_VER=$(deriveVersion scala scala-parser-combinators "$PARSERS_REF")
- CONTINUATIONS_VER=$(deriveVersion scala scala-continuations "$CONTINUATIONS_REF")
SWING_VER=$(deriveVersion scala scala-swing "$SWING_REF")
- ACTORS_MIGRATION_VER=$(deriveVersion scala actors-migration "$ACTORS_MIGRATION_REF")
PARTEST_VER=$(deriveVersion scala scala-partest "$PARTEST_REF")
SCALACHECK_VER=$(deriveVersionAnyTag rickynils scalacheck "$SCALACHECK_REF")
fi
echo "Module versions (versioning strategy: $moduleVersioning):"
- echo "ACTORS_MIGRATION = $ACTORS_MIGRATION_VER at $ACTORS_MIGRATION_REF"
- echo "CONTINUATIONS = $CONTINUATIONS_VER at $CONTINUATIONS_REF"
echo "PARSERS = $PARSERS_VER at $PARSERS_REF"
echo "PARTEST = $PARTEST_VER at $PARTEST_REF"
echo "SCALACHECK = $SCALACHECK_VER at $SCALACHECK_REF"
@@ -473,7 +436,7 @@ removeExistingBuilds() {
local netrcFile="$HOME/.credentials-private-repo-netrc"
local storageApiUrl=`echo $releaseTempRepoUrl | sed 's/\(scala-release-temp\)/api\/storage\/\1/'`
- local scalaLangModules=`curl -s $storageApiUrl/org/scala-lang | jq -r '.children | .[] | "org/scala-lang" + .uri'`
+ local scalaLangModules=`curl -s $storageApiUrl/org/scala-lang | jq -r '.children | .[] | "org/scala-lang" + .uri' | grep -v actors-migration`
for module in "org/scalacheck" $scalaLangModules; do
local artifacts=`curl -s $storageApiUrl/$module | jq -r ".children | .[] | select(.uri | contains(\"$SCALA_VER\")) | .uri"`
@@ -490,9 +453,6 @@ constructUpdatedModuleVersions() {
# force the new module versions for building the core. these may be different from the values in versions.properties,
# either because the variables (XML_VER) were provided, or because we're building the modules from HEAD.
# in the common case, the values are the same as in versions.properties.
- updatedModuleVersions=("${updatedModuleVersions[@]}" "-Dactors-migration.version.number=$ACTORS_MIGRATION_VER")
- updatedModuleVersions=("${updatedModuleVersions[@]}" "-Dscala-continuations-library.version.number=$CONTINUATIONS_VER")
- updatedModuleVersions=("${updatedModuleVersions[@]}" "-Dscala-continuations-plugin.version.number=$CONTINUATIONS_VER")
updatedModuleVersions=("${updatedModuleVersions[@]}" "-Dscala-parser-combinators.version.number=$PARSERS_VER")
updatedModuleVersions=("${updatedModuleVersions[@]}" "-Dscala-swing.version.number=$SWING_VER")
updatedModuleVersions=("${updatedModuleVersions[@]}" "-Dscala-xml.version.number=$XML_VER")
@@ -500,8 +460,7 @@ constructUpdatedModuleVersions() {
updatedModuleVersions=("${updatedModuleVersions[@]}" "-Dpartest.version.number=$PARTEST_VER")
updatedModuleVersions=("${updatedModuleVersions[@]}" "-Dscalacheck.version.number=$SCALACHECK_VER")
- # allow overriding the akka-actors and jline version using a jenkins build parameter
- if [ ! -z "$AKKA_ACTOR_VER" ]; then updatedModuleVersions=("${updatedModuleVersions[@]}" "-Dakka-actor.version.number=$AKKA_ACTOR_VER"); fi
+ # allow overriding the jline version using a jenkins build parameter
if [ ! -z "$JLINE_VER" ] ; then updatedModuleVersions=("${updatedModuleVersions[@]}" "-Djline.version=$JLINE_VER"); fi
if [ ! -z "$SCALA_BINARY_VER" ]; then updatedModuleVersions=("${updatedModuleVersions[@]}" "-Dscala.binary.version=$SCALA_BINARY_VER"); fi
@@ -513,6 +472,29 @@ bootstrap() {
cd $WORKSPACE
+ #### (Optional) STARR.
+ if [ ! -z "$STARR_REF" ]; then
+ echo "### Building STARR"
+
+ STARR_DIR=./scala-starr
+ STARR_VER_SUFFIX="-$(git rev-parse --short $STARR_REF)-nightly"
+ STARR_VER=$SCALA_VER_BASE$STARR_VER_SUFFIX
+ rm -rf "$STARR_DIR"
+ (
+ git clone --reference $WORKSPACE/.git $WORKSPACE/.git $STARR_DIR
+ cd $STARR_DIR
+ git co $STARR_REF
+ ant -Dmaven.version.number=$STARR_VER\
+ -Dremote.snapshot.repository=NOPE\
+ -Dremote.release.repository=$releaseTempRepoUrl\
+ -Drepository.credentials.id=$releaseTempRepoCred\
+ -Dscalac.args.optimise=-Yopt:l:classpath\
+ -Ddocs.skip=1\
+ -Dlocker.skip=1\
+ $publishStarrPrivateTask >> $baseDir/logs/builds 2>&1
+ )
+ fi
+
#### LOCKER
echo "### Building locker"
@@ -522,16 +504,17 @@ bootstrap() {
# must publish under $SCALA_VER so that the modules will depend on this (binary) version of Scala
# publish more than just core: partest needs scalap
# in sabbus lingo, the resulting Scala build will be used as starr to build the released Scala compiler
+ if [ ! -z "$STARR_VER" ]; then SET_STARR=-Dstarr.version=$STARR_VER; fi
ant -Dmaven.version.number=$SCALA_VER\
-Dremote.snapshot.repository=NOPE\
+ $SET_STARR\
-Dremote.release.repository=$releaseTempRepoUrl\
-Drepository.credentials.id=$releaseTempRepoCred\
- -Dscalac.args.optimise=-optimise\
+ -Dscalac.args.optimise=-Yopt:l:classpath\
-Ddocs.skip=1\
-Dlocker.skip=1\
$publishLockerPrivateTask >> $baseDir/logs/builds 2>&1
-
echo "### Building modules using locker"
# build, test and publish modules with this core
@@ -557,10 +540,7 @@ bootstrap() {
cd $baseDir
rm -rf build/ # must leave everything else in $baseDir for downstream jobs
- # scala.full.version determines the dependency of scala-dist on the continuations plugin,
- # which is fully cross-versioned (for $SCALA_VER, the version we're releasing)
ant -Dstarr.version=$SCALA_VER\
- -Dscala.full.version=$SCALA_VER\
-Dextra.repo.url=$releaseTempRepoUrl\
-Dmaven.version.suffix=$SCALA_VER_SUFFIX\
${updatedModuleVersions[@]} \
@@ -569,7 +549,7 @@ bootstrap() {
-Dremote.snapshot.repository=NOPE\
-Dremote.release.repository=$releaseTempRepoUrl\
-Drepository.credentials.id=$releaseTempRepoCred\
- -Dscalac.args.optimise=-optimise\
+ -Dscalac.args.optimise=-Yopt:l:classpath\
$antBuildTask $publishPrivateTask
# clear ivy cache (and to be sure, local as well), so the next round of sbt builds sees the fresh scala
diff --git a/scripts/jobs/integrate/ide b/scripts/jobs/integrate/ide
index 1651ad2892..c39facbc3d 100755
--- a/scripts/jobs/integrate/ide
+++ b/scripts/jobs/integrate/ide
@@ -3,6 +3,9 @@
# requires env: scalaVersion (specifies binary already built from above checkout), WORKSPACE (provided by jenkins), repo_ref (HEAD of the scala checkout),
# requires files: $baseDir/versions.properties (from checkout -- defines version numbers for modules used to build scala for dbuild...)
+echo "IDE integration not yet available on 2.12.x. Punting."
+exit 0
+
# TODO: remove when integration is up and running
if [ "woele$_scabot_last" != "woele1" ]; then echo "Scabot didn't mark this as last commit -- skipping."; exit 0; fi
diff --git a/scripts/jobs/validate/test b/scripts/jobs/validate/test
index bedef2e458..d63d39c65d 100755
--- a/scripts/jobs/validate/test
+++ b/scripts/jobs/validate/test
@@ -10,7 +10,7 @@ case $prDryRun in
# build quick using STARR built upstream, as specified by scalaVersion
# (in that sense it's locker, since it was built with starr by that upstream job)
ant -Dstarr.version=$scalaVersion \
- -Dscalac.args.optimise=-optimise \
+ -Dscalac.args.optimise=-Yopt:l:classpath \
-Dlocker.skip=1 -Dextra.repo.url=$prRepoUrl \
$testExtraArgs ${testTarget-test.core docs.done}
;;