Skip to content

Commit ba17316

Browse files
committed
Merge pull request scala#4795 from SethTisue/windows-ci
improvements to Windows build & test situation
2 parents 6e2d7ed + b3bffef commit ba17316

File tree

7 files changed

+32
-7
lines changed

7 files changed

+32
-7
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,8 @@ but the CI will verify against the baseline version.)
7676

7777
You'll also need Apache Ant (version 1.9.0 or above) and curl (for `./pull-binary-libs.sh`).
7878

79+
Mac OS X and Linux work. Windows may work if you use Cygwin. (Community help with keeping the build working on Windows is appreciated.)
80+
7981
## Git Hygiene
8082

8183
As git history is forever, we take great pride in the quality of the commits we merge into the repository. The title of your commit will be read hundreds (of thousands? :-)) of times, so it pays off to spend just a little bit more time to polish it, making it descriptive and concise. Please take a minute to read the advice [most projects agree on](https://github.com/erlang/otp/wiki/Writing-good-commit-messages), and stick to 72 or fewer characters for the first line, wrapping subsequent ones at 80 (at most).

scripts/jobs/integrate/windows

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/bin/bash -x
2+
3+
./pull-binary-libs.sh
4+
5+
export ANT_OPTS="-Dfile.encoding=UTF-8 -server -XX:+AggressiveOpts -XX:+UseParNewGC -Xmx2G -Xss1M -XX:MaxPermSize=512M -XX:ReservedCodeCacheSize=128M"
6+
7+
# TODO: don't hardcode this path, which is just where we currently have
8+
# ant manually installed on jenkins-worker-windows-publish.
9+
PATH=/cygdrive/c/apache-ant-1.9.6/bin:$PATH
10+
11+
ant \
12+
-Dstarr.version=2.11.7 \
13+
-Dscalac.args.optimise=-optimise \
14+
-Dlocker.skip=1 \
15+
test

test/files/run/t7634.check

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22

3-
scala> .lines
4-
res1: List[String] = List(shello, world.)
3+
scala> .lines.foreach(println)
4+
shello, world.
55

66
scala> :quit

test/files/run/t7634.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import scala.util.Properties.propOrElse
99
object Test extends ReplTest {
1010
def java = propOrElse("javacmd", "java")
1111
def code = s""":sh $java -classpath $testOutput hello.Hello
12-
|.lines""".stripMargin
12+
|.lines.foreach(println)""".stripMargin
1313
}
1414

1515
package hello {

test/partest

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,14 @@ findScalaHome () {
2222
}
2323

2424
# Use tput to detect color-capable terminal.
25+
# (note: I have found that on Cygwin, the script sometimes dies here.
26+
# it doesn't happen from the Cygwin prompt when ssh'ing in to
27+
# jenkins-worker-windows-publish, only when I make a Jenkins job
28+
# that runs this script. I don't know why. it may have to do with
29+
# which bash flags are set (-e? -x?) and with bash flags propagating
30+
# from one script to another? not sure. anyway, normally in a CI
31+
# context we run partest through ant, not through this script, so I'm
32+
# not investigating further for now.)
2533
term_colors=$(tput colors 2>/dev/null)
2634
if [[ $? == 0 ]] && [[ $term_colors -gt 2 ]]; then
2735
git_diff_options="--color=always --word-diff"

tools/get-scala-commit-date.bat

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
@echo off
22
for %%X in (bash.exe) do (set FOUND=%%~$PATH:X)
33
if defined FOUND (
4-
bash "%~dp0\get-scala-commit-date"
4+
bash "%~dp0\get-scala-commit-date" 2>NUL
55
) else (
66
rem echo this script does not work with cmd.exe. please, install bash
77
echo unknown
88
exit 1
9-
)
9+
)

tools/get-scala-commit-sha.bat

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
@echo off
22
for %%X in (bash.exe) do (set FOUND=%%~$PATH:X)
33
if defined FOUND (
4-
bash "%~dp0\get-scala-commit-sha"
4+
bash "%~dp0\get-scala-commit-sha" 2>NUL
55
) else (
66
rem echo this script does not work with cmd.exe. please, install bash
77
echo unknown
88
exit 1
9-
)
9+
)

0 commit comments

Comments
 (0)