Skip to content

Commit bd426ab

Browse files
committed
Test scripts on Windows with Cygwin and MSys
1 parent ea7abac commit bd426ab

File tree

4 files changed

+27
-0
lines changed

4 files changed

+27
-0
lines changed

.github/workflows/ci.yaml

+12
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,18 @@ jobs:
149149
run: sbt ";scala3-bootstrapped/compile"
150150
shell: cmd
151151

152+
- name: build binary
153+
run: sbt "dist/pack" & bash -version
154+
shell: cmd
155+
156+
- name: cygwin tests
157+
run: 'C:\cygwin64\bin\bash' ./project/scripts/winCmdTests
158+
shell: cmd
159+
160+
- name: msys tests
161+
run: 'C:\Program Files\Git\bin\bash' ./project/scripts/winCmdTests
162+
shell: cmd
163+
152164
- name: Scala.js Test
153165
run: sbt ";sjsJUnitTests/test ;sjsCompilerTests/test"
154166
shell: cmd

project/scripts/bootstrapCmdTests

+3
Original file line numberDiff line numberDiff line change
@@ -64,3 +64,6 @@ echo "testing i11644"
6464
cwd=$(pwd)
6565
clear_out "$OUT"
6666
(cd "$OUT" && "$cwd/bin/scalac" "$cwd/tests/pos/i11644.scala" && "$cwd/bin/scalac" "$cwd/tests/pos/i11644.scala")
67+
68+
# check options specified in files
69+
./bin/scalac @project/scripts/options "$SOURCE"

project/scripts/options

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
-Xprint:frontend -Ylog:frontend
2+
-Ycheck:all

project/scripts/winCmdTests

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/usr/bin/env bash
2+
3+
set -e
4+
PREFIX="dist/target/pack"
5+
SOURCE="tests/pos/HelloWorld.scala"
6+
$PREFIX/bin/scalac @project/scripts/options "$SOURCE"
7+
$PREFIX/bin/scalac "$SOURCE"
8+
$PREFIX/bin/scala -d out HelloWorld
9+
$PREFIX/bin/scala -classpath out -J-Xmx512m HelloWorld
10+
mkdir -p _site && $PREFIX/bin/scaladoc -siteroot _site -project Hello "$SOURCE"

0 commit comments

Comments
 (0)