Skip to content

GraalVM Check

GraalVM Check #66

name: GraalVM Check
on:
schedule:
- cron: "30 18 * * *"
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }}
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 -x :qm-examples:build
env:
packageUser: ${{ github.actor }}
packagePAT: ${{ secrets.GITHUB_TOKEN }}
- name: Remove Target Directory
run: |
cd ballerina
for dir in $(find . -type d -maxdepth 1 -mindepth 1); do
(cd "$dir" && sudo rm -rf target && cd ..);
done
- name: Test with GraalVM
run: |
cd ballerina
for dir in $(find . -type d -maxdepth 1 -mindepth 1); do
if [[ "$dir" == *resources ]]; then
continue
fi
(cd "$dir" && IS_BAL_BUILD=true bal test --graalvm && cd ..);
done