Skip to content

Commit

Permalink
Merge pull request #137 from NipunaMadhushan/main
Browse files Browse the repository at this point in the history
Add graalvm check for native build
  • Loading branch information
NipunaMadhushan authored Jun 20, 2023
2 parents 689f06c + 3a3b1fd commit 556485b
Show file tree
Hide file tree
Showing 4 changed files with 61 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/daily-build.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: Daily build

on:
workflow_dispatch:
schedule:
- cron: '30 2 * * *'

Expand Down
57 changes: 57 additions & 0 deletions .github/workflows/graalvm-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: GraalVM Check

on:
schedule:
- cron: '30 18 * * *'
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- 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: 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
- name: Set Up Ballerina
uses: ballerina-platform/setup-ballerina@v1
with:
version: 2201.6.0

- name: Update dependency versions
run: ./gradlew :jaeger-extension-ballerina:updateTomlVerions
env:
packageUser: ${{ secrets.BALLERINA_BOT_USERNAME }}
packagePAT: ${{ secrets.BALLERINA_BOT_TOKEN }}
JAVA_OPTS: -DBALLERINA_DEV_COMPILE_BALLERINA_ORG=true

- name: Run Ballerina build using the native executable
run: bal build --native ./prometheus-extension-ballerina

- name: Run Ballerina tests using the native executable
run: bal test --native ./prometheus-extension-ballerina

2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

group=org.ballerinalang
version=0.1.13-SNAPSHOT
ballerinaLangVersion=2201.0.1
ballerinaLangVersion=2201.7.0-20230619-175900-bb4e4544
org.gradle.caching=true
org.gradle.parallel=true
org.gradle.jvmargs='-Dfile.encoding=UTF-8'
Expand Down
2 changes: 2 additions & 0 deletions prometheus-extension-ballerina/Ballerina.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,5 @@
org = "ballerinax"
name = "prometheus"
version = "@toml.version@"
distribution = "2201.7.0"

0 comments on commit 556485b

Please sign in to comment.