-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #228 from ballerina-platform/gradle-migration
Migrate to Gradle build
- Loading branch information
Showing
25 changed files
with
1,106 additions
and
70 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# | ||
# https://help.github.com/articles/dealing-with-line-endings/ | ||
# | ||
# Linux start script should use lf | ||
/gradlew text eol=lf | ||
|
||
# These are Windows script files and should use crlf | ||
*.bat text eol=crlf | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,7 +10,8 @@ jobs: | |
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Checkout the Repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up GraalVM | ||
uses: graalvm/setup-graalvm@v1 | ||
|
@@ -26,14 +27,8 @@ jobs: | |
echo "JAVA_HOME: ${{ env.JAVA_HOME }}" | ||
native-image --version | ||
- name: Set Up Ballerina | ||
uses: ballerina-platform/[email protected] | ||
with: | ||
version: latest | ||
|
||
- name: Run Ballerina tests using the native executable | ||
working-directory: ./ballerina | ||
run: bal test --graalvm | ||
- name: Build Using GraalVM | ||
run: ./gradlew build -P balGraalVMTest | ||
env: | ||
JAVA_OPTS: -DBALLERINA_DEV_COMPILE_BALLERINA_ORG=true | ||
CLIENT_ID: ${{ secrets.CLIENT_ID }} | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,39 +3,37 @@ name: Pull Request | |
on: [ pull_request ] | ||
|
||
jobs: | ||
build: | ||
build-on-ubuntu: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Checkout the Repository | ||
uses: actions/checkout@v3 | ||
|
||
# Setup Ballerina Environment | ||
- name: Set Up Ballerina | ||
uses: ballerina-platform/[email protected] | ||
with: | ||
version: latest | ||
|
||
# Build Ballerina Project | ||
- name: Ballerina Build | ||
run: bal pack ./ballerina | ||
env: | ||
JAVA_HOME: /usr/lib/jvm/default-jvm | ||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: "temurin" | ||
java-version: 17.0.7 | ||
|
||
# Build Module Examples | ||
- name: Ballerina Examples Build | ||
run: chmod +x ./examples/build.sh && ./examples/build.sh build | ||
- name: Gradle Build without Tests | ||
if: ${{ github.event.pull_request.head.repo.full_name != github.repository }} | ||
run: ./gradlew build -x test | ||
env: | ||
JAVA_HOME: /usr/lib/jvm/default-jvm | ||
packageUser: ${{ github.actor }} | ||
packagePAT: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
# Test Ballerina Project | ||
- name: Ballerina Test | ||
working-directory: ./ballerina | ||
# tests will be skipped if the PR is from a forked repository (as the secrets are not available) | ||
- name: Gradle Build | ||
if: ${{ github.event.pull_request.head.repo.full_name == github.repository }} | ||
run: bal test --test-report --code-coverage --coverage-format=xml | ||
run: ./gradlew build | ||
env: | ||
JAVA_OPTS: -DBALLERINA_DEV_COMPILE_BALLERINA_ORG=true | ||
CLIENT_ID: ${{ secrets.CLIENT_ID }} | ||
CLIENT_SECRET: ${{ secrets.CLIENT_SECRET }} | ||
CLIENT_ID: ${{ secrets.CLIENT_ID }} | ||
CLIENT_SECRET: ${{ secrets.CLIENT_SECRET }} | ||
REFRESH_TOKEN: ${{ secrets.REFRESH_TOKEN }} | ||
REFRESH_URL: ${{ secrets.REFRESH_URL }} | ||
RECIPIENT: ${{ secrets.RECIPIENT }} | ||
|
@@ -46,7 +44,8 @@ jobs: | |
INLINE_IMAGE_PATH: ${{ secrets.INLINE_IMAGE_PATH }} | ||
INLINE_IMAGE_NAME: ${{ secrets.INLINE_IMAGE_NAME }} | ||
IMAGE_CONTENT_TYPE: ${{ secrets.IMAGE_CONTENT_TYPE }} | ||
JAVA_HOME: /usr/lib/jvm/default-jvm | ||
packageUser: ${{ github.actor }} | ||
packagePAT: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Upload coverage reports to Codecov | ||
uses: codecov/codecov-action@v3 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,16 @@ | ||
name: Deployment | ||
name: Publish Release | ||
|
||
on: | ||
release: | ||
types: [ published ] | ||
workflow_dispatch: | ||
repository_dispatch: | ||
types: [ stdlib-release-pipeline ] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
# Setup Ballerina Environment | ||
- name: Set Up Ballerina | ||
uses: ballerina-platform/[email protected] | ||
with: | ||
version: 2201.7.0 | ||
|
||
# Build Ballerina Project | ||
- name: Ballerina Build | ||
run: bal pack ./ballerina | ||
env: | ||
JAVA_HOME: /usr/lib/jvm/default-jvm | ||
|
||
# Build Module Examples | ||
- name: Ballerina Examples Build | ||
run: chmod +x ./examples/build.sh && ./examples/build.sh build | ||
env: | ||
JAVA_HOME: /usr/lib/jvm/default-jvm | ||
|
||
# Push to Ballerina Central | ||
- name: Ballerina Push | ||
run: bal push | ||
working-directory: ./ballerina | ||
env: | ||
BALLERINA_CENTRAL_ACCESS_TOKEN: ${{ secrets.BALLERINA_CENTRAL_DEV_ACCESS_TOKEN }} | ||
JAVA_HOME: /usr/lib/jvm/default-jvm | ||
call_workflow: | ||
name: Run Release Workflow | ||
if: ${{ github.repository_owner == 'ballerina-platform' }} | ||
uses: ballerina-platform/ballerina-standard-library/.github/workflows/release-package-template.yml@main | ||
secrets: inherit | ||
with: | ||
package-name: googleapis.gmail | ||
package-org: ballerinax |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,6 +17,7 @@ Config.toml | |
|
||
# Package Files # | ||
*.jar | ||
!gradle/wrapper/gradle-wrapper.jar | ||
*.war | ||
*.ear | ||
*.zip | ||
|
Oops, something went wrong.