From 4bbd6d49b6b9a17e791ad016a4b6f29c68fc6e31 Mon Sep 17 00:00:00 2001 From: NipunaMadhushan Date: Fri, 25 Nov 2022 13:48:26 +0530 Subject: [PATCH 1/4] Add workflow dispatch for daily build --- .github/workflows/daily-build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/daily-build.yml b/.github/workflows/daily-build.yml index 8296ffc..a2f0425 100644 --- a/.github/workflows/daily-build.yml +++ b/.github/workflows/daily-build.yml @@ -1,6 +1,7 @@ name: Daily build on: + workflow_dispatch: schedule: - cron: '30 2 * * *' From 3f706f369dd8c5739fdb3790366b0c1e65e91128 Mon Sep 17 00:00:00 2001 From: NipunaMadhushan Date: Tue, 20 Jun 2023 12:05:35 +0530 Subject: [PATCH 2/4] Add graalvm check for native tests --- .github/workflows/graalvm-check.yml | 49 +++++++++++++++++++ gradle.properties | 2 +- prometheus-extension-ballerina/Ballerina.toml | 4 ++ 3 files changed, 54 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/graalvm-check.yml diff --git a/.github/workflows/graalvm-check.yml b/.github/workflows/graalvm-check.yml new file mode 100644 index 0000000..2ef22e3 --- /dev/null +++ b/.github/workflows/graalvm-check.yml @@ -0,0 +1,49 @@ +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: Run Ballerina tests using the native executable + run: bal test --native ./prometheus-extension-ballerina + + - name: Run Ballerina build using the native executable + run: bal build --native ./prometheus-extension-ballerina diff --git a/gradle.properties b/gradle.properties index 9f166bb..014ab9c 100644 --- a/gradle.properties +++ b/gradle.properties @@ -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' diff --git a/prometheus-extension-ballerina/Ballerina.toml b/prometheus-extension-ballerina/Ballerina.toml index 82a6aa5..2e5de48 100644 --- a/prometheus-extension-ballerina/Ballerina.toml +++ b/prometheus-extension-ballerina/Ballerina.toml @@ -18,3 +18,7 @@ org = "ballerinax" name = "prometheus" version = "@toml.version@" +distribution = "2201.7.0" + +[platform.java11] +graalvmCompatible = true From d5ce81ca1d348193f982dac68235cbeb38933768 Mon Sep 17 00:00:00 2001 From: NipunaMadhushan Date: Tue, 20 Jun 2023 12:31:10 +0530 Subject: [PATCH 3/4] Include update dependency versions --- .github/workflows/graalvm-check.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/graalvm-check.yml b/.github/workflows/graalvm-check.yml index 2ef22e3..6b1c8b3 100644 --- a/.github/workflows/graalvm-check.yml +++ b/.github/workflows/graalvm-check.yml @@ -42,6 +42,13 @@ jobs: 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 tests using the native executable run: bal test --native ./prometheus-extension-ballerina From 3a3b1fdfac93b03cb81bd1a25feff48ba2ece255 Mon Sep 17 00:00:00 2001 From: NipunaMadhushan Date: Tue, 20 Jun 2023 14:27:07 +0530 Subject: [PATCH 4/4] Remove graalvmCompatibility tag --- .github/workflows/graalvm-check.yml | 5 +++-- prometheus-extension-ballerina/Ballerina.toml | 2 -- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/graalvm-check.yml b/.github/workflows/graalvm-check.yml index 6b1c8b3..710aaca 100644 --- a/.github/workflows/graalvm-check.yml +++ b/.github/workflows/graalvm-check.yml @@ -49,8 +49,9 @@ jobs: 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 - - name: Run Ballerina build using the native executable - run: bal build --native ./prometheus-extension-ballerina diff --git a/prometheus-extension-ballerina/Ballerina.toml b/prometheus-extension-ballerina/Ballerina.toml index 2e5de48..d5f3682 100644 --- a/prometheus-extension-ballerina/Ballerina.toml +++ b/prometheus-extension-ballerina/Ballerina.toml @@ -20,5 +20,3 @@ name = "prometheus" version = "@toml.version@" distribution = "2201.7.0" -[platform.java11] -graalvmCompatible = true