Update appveyor.yml

Appveyor supports uploading build artifacts that can be downloaded after
the build completes. This can be used to build and distribute graalvm
native images for mac, linux and windows since appveyor supports all
three of these platforms.  Appveyor allows custom builds based on the
git branch. Since building the graalvm native images is slow, the new
config will only build the native image when a branch called
`build-graal` is pushed. Otherwise it will run the normal scripted tests
that it has always run.
This commit is contained in:
Ethan Atkins 2020-06-21 13:21:58 -07:00
parent 778264a319
commit e878660ef3
1 changed files with 159 additions and 22 deletions

View File

@ -1,29 +1,166 @@
image: Visual Studio 2017
image:
- MacOS
- Visual Studio 2015
- Visual Studio 2019
- Ubuntu
build: off
init:
- git config --global core.autocrlf input
install:
- SET JAVA_HOME=C:\Program Files\Java\jdk1.8.0
- SET PATH=%JAVA_HOME%\bin;%PATH%
- SET CI=true
for:
-
matrix:
only:
- image: Ubuntu
- ps: |
Add-Type -AssemblyName System.IO.Compression.FileSystem
if (!(Test-Path -Path "C:\sbt" )) {
(new-object System.Net.WebClient).DownloadFile(
'https://github.com/sbt/sbt/releases/download/v1.0.4/sbt-1.0.4.zip',
'C:\sbt-bin.zip'
)
[System.IO.Compression.ZipFile]::ExtractToDirectory("C:\sbt-bin.zip", "C:\sbt")
}
- SET PATH=C:\sbt\sbt\bin;%PATH%
- SET SBT_OPTS=-XX:MaxPermSize=2g -Xmx4g -Dsbt.supershell=never -Dfile.encoding=UTF8
test_script:
- sbt "scripted actions/* classloader-cache/* nio/* watch/*" "testOnly sbt.ServerSpec"
branches:
only:
- build-graal
artifacts:
- path: client/target/bin/sbtc
name: sbtc
cache:
- '%LOCALAPPDATA%\Coursier\Cache\v1'
- '%USERPROFILE%\.ivy2\cache'
- '%USERPROFILE%\.sbt'
install:
- curl -sL https://github.com/sbt/sbt/releases/download/v1.3.10/sbt-1.3.10.tgz > ~/sbt-bin.tgz
- mkdir ~/sbt
- tar -xf ~/sbt-bin.tgz --directory ~/sbt
- curl -sL https://raw.githubusercontent.com/shyiko/jabba/0.11.0/install.sh | bash && . ~/.jabba/jabba.sh
- jabba install adopt@1.8.0-222
- jabba use adopt@1.8.0-222
- curl -sL https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-20.1.0/graalvm-ce-java8-linux-amd64-20.1.0.tar.gz > graalvm.tar.gz
- tar -xf graalvm.tar.gz
- export PATH="~/sbt/sbt/bin:$PATH"
- export PATH="$PATH:~/.jabba/jdk/adopt@1.8.0-222/bin"
- export JAVA_HOME="~/.jabba/jdk/adopt@1.8.0-222"
test_script:
- export PATH="$PATH:~/.jabba/jdk/adopt@1.8.0-222/bin"
- export PATH="$PATH:graalvm-ce-java8-20.1.0/bin"
- gu install native-image
- sbt -Dsbt.native-image=$(pwd)/graalvm-ce-java8-20.1.0/bin/native-image "sbtClientProj/genNativeExecutable"
-
matrix:
only:
- image: MacOS
branches:
only:
- build-graal
artifacts:
- path: client/target/bin/sbtc
name: mac-native-sbt-client
install:
- curl -sL https://github.com/sbt/sbt/releases/download/v1.3.10/sbt-1.3.10.tgz > ~/sbt-bin.tgz
- mkdir ~/sbt
- tar -xf ~/sbt-bin.tgz --directory ~/sbt
- curl -sL https://raw.githubusercontent.com/shyiko/jabba/0.11.0/install.sh | bash && . ~/.jabba/jabba.sh
- jabba install adopt@1.8.0-222
- jabba use adopt@1.8.0-222
- curl -sL https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-20.1.0/graalvm-ce-java8-darwin-amd64-20.1.0.tar.gz > graalvm.tar.gz
- tar -xf graalvm.tar.gz
- export PATH="~/sbt/sbt/bin:$PATH"
- export PATH="$PATH:~/.jabba/jdk/adopt@1.8.0-222/bin"
- export JAVA_HOME="~/.jabba/jdk/adopt@1.8.0-222"
test_script:
- export PATH="$PATH:~/.jabba/jdk/adopt@1.8.0-222/Contents/Home/bin"
- export PATH="$PATH:graalvm-ce-java8-20.1.0/Contents/Home/bin"
- gu install native-image
- sbt -Dsbt.native-image=$(pwd)/graalvm-ce-java8-20.1.0/Contents/Home/bin/native-image "sbtClientProj/genNativeExecutable"
-
matrix:
only:
- image: Visual Studio 2015
branches:
only:
- build-graal
artifacts:
- path: client\target\bin\sbtc.exe
name: sbtc.exe
install:
- cinst jdk8 -params 'installdir=C:\\jdk8'
- SET CI=true
#- choco install windows-sdk-7.1 kb2519277
- call "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd"
- ps: |
Add-Type -AssemblyName System.IO.Compression.FileSystem
if (!(Test-Path -Path "C:\sbt" )) {
(new-object System.Net.WebClient).DownloadFile(
'https://github.com/sbt/sbt/releases/download/v1.3.10/sbt-1.3.10.zip',
'C:\sbt-bin.zip'
)
[System.IO.Compression.ZipFile]::ExtractToDirectory("C:\sbt-bin.zip", "C:\sbt")
}
if (!(Test-Path -Path "C:\graalvm-ce-java8-20.2.0-dev" )) {
(new-object System.Net.WebClient).DownloadFile(
'https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-20.1.0/graalvm-ce-java8-windows-amd64-20.1.0.zip',
'C:\graalvm-ce-java8-20.1.0.zip'
)
[System.IO.Compression.ZipFile]::ExtractToDirectory("C:\graalvm-ce-java8-20.1.0.zip", "C:\")
}
if (!(Test-Path -Path "C:\zulu-jdk7" )) {
(new-object System.Net.WebClient).DownloadFile(
'https://cdn.azul.com/zulu/bin/zulu7.38.0.11-ca-jdk7.0.262-win_x64.zip',
'C:\zulu-jdk7.zip'
)
[System.IO.Compression.ZipFile]::ExtractToDirectory("C:\zulu-jdk7.zip", "C:\")
}
- SET PATH=C:\graalvm-ce-java8-20.1.0\bin;%PATH%
- SET PATH=C:\sbt\sbt\bin;%PATH%
- SET JAVA_HOME=C:\jdk8
- gu install native-image
cache:
- '%USERPROFILE%\.ivy2\cache'
- '%LOCALAPPDATA%\Coursier\Cache\v1'
- '%USERPROFILE%\.sbt'
test_script:
- sbt "-Dsbt.native-image=C:\graalvm-ce-java8-20.1.0\bin\native-image.cmd" "sbtClientProj/genNativeExecutable"
-
matrix:
only:
- image: Visual Studio 2019
branches:
except:
- build-graal
install:
- cinst jdk8 -params 'installdir=C:\\jdk8'
- SET JAVA_HOME=C:\jdk8
- SET PATH=C:\jdk8\bin;%PATH%
- SET CI=true
- ps: |
Add-Type -AssemblyName System.IO.Compression.FileSystem
if (!(Test-Path -Path "C:\sbt" )) {
(new-object System.Net.WebClient).DownloadFile(
'https://github.com/sbt/sbt/releases/download/v1.3.10/sbt-1.3.10.zip',
'C:\sbt-bin.zip'
)
[System.IO.Compression.ZipFile]::ExtractToDirectory("C:\sbt-bin.zip", "C:\sbt")
}
if (!(Test-Path -Path "C:\zulu-jdk7" )) {
(new-object System.Net.WebClient).DownloadFile(
'https://cdn.azul.com/zulu/bin/zulu7.38.0.11-ca-jdk7.0.262-win_x64.zip',
'C:\zulu-jdk7.zip'
)
[System.IO.Compression.ZipFile]::ExtractToDirectory("C:\zulu-jdk7.zip", "C:\")
}
- SET PATH=C:\sbt\sbt\bin;%PATH%
- SET SBT_OPTS=-Xmx4g -Dsbt.supershell=never -Dfile.encoding=UTF8
cache:
- '%USERPROFILE%\.ivy2\cache'
- '%LOCALAPPDATA%\Coursier\Cache\v1'
- '%USERPROFILE%\.sbt'
test_script:
- sbt "scripted actions/* classloader-cache/* nio/* watch/*" "serverTestProj/testOnly serverTestProj/testOnly testpkg.HandshakeTest"