Skip to content

Commit

Permalink
Revert build-with-bal-test-graalvm change
Browse files Browse the repository at this point in the history
  • Loading branch information
ravinperera00 committed Jan 30, 2025
1 parent 3f04571 commit 13613da
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 8 deletions.
63 changes: 56 additions & 7 deletions .github/workflows/build-with-bal-test-graalvm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,64 @@ on:
- cron: "30 18 * * *"
workflow_dispatch:
pull_request:
types: [ opened, synchronize, labeled ]
types: [opened, synchronize, labeled]

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }}
group: graalvm-check
cancel-in-progress: true

jobs:
call_stdlib_workflow:
name: Run StdLib Workflow
if: ${{ github.event_name != 'schedule' || (github.event_name == 'schedule' && github.repository_owner == 'ballerina-platform') }}
uses: ballerina-platform/ballerina-library/.github/workflows/build-with-bal-test-graalvm-connector-template.yml@main
secrets: inherit
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: "21"
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 test
env:
packageUser: ${{ github.actor }}
packagePAT: ${{ secrets.GITHUB_TOKEN }}

- name: Remove Target Directory
run: sudo rm -rf ballerina/target

- name: Start Redis Server
run: |
cd ballerina/tests/resources/docker
docker compose -f compose-standalone.yml up -d
- name: Test with GraalVM
run: |
cd ballerina
bal test --graalvm
- name: Stop Redis Server
run: |
cd ballerina/tests/resources/docker
docker compose -f compose-standalone.yml down
2 changes: 1 addition & 1 deletion ballerina/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ ballerina {
module = packageName
testCoverageParam = "--code-coverage --coverage-format=xml"
isConnector = true
platform = "java17"
platform = "java21"
}

configurations {
Expand Down

0 comments on commit 13613da

Please sign in to comment.