Skip to content

GraalVM Check

GraalVM Check #113

name: GraalVM Check
on:
schedule:
- cron: '30 18 * * *'
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
services:
mongodb:
image: mongo:4.2.0
env:
# Following credentials are only used during testing in docker container
MONGO_INITDB_ROOT_USERNAME: admin
MONGO_INITDB_ROOT_PASSWORD: admin
ports:
- 27011:27017
mongodb-ssl:
image: rzhilkibaev/mongo-x509-auth-ssl:latest
ports:
- 27012:27017
steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11
- 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: '11'
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(MongoDB-SSL) using the native executable
run: bal test --graalvm --groups mongodb-ssl ./ballerina
env:
JAVA_HOME: /usr/lib/jvm/default-jvm
# Following credentials are only used during testing in docker container
MONGODB_USER: C=US,ST=CA,L=San Francisco,O=Jaspersoft,OU=JSDev,CN=admin
- name: Run Ballerina tests(MongoDB) using the native executable
run: bal test --graalvm --groups mongodb ./ballerina
env:
JAVA_HOME: /usr/lib/jvm/default-jvm
# Following credentials are only used during testing in docker container
MONGODB_USER: admin
MONGODB_PASSWORD: admin