Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reuse cache for GraalVM and sbt #1237

Merged
merged 1 commit into from
Jun 12, 2019
Merged
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
5 changes: 3 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,11 @@ cache:
- $HOME/.sbt
- $HOME/.m2
- $HOME/.ivy2
- $HOME/.local/share/graalvm-ce-1.0.0-rc8
- $GRAALVM_PARENT_DIRECTORY

env:
global:
- GRAALVM_PARENT_DIRECTORY: ${HOME}/.local/share
- COMMIT_AUTHOR_EMAIL: "sbt-native-packager@muki.rocks"
- RELEASE_BRANCH: master
- secure: bK5zEd2s3y+ScGwuGcxlP0tXx83nvurmF/SWuQSmI0A2KRelipGSSY2BTa+URKk9smJusJIZUi72EqEwMHDhxLCfHomjze5BmpJB5Mr3fQI700nxPEA95cbM4Z1G9+K6fYWy2pi5S7Xmz1Sg07bP4sfzyVYlNB20aquLCmB9Llk=
Expand All @@ -37,7 +38,7 @@ before_install:

before_script:
- .travis/download-sbt
- . .travis/download-graalvm
- .travis/download-graalvm

# job definitions

Expand Down
3 changes: 2 additions & 1 deletion .travis/download-graalvm
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ function setup_os_specific_envs() {

setup_os_specific_envs
GRAALVM_VERSION=19.0.0
GRAALVM_PARENT_DIRECTORY=${HOME}/.local/share
GRAALVM_DISTRIBUTION=graalvm-ce
GRAAL_DIRECTORY=${GRAALVM_PARENT_DIRECTORY}/${GRAALVM_DISTRIBUTION}-${GRAALVM_VERSION}
TAR_GZ_FILENAME=${GRAALVM_DISTRIBUTION}-${OS_NAME}-amd64-${GRAALVM_VERSION}.tar.gz
Expand All @@ -34,6 +33,8 @@ then
tar zxf ${TAR_GZ_FILENAME} &&
${GRAAL_DIRECTORY}/${BIN_PATH}/gu install native-image &&
rm -f ${TAR_GZ_FILENAME})
else
echo "GraalVM Native Image already exists"
fi
ls -lsa ${NATIVE_IMAGE}
mkdir -p ${NATIVE_IMAGE_TARGET_DIRECTORY}
Expand Down
6 changes: 6 additions & 0 deletions .travis/download-sbt
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,10 @@
SBT_VERSION=1.2.6
SBT_LAUNCH_JAR_URL=http://dl.bintray.com/sbt/maven-releases/org/scala-sbt/sbt-launch/${SBT_VERSION}/sbt-launch.jar
TARGET_SBT_LAUNCH_JAR=${HOME}/.sbt/launchers/${SBT_VERSION}/sbt-launch.jar

if [ -f ${TARGET_SBT_LAUNCH_JAR} ]; then
echo "sbt ${SBT_VERSION} already exists"
exit
fi

curl -L --create-dirs -o ${TARGET_SBT_LAUNCH_JAR} ${SBT_LAUNCH_JAR_URL}