This repository has been archived by the owner on Feb 23, 2018. It is now read-only.
forked from lrytz/jenkins-scripts
-
Notifications
You must be signed in to change notification settings - Fork 10
/
pr-scala-integrate-partest
executable file
·63 lines (46 loc) · 2.24 KB
/
pr-scala-integrate-partest
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#!/bin/bash -e
# PRE:
# - artifacts: versions.properties (parsed for maven_version_number, version_minor)
# - on pr maven repo: Scala version $maven_version_number
####################################################################
# Build the whole chain from Scala (presumably downloaded from #
# artifactory) to Scala-IDE, cloning or fetching checkouts of the #
# elements of said chain in $BASEDIR. #
####################################################################
scriptsDir="$( cd "$( dirname "$0" )/.." && pwd )"
. $scriptsDir/common
. $scriptsDir/pr-scala-common
parse_properties versions.properties
#####################
# BEGIN MAIN SCRIPT #
#####################
main
PARTESTDIR="$BASEDIR/scala-partest/"
PARTESTURL="https://github.com/scala/scala-partest.git"
cd $BASEDIR
#####################################################
# Clone repos
#####################################################
# this depends on the fact that the default clone checkout is the
# dev branch (master or the local equivalent)
getOrUpdate $PARTESTDIR $PARTESTURL master # TODO: go back to "v${partest_version_number}"
#####################################################
# Set versions
#####################################################
if [ "$version_minor" != "10" ]
then echo "Integrating with Scala 2.11+"
else echo "Not integrating with older Scala."; exit 0
fi
#####################################################
# Prepare SBT
#####################################################
preparesbt
#####################################################
# Build and test partest
#####################################################
curl -o $BASEDIR/sbt-launch.jar -s http://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/sbt-launch/0.13.0/sbt-launch.jar
SBT_JAVA_OPTS="-XX:MaxPermSize=384m -Xmx4096M -XX:+CMSClassUnloadingEnabled -XX:ReservedCodeCacheSize=256m -Dsbt.global.base=$SBT_HOME -Dsbt.ivy.home=$IVY_CACHE -Dsbt.log.noformat=true -jar $BASEDIR/sbt-launch.jar"
(set -x; cd $PARTESTDIR &&
java $SBT_JAVA_OPTS "reboot full" clean "set every scalaVersion := \"$maven_version_number\"" "show scala-instance" "show scalaVersion" "show scalaBinaryVersion" publish-local)
# Remove .sbt/repositories scaffolding
#cleanupsbt