diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 401de0eb51aa..eb333c59d8c5 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -149,6 +149,18 @@ jobs: run: sbt ";scala3-bootstrapped/compile" shell: cmd + - name: build binary + run: sbt "dist/pack" & bash -version + shell: cmd + + - name: cygwin tests + run: '"C:\Program Files\cygwin64\bin\bash" ./project/scripts/winCmdTests' + shell: cmd + + - name: msys tests + run: '"C:\Program Files\Git\bin\bash" ./project/scripts/winCmdTests' + shell: cmd + - name: Scala.js Test run: sbt ";sjsJUnitTests/test ;sjsCompilerTests/test" shell: cmd diff --git a/dist/bin/common b/dist/bin/common index a3847b2b1dbd..fd7b8be9149e 100755 --- a/dist/bin/common +++ b/dist/bin/common @@ -7,7 +7,7 @@ # save terminal settings saved_stty=$(stty -g 2>/dev/null) # clear on error so we don't later try to restore them -if [[ ! $? ]]; then +if [[ ! $? ]]; then saved_stty="" fi @@ -135,7 +135,7 @@ fi find_lib () { local lib=$(find $PROG_HOME/lib/ -name "$1") if [ -n "$CYGPATHCMD" ]; then - $CYGPATHCMD -am $lib + "$CYGPATHCMD" -am $lib elif [[ $mingw || $msys ]]; then echo $lib | sed 's|/|\\\\|g' else diff --git a/project/scripts/bootstrapCmdTests b/project/scripts/bootstrapCmdTests index 7683c53f9e82..31b8368d5215 100755 --- a/project/scripts/bootstrapCmdTests +++ b/project/scripts/bootstrapCmdTests @@ -64,3 +64,6 @@ echo "testing i11644" cwd=$(pwd) clear_out "$OUT" (cd "$OUT" && "$cwd/bin/scalac" "$cwd/tests/pos/i11644.scala" && "$cwd/bin/scalac" "$cwd/tests/pos/i11644.scala") + +# check options specified in files +./bin/scalac @project/scripts/options "$SOURCE" diff --git a/project/scripts/options b/project/scripts/options new file mode 100644 index 000000000000..86d2c8fd8edb --- /dev/null +++ b/project/scripts/options @@ -0,0 +1,2 @@ +-Xprint:frontend -Ylog:frontend +-Ycheck:all diff --git a/project/scripts/winCmdTests b/project/scripts/winCmdTests new file mode 100644 index 000000000000..d287b60992b2 --- /dev/null +++ b/project/scripts/winCmdTests @@ -0,0 +1,10 @@ +#!/usr/bin/env bash + +set -e +PREFIX="dist/target/pack" +SOURCE="tests/pos/HelloWorld.scala" +$PREFIX/bin/scalac @project/scripts/options "$SOURCE" +$PREFIX/bin/scalac -d out "$SOURCE" +$PREFIX/bin/scala -classpath out HelloWorld +$PREFIX/bin/scala -classpath out -J-Xmx512m HelloWorld +mkdir -p _site && $PREFIX/bin/scaladoc -d _site -project Hello "$SOURCE"