Skip to content

Make dotty use scala-infra for CI. #591

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
May 20, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions scripts/common
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
update() {
[[ -d $baseDir ]] || mkdir -p $baseDir
cd $baseDir

if [ ! -d $baseDir/$2 ]; then git clone "https://github.com/$1/$2.git"; fi

cd $2

git fetch --tags "https://github.com/$1/$2.git"
(git fetch "https://github.com/$1/$2.git" $3 && git checkout -fq FETCH_HEAD) #|| git checkout -fq $3 # || fallback is for local testing on tag
git reset --hard
}

sbtArgs="-Ddotty.travis.build=yes -ivy $baseDir/ivy2 -Dsbt.global.base=$HOME/.sbt/0.13 -sbt-dir $HOME/.sbt/0.13"
8 changes: 8 additions & 0 deletions scripts/jobs/validate/junit
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash -e

baseDir=${WORKSPACE-`pwd`}
scriptsDir="$baseDir/scripts"
. $scriptsDir/common

update scala scala
sbt $sbtArgs update compile test
8 changes: 8 additions & 0 deletions scripts/jobs/validate/partest
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash -e

baseDir=${WORKSPACE-`pwd`}
scriptsDir="$baseDir/scripts"
. $scriptsDir/common

sbt $sbtArgs update compile "partest run"

8 changes: 8 additions & 0 deletions scripts/jobs/validate/scalastyle
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash -e

baseDir=${WORKSPACE-`pwd`}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think these scripts will need #!/bin/bash -e to ensure the job fails.

scriptsDir="$baseDir/scripts"
. $scriptsDir/common

sbt $sbtArgs scalastyle

2 changes: 1 addition & 1 deletion test/test/ScannerTest.scala
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,6 @@ class ScannerTest extends DottyTest {

@Test
def scanScala() = {
scanDir("../scala/src")
scanDir("./scala/src")
}
}
2 changes: 1 addition & 1 deletion test/test/desugarPackage.scala
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ object desugarPackage extends DeSugarTest {
val start = System.nanoTime()
val startNodes = Trees.ntrees
parseDir("./src")
parseDir("../scala/src")
parseDir("./scala/src")
val ms1 = (System.nanoTime() - start)/1000000
val nodes = Trees.ntrees
val buf = parsedTrees map desugarTree
Expand Down
2 changes: 1 addition & 1 deletion test/test/parsePackage.scala
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ object parsePackage extends ParserTest {
nodes = 0
val start = System.nanoTime()
parseDir("./src")
parseDir("../scala/src")
parseDir("./scala/src")
val ms1 = (System.nanoTime() - start)/1000000
val buf = parsedTrees map transformer.transform
val ms2 = (System.nanoTime() - start)/1000000
Expand Down