Skip to content
Closed
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
8 changes: 6 additions & 2 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ cache:
- C:\Users\appveyor\.m2

install:
# Install maven and dependencies
# Install SBT and dependencies
- ps: .\dev\appveyor-install-dependencies.ps1
# Required package for R unit tests. xml2 is required to use jUnit reporter in testthat.
- cmd: Rscript -e "install.packages(c('knitr', 'rmarkdown', 'testthat', 'e1071', 'survival', 'arrow', 'xml2'), repos='https://cloud.r-project.org/')"
Expand All @@ -49,7 +49,11 @@ build_script:
# '-Djna.nosys=true' is required to avoid kernel32.dll load failure.
# See SPARK-28759.
# Ideally we should check the tests related to Hive in SparkR as well (SPARK-31745).
- cmd: mvn -DskipTests -Psparkr -Djna.nosys=true package
- cmd: set SBT_MAVEN_PROFILES=-Psparkr
- cmd: set SBT_OPTS=-Djna.nosys=true -Dfile.encoding=UTF-8 -Xms4096m -Xms4096m -XX:ReservedCodeCacheSize=128m
- cmd: sbt package
- cmd: set SBT_MAVEN_PROFILES=
- cmd: set SBT_OPTS=

environment:
NOT_CRAN: true
Expand Down
28 changes: 21 additions & 7 deletions dev/appveyor-install-dependencies.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -79,18 +79,32 @@ if (!(Test-Path $tools)) {
}

# ========================== Maven
# Push-Location $tools
Copy link
Member Author

Choose a reason for hiding this comment

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

I'll just comment out the instructions for installing Maven so that we can easily switch back to Maven after the StackOverflowError is resolved.

#
# $mavenVer = "3.6.3"
# Start-FileDownload "https://archive.apache.org/dist/maven/maven-3/$mavenVer/binaries/apache-maven-$mavenVer-bin.zip" "maven.zip"
#
# # extract
# Invoke-Expression "7z.exe x maven.zip"
#
# # add maven to environment variables
# $env:PATH = "$tools\apache-maven-$mavenVer\bin;" + $env:PATH
# $env:M2_HOME = "$tools\apache-maven-$mavenVer"
# $env:MAVEN_OPTS = "-Xmx2g -XX:ReservedCodeCacheSize=1g"
#
# Pop-Location

# ========================== SBT
Push-Location $tools

$mavenVer = "3.6.3"
Start-FileDownload "https://archive.apache.org/dist/maven/maven-3/$mavenVer/binaries/apache-maven-$mavenVer-bin.zip" "maven.zip"
$sbtVer = "1.5.5"
Start-FileDownload "https://github.com/sbt/sbt/releases/download/v$sbtVer/sbt-$sbtVer.zip" "sbt.zip"

# extract
Invoke-Expression "7z.exe x maven.zip"
Invoke-Expression "7z.exe x sbt.zip"

# add maven to environment variables
$env:PATH = "$tools\apache-maven-$mavenVer\bin;" + $env:PATH
$env:M2_HOME = "$tools\apache-maven-$mavenVer"
$env:MAVEN_OPTS = "-Xmx2g -XX:ReservedCodeCacheSize=1g"
# add sbt to environment variables
$env:PATH = "$tools\sbt\bin;" + $env:PATH

Pop-Location

Expand Down
3 changes: 2 additions & 1 deletion project/SparkBuild.scala
Original file line number Diff line number Diff line change
Expand Up @@ -917,7 +917,8 @@ object SparkR {
val buildRPackage = taskKey[Unit]("Build the R package")
lazy val settings = Seq(
buildRPackage := {
val command = baseDirectory.value / ".." / "R" / "install-dev.sh"
val postfix = if (File.separator == "\\") ".bat" else ".sh"
val command = baseDirectory.value / ".." / "R" / s"install-dev$postfix"
Process(command.toString).!!
},
(Compile / compile) := (Def.taskDyn {
Expand Down
1 change: 1 addition & 0 deletions project/build.properties
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,5 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Please update the version in appveyor-install-dependencies.ps1 together.
sbt.version=1.5.5