Skip to content

GraalVM Check

GraalVM Check #122

name: GraalVM Check
on:
schedule:
- cron: '30 18 * * *'
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 17.0.7
- name: Set Up Ballerina
uses: ballerina-platform/[email protected]
with:
version: latest
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
env:
packageUser: ${{ secrets.BALLERINA_BOT_USERNAME }}
packagePAT: ${{ secrets.BALLERINA_BOT_TOKEN }}
JAVA_OPTS: -DBALLERINA_DEV_COMPILE_BALLERINA_ORG=true
run: |
./gradlew build -x test
- name: Set up GraalVM
uses: graalvm/setup-graalvm@v1
with:
version: 'latest'
java-version: '17.0.7'
components: 'native-image'
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Check GraalVM installation
run: |
echo "GRAALVM_HOME: ${{ env.GRAALVM_HOME }}"
echo "JAVA_HOME: ${{ env.JAVA_HOME }}"
native-image --version
- name: Run Ballerina tests using the native executable
run: bal test --graalvm ./ballerina
env:
JAVA_HOME: /usr/lib/jvm/default-jvm
CONNECTION_STRING: ${{ secrets.CONNECTION_STRING }}
QUEUE_NAME: ${{ secrets.QUEUE_NAME }}
TOPIC_NAME: ${{ secrets.TOPIC_NAME }}
SUBSCRIPTION_NAME1: ${{ secrets.SUBSCRIPTION_NAME1 }}
SUBSCRIPTION_NAME2: ${{ secrets.SUBSCRIPTION_NAME2 }}
SUBSCRIPTION_NAME3: ${{ secrets.SUBSCRIPTION_NAME3 }}