diff options
Diffstat (limited to 'scripts/jobs/validate')
-rwxr-xr-x | scripts/jobs/validate/publish-core | 42 | ||||
-rwxr-xr-x | scripts/jobs/validate/test | 17 |
2 files changed, 59 insertions, 0 deletions
diff --git a/scripts/jobs/validate/publish-core b/scripts/jobs/validate/publish-core new file mode 100755 index 0000000000..392d01a591 --- /dev/null +++ b/scripts/jobs/validate/publish-core @@ -0,0 +1,42 @@ +#!/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" + + # master doesn't currently build with starr, so can't skip locker yet... + # TODO: enable for 2.11 once we have bumped versions in versions.properties accordingly + antBuildArgs="-Dlocker.skip=1" # -Dstarr.use.released=1 should be left up to the build (via versions.properties) + + # TODO: can we move doc generation downstream as well? + # build to (later) publish with a maven suffix that encodes the first 7 characters of the sha of the commit that we're validating + # (don't use the sha of the merge commit as we don't have an easy way of passing that down the validation chain) + ant -Darchives.skipxz=true $antDeployArgs $antBuildArgs distpack-maven-opt + + # mv buildcharacter.properties jenkins.properties # parsed by the jenkins job + echo "maven.version.number=$version_major.$version_minor.$version_patch-${sha:0:7}-SNAPSHOT" > jenkins.properties + + cd dists/maven/latest + ant $antDeployArgs deploy-core.snapshot + ;; +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 |