I have Java project which I compile with GraalVM native-image to executable binary. I'd like to configure continuous integration process for the project with Travis CI and it's ineresting to me - does Travis CI allow that? How can I configure .travis.yml file for building with GraalVM native-image?
I was able to configure native-image GraalVM compilation in Travis CI builds using install-jdk.sh from Bach.java - Java Shell Builder. Here is .travis-ci.yml:
sudo: false
language: java
cache:
directories:
- $HOME/.m2
before_install:
- wget https://github.com/sormuras/bach/raw/master/install-jdk.sh
matrix:
include:
# GraalVM
- env: JDK='GraalVM 19'
install: . ./install-jdk.sh --url "https://github.com/oracle/graal/releases/download/vm-19.2.0/graalvm-ce-linux-amd64-19.2.0.tar.gz"
script:
- mvn package -Pnative -Dnative-image.docker-build=true