summaryrefslogtreecommitdiff
path: root/scripts/jobs/validate
diff options
context:
space:
mode:
authorAdriaan Moors <adriaan.moors@typesafe.com>2015-01-09 15:58:47 -0800
committerAdriaan Moors <adriaan.moors@typesafe.com>2015-01-21 19:26:52 -0800
commit9b86cdfe9bc97861746f4e90a0383761585a2f80 (patch)
tree1e9a6b457099adc013ceaeffe18736ea3c013f73 /scripts/jobs/validate
parent51e77037f2adc4ffa7421aa36803a5874292b70d (diff)
downloadscala-9b86cdfe9bc97861746f4e90a0383761585a2f80.tar.gz
scala-9b86cdfe9bc97861746f4e90a0383761585a2f80.tar.bz2
scala-9b86cdfe9bc97861746f4e90a0383761585a2f80.zip
New PR validation
Diffstat (limited to 'scripts/jobs/validate')
-rwxr-xr-xscripts/jobs/validate/publish-core44
-rwxr-xr-xscripts/jobs/validate/test17
2 files changed, 61 insertions, 0 deletions
diff --git a/scripts/jobs/validate/publish-core b/scripts/jobs/validate/publish-core
new file mode 100755
index 0000000000..9dff5a34b0
--- /dev/null
+++ b/scripts/jobs/validate/publish-core
@@ -0,0 +1,44 @@
+#!/bin/bash -e
+# This script publishes the core of Scala to maven for use as locker downstream,
+# and saves the relevant properties used in its build artifacts, versions.properties.
+# (This means we'll use locker instead of quick downstream in dbuild.
+# The only downside is that backend improvements don't improve compiler performance itself until they are in STARR).
+# The version is suffixed with "-${sha:0:7}-SNAPSHOT"
+
+baseDir=${WORKSPACE-`pwd`}
+scriptsDir="$baseDir/scripts"
+. $scriptsDir/common
+
+case $prDryRun in
+ yep)
+ echo "DRY RUN"
+ mkdir -p build/pack ; mkdir -p dists/maven/latest
+ ;;
+ *)
+ sha=$(git rev-parse HEAD) # TODO: warn if $repo_ref != $sha (we shouldn't do PR validation using symbolic gitrefs)
+ echo "sha/repo_ref == $sha/$repo_ref ?"
+
+ parseScalaProperties build.number
+
+ ./pull-binary-libs.sh
+ # "noyoudont" is there juuuust in case
+ antDeployArgs="-Dmaven.version.suffix=\"-${sha:0:7}-SNAPSHOT\" -Dremote.snapshot.repository=$prRepoUrl -Drepository.credentials.id=pr-scala -Dremote.release.repository=noyoudont"
+
+ echo ">>> Getting Scala version number."
+ ant -q $antDeployArgs init
+ parseScalaProperties buildcharacter.properties # produce maven_version_number
+
+ echo ">>> Checking availability of Scala ${maven_version_number} in $prRepoUrl."
+ checkAvailability "org.scala-lang" "scala-library" "${maven_version_number}" $prRepoUrl; libraryAvailable=$RES
+ checkAvailability "org.scala-lang" "scala-reflect" "${maven_version_number}" $prRepoUrl; reflectAvailable=$RES
+ checkAvailability "org.scala-lang" "scala-compiler" "${maven_version_number}" $prRepoUrl; compilerAvailable=$RES
+
+ if $libraryAvailable && $reflectAvailable && $compilerAvailable; then
+ echo "Scala core already built!"
+ else
+ ant $antDeployArgs $antBuildArgs publish-opt-nodocs
+ fi
+
+ mv buildcharacter.properties jenkins.properties # parsed by the jenkins job
+ ;;
+esac
diff --git a/scripts/jobs/validate/test b/scripts/jobs/validate/test
new file mode 100755
index 0000000000..c1c02c80cb
--- /dev/null
+++ b/scripts/jobs/validate/test
@@ -0,0 +1,17 @@
+#!/bin/bash -e
+
+case $prDryRun in
+ yep)
+ echo "DRY RUN"
+ ;;
+ *)
+ ./pull-binary-libs.sh
+
+ # 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 \
+ -Dlocker.skip=1 -Dstarr.use.released=1 -Dextra.repo.url=$prRepoUrl \
+ $testExtraArgs ${testTarget-test.core docs.done}
+ ;;
+esac \ No newline at end of file