Travis CI中具有本机图像编译功能的GraalVM [英] GraalVM with native-image compilation in Travis CI

查看:164
本文介绍了Travis CI中具有本机图像编译功能的GraalVM的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Java项目,该项目可以用GraalVM本机映像编译为可执行二进制文件.我想使用Travis CI为该项目配置持续集成过程,这对我来说很有趣-Travis CI允许吗?如何配置.travis.yml文件以使用GraalVM本机图像进行构建?

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

这篇关于Travis CI中具有本机图像编译功能的GraalVM的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆