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

Build GraalVM native image #42

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
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
62 changes: 62 additions & 0 deletions .github/workflows/graalvm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: GraalVM

on:
push:
pull_request:
schedule:
- cron: '0 1 * * *'

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

jobs:
graalvm:
name: GraalVM
runs-on: ubuntu-latest
outputs:
xoom_version: ${{ steps.version.outputs.xoom_version }}

steps:
- uses: actions/checkout@v2

- name: Set up GraalVM
uses: DeLaGuardo/[email protected]
with:
java: 'java8'

- name: Cache Maven packages
uses: actions/cache@v2
with:
path: ~/.m2/repository
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2-

- name: Determine version
id: version
run: echo "::set-output name=xoom_version::$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)"

- name: Install the native-image component
run: gu install native-image

- name: Build with GraalVM
run: mvn --batch-mode -Pgithub-releases -Pnative-image clean install

- name: Publish GraalVM artifacts
uses: actions/upload-artifact@v2
with:
name: GraalVM
path: |
target/*.h
target/*.so
target/*.build_artifacts.txt

- name: Notify slack
if: failure() && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/')) && github.repository_owner == 'vlingo'
uses: rtCamp/action-slack-notify@v2
env:
SLACK_COLOR: "${{ job.status == 'success' && 'good' || 'danger' }}"
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
SLACK_CHANNEL: ci-cd
SLACK_USERNAME: Bob the Builder
SLACK_ICON: 'https://vlingo.io/wp-content/uploads/cropped-vlingo-favicon-180x180.png'
SLACK_FOOTER: 'GraalVM ${{ github.repository }}:${{ steps.version.outputs.xoom_version }}'