GraalVM Check #291
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: GraalVM Check | |
on: | |
schedule: | |
- cron: "30 18 * * *" | |
workflow_dispatch: | |
pull_request: | |
types: [opened, synchronize, labeled] | |
concurrency: | |
group: graalvm-check | |
cancel-in-progress: true | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
if: github.event_name != 'pull_request' || !contains(github.event.pull_request.labels.*.name, 'Skip GraalVM Check') | |
steps: | |
- name: Checkout the Repository | |
uses: actions/checkout@v3 | |
- name: Set Up Ballerina | |
uses: ballerina-platform/[email protected] | |
with: | |
version: latest | |
- name: Set up GraalVM | |
uses: graalvm/setup-graalvm@v1 | |
with: | |
java-version: "17" | |
distribution: "graalvm-community" | |
set-java-home: true | |
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: Set ENV Variables | |
run: | | |
echo -e '${{ toJson(secrets) }}' | jq -r 'to_entries[] | .key + "=" + .value' >> $GITHUB_ENV | |
- name: Build Package | |
run: ./gradlew build | |
env: | |
packageUser: ${{ github.actor }} | |
packagePAT: ${{ secrets.GITHUB_TOKEN }} | |
- name: Remove Target Directory | |
run: sudo rm -rf ballerina/target | |
- name: Start MongoDB Server | |
run: | | |
cd ballerina/tests/resources/docker | |
docker compose up -d | |
- name: Test with GraalVM | |
run: | | |
cd ballerina | |
bal test --graalvm | |
- name: Stop MongoDB Server | |
run: | | |
cd ballerina/tests/resources/docker | |
docker compose down |