Skip to content
This repository has been archived by the owner on Jun 1, 2020. It is now read-only.

Commit

Permalink
Update builder to use GraalVM 19 release (#4)
Browse files Browse the repository at this point in the history
* bump to release version of graal & see what breaks

GraalVM was released, and it looks like there were quite a few API
changes from the latest "release candidate" to the release version --
including the removal of native-image from the default install. I guess
they don't really get the concept of a release candidate... well, lets
start by just bumping the version number and seeing what breaks as a
starting point.

* fix: metadata checksum issue with ol7_developer

appears to be entirely unrelated to the other upgrades we are doing now,
but necessary to get things working again until the oracle servers get
their act back together?

* restore native-image in docker builder

* graalvm download archive file URL path changes

archive files have swapped positioning of platform<->version, and macOS
has reverted back to using less userfriendly "darwin" identifier.

* ci: immediately exit in build on error

apparently azure CI treats scripts like.. actual scripts! which means
we need set -e to have a command exit halt everything.

* ci: gu install native-image

lets see if this puts things where it should go or requires some PATH
manipulation.  fingers crossed.
  • Loading branch information
mroth authored May 13, 2019
1 parent 2d96673 commit 31ee782
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 6 deletions.
9 changes: 7 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,24 @@
#
# Also see regarding potential future built-in native target support:
# https://github.com/scalameta/scalafmt/issues/1172
FROM oracle/graalvm-ce:1.0.0-rc16 as builder
FROM oracle/graalvm-ce:19.0.0 as builder
ARG SCALAFMT_VERSION=v2.0.0-RC7

WORKDIR /root

# install sbt
RUN curl https://bintray.com/sbt/rpm/rpm \
-o /etc/yum.repos.d/bintray-sbt-rpm.repo && \
yum install -y sbt
yum --disablerepo=ol7_developer install -y sbt
# ^^ temporary fix for upstream repository issue, TODO: remove me later
# yum install -y sbt

# other tools needed
RUN yum install -y git zlib-static

# native-image is no longer bundled with graalvm :-/
RUN gu install native-image

# get the source for the version of scalafmt we want
RUN git clone https://github.com/scalameta/scalafmt \
--branch ${SCALAFMT_VERSION} --single-branch
Expand Down
6 changes: 3 additions & 3 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

variables:
scalafmt_version: v2.0.0-RC7
graalvm_version: 1.0.0-rc16
graalvm_version: '19.0.0'

trigger:
branches:
Expand Down Expand Up @@ -48,7 +48,7 @@ jobs:
- template: ci/native-build.yml
parameters:
name: BuildNative_macOS
platform: macOS-amd64
platform: darwin-amd64
vmImage: macOS-10.14
binPath: Contents/Home/bin

Expand All @@ -69,7 +69,7 @@ jobs:
targetPath: $(Build.ArtifactStagingDirectory)
- task: DownloadPipelineArtifact@0
inputs:
artifactName: dist_macOS-amd64
artifactName: dist_darwin-amd64
targetPath: $(Build.ArtifactStagingDirectory)
- script: ls -lh $(Build.ArtifactStagingDirectory)
- task: GithubRelease@0
Expand Down
7 changes: 6 additions & 1 deletion ci/native-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,17 @@ jobs:
artifactName: jar
targetPath: $(System.DefaultWorkingDirectory)
- script: |
curl -fsL https://github.com/oracle/graal/releases/download/vm-$(graalvm_version)/graalvm-ce-${GRAALVM_VERSION}-${PLATFORM}.tar.gz \
curl -fsL https://github.com/oracle/graal/releases/download/vm-$(graalvm_version)/graalvm-ce-${PLATFORM}-${GRAALVM_VERSION}.tar.gz \
--output graalvm.tgz
tar xzf graalvm.tgz && rm -rf graalvm.tgz
mv graalvm-ce-$(graalvm_version) graalvm
displayName: Install GraalVM
- script: |
set -e
./graalvm/${BIN_PATH}/gu install native-image
displayName: Install native-image
- script: |
set -e
JAVA_OPTS="-Xmx=2g" ./graalvm/${BIN_PATH}/native-image \
${BUILD_FLAGS} \
--no-fallback \
Expand Down

0 comments on commit 31ee782

Please sign in to comment.