From b6b7eb6e93007b83a6ddadc445b49d9e1f80cc8c Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Wed, 2 Jun 2021 18:56:43 +0200 Subject: [PATCH 1/2] Build GraalVM native image Signed-off-by: Jakub Zalas --- .github/workflows/build.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 32c0778..5456f00 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -44,6 +44,26 @@ jobs: name: JARs path: target/*.jar + - name: Set up GraalVM + uses: DeLaGuardo/setup-graalvm@4.0 + with: + java: 'java8' + + - 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: always() && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/')) && github.repository_owner == 'vlingo' uses: rtCamp/action-slack-notify@v2 From 8657e4243cbd45e3be3da74b3b10fcf1d873d341 Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Wed, 2 Jun 2021 19:34:26 +0200 Subject: [PATCH 2/2] Create a separate GraalVM build Signed-off-by: Jakub Zalas --- .github/workflows/build.yml | 20 ----------- .github/workflows/graalvm.yml | 62 +++++++++++++++++++++++++++++++++++ 2 files changed, 62 insertions(+), 20 deletions(-) create mode 100644 .github/workflows/graalvm.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5456f00..32c0778 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -44,26 +44,6 @@ jobs: name: JARs path: target/*.jar - - name: Set up GraalVM - uses: DeLaGuardo/setup-graalvm@4.0 - with: - java: 'java8' - - - 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: always() && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/')) && github.repository_owner == 'vlingo' uses: rtCamp/action-slack-notify@v2 diff --git a/.github/workflows/graalvm.yml b/.github/workflows/graalvm.yml new file mode 100644 index 0000000..55421ee --- /dev/null +++ b/.github/workflows/graalvm.yml @@ -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/setup-graalvm@4.0 + 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 }}'