From d5cc27480f721ccf3b63ad87e0d13e43005abba1 Mon Sep 17 00:00:00 2001 From: Nick Molcanov <32801560+nck-mlcnv@users.noreply.github.com> Date: Wed, 22 May 2024 13:35:10 +0000 Subject: [PATCH] Update Test Workflow --- .github/workflows/maven.yml | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 232cebc8f..969aec1ff 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -10,7 +10,7 @@ on: - main jobs: - deploy: + tests: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 @@ -26,4 +26,22 @@ jobs: key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} restore-keys: ${{ runner.os }}-m2 - name: Testing the Java code - run: mvn install + run: mvn package + + # Only run for pull request on main or if pushed to develop + compile_native: + if: github.base_ref == "main" || github.event_name == "push" + name: Test Native Executable Compilation + runs-on: ubuntu-latest + needs: find_version + steps: + - uses: actions/checkout@v4 + - name: Set up GraalVM + uses: graalvm/setup-graalvm@v1 + with: + java-version: '21' + cache: 'maven' + - name: 'Generate configuration files' + run: './graalvm/generate-config.sh' + - name: 'Compile native-binary' + run: 'mvn -DskipTests package -Pnative'