-
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.
- Loading branch information
1 parent
fbf51ff
commit 3a27e7c
Showing
18 changed files
with
1,149 additions
and
123 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 |
---|---|---|
@@ -1,50 +1,54 @@ | ||
name: GraalVM Check | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
lang_tag: | ||
description: Branch/Release Tag of the Ballerina Lang | ||
required: true | ||
default: master | ||
lang_version: | ||
description: Ballerina Lang Version (If given ballerina lang build will be skipped) | ||
required: false | ||
default: '' | ||
native_image_options: | ||
description: Default native-image options | ||
required: false | ||
default: '' | ||
schedule: | ||
- cron: '30 18 * * *' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
pull_request: | ||
branches: | ||
- master | ||
types: [ opened, synchronize, reopened, labeled, unlabeled ] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }} | ||
cancel-in-progress: true | ||
|
||
- name: Set up GraalVM | ||
uses: graalvm/setup-graalvm@v1 | ||
with: | ||
version: 'latest' | ||
java-version: '11' | ||
components: 'native-image' | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
env: | ||
JAVA_OPTS: -DBALLERINA_DEV_COMPILE_BALLERINA_ORG=true | ||
CLIENT_ID: ${{ secrets.CLIENT_ID }} | ||
CLIENT_SECRET: ${{ secrets.CLIENT_SECRET }} | ||
REFRESH_TOKEN: ${{ secrets.REFRESH_TOKEN }} | ||
REFRESH_URL: ${{ secrets.REFRESH_URL }} | ||
RECIPIENT: ${{ secrets.RECIPIENT }} | ||
SENDER: ${{ secrets.SENDER }} | ||
CC: ${{ secrets.CC }} | ||
ATTACHMENT_PATH: ${{ secrets.ATTACHMENT_PATH }} | ||
ATTACHMENT_CONTENT_TYPE: ${{ secrets.ATTACHMENT_CONTENT_TYPE }} | ||
INLINE_IMAGE_PATH: ${{ secrets.INLINE_IMAGE_PATH }} | ||
INLINE_IMAGE_NAME: ${{ secrets.INLINE_IMAGE_NAME }} | ||
IMAGE_CONTENT_TYPE: ${{ secrets.IMAGE_CONTENT_TYPE }} | ||
|
||
- name: Check GraalVM installation | ||
run: | | ||
echo "GRAALVM_HOME: ${{ env.GRAALVM_HOME }}" | ||
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 | ||
env: | ||
JAVA_OPTS: -DBALLERINA_DEV_COMPILE_BALLERINA_ORG=true | ||
CLIENT_ID: ${{ secrets.CLIENT_ID }} | ||
CLIENT_SECRET: ${{ secrets.CLIENT_SECRET }} | ||
REFRESH_TOKEN: ${{ secrets.REFRESH_TOKEN }} | ||
REFRESH_URL: ${{ secrets.REFRESH_URL }} | ||
RECIPIENT: ${{ secrets.RECIPIENT }} | ||
SENDER: ${{ secrets.SENDER }} | ||
CC: ${{ secrets.CC }} | ||
ATTACHMENT_PATH: ${{ secrets.ATTACHMENT_PATH }} | ||
ATTACHMENT_CONTENT_TYPE: ${{ secrets.ATTACHMENT_CONTENT_TYPE }} | ||
INLINE_IMAGE_PATH: ${{ secrets.INLINE_IMAGE_PATH }} | ||
INLINE_IMAGE_NAME: ${{ secrets.INLINE_IMAGE_NAME }} | ||
IMAGE_CONTENT_TYPE: ${{ secrets.IMAGE_CONTENT_TYPE }} | ||
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-standard-library/.github/workflows/build-with-bal-test-graalvm-template.yml@main | ||
with: | ||
lang_tag: ${{ inputs.lang_tag }} | ||
lang_version: ${{ inputs.lang_version }} | ||
native_image_options: '-J-Xmx7G ${{ inputs.native_image_options }}' | ||
additional_ubuntu_build_flags: '-P buildUsingDocker=${{ lang_version }}' | ||
additional_windows_build_flags: '' |
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 |
---|---|---|
|
@@ -2,51 +2,24 @@ name: Pull Request | |
|
||
on: [ pull_request ] | ||
|
||
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: latest | ||
|
||
# Build Ballerina Project | ||
- name: Ballerina Build | ||
run: bal pack ./ballerina | ||
env: | ||
JAVA_HOME: /usr/lib/jvm/default-jvm | ||
env: | ||
JAVA_OPTS: -DBALLERINA_DEV_COMPILE_BALLERINA_ORG=true | ||
CLIENT_ID: ${{ secrets.CLIENT_ID }} | ||
CLIENT_SECRET: ${{ secrets.CLIENT_SECRET }} | ||
REFRESH_TOKEN: ${{ secrets.REFRESH_TOKEN }} | ||
REFRESH_URL: ${{ secrets.REFRESH_URL }} | ||
RECIPIENT: ${{ secrets.RECIPIENT }} | ||
SENDER: ${{ secrets.SENDER }} | ||
CC: ${{ secrets.CC }} | ||
ATTACHMENT_PATH: ${{ secrets.ATTACHMENT_PATH }} | ||
ATTACHMENT_CONTENT_TYPE: ${{ secrets.ATTACHMENT_CONTENT_TYPE }} | ||
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 | ||
|
||
# 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 | ||
|
||
# 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) | ||
if: ${{ github.event.pull_request.head.repo.full_name == github.repository }} | ||
run: bal test --test-report --code-coverage --coverage-format=xml | ||
env: | ||
JAVA_OPTS: -DBALLERINA_DEV_COMPILE_BALLERINA_ORG=true | ||
CLIENT_ID: ${{ secrets.CLIENT_ID }} | ||
CLIENT_SECRET: ${{ secrets.CLIENT_SECRET }} | ||
REFRESH_TOKEN: ${{ secrets.REFRESH_TOKEN }} | ||
REFRESH_URL: ${{ secrets.REFRESH_URL }} | ||
RECIPIENT: ${{ secrets.RECIPIENT }} | ||
SENDER: ${{ secrets.SENDER }} | ||
CC: ${{ secrets.CC }} | ||
ATTACHMENT_PATH: ${{ secrets.ATTACHMENT_PATH }} | ||
ATTACHMENT_CONTENT_TYPE: ${{ secrets.ATTACHMENT_CONTENT_TYPE }} | ||
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 | ||
|
||
- name: Upload coverage reports to Codecov | ||
uses: codecov/codecov-action@v3 | ||
jobs: | ||
call_workflow: | ||
name: Run PR Build Workflow | ||
if: ${{ github.repository_owner == 'ballerina-platform' }} | ||
uses: ballerina-platform/ballerina-standard-library/.github/workflows/pull-request-build-template.yml@main |
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 | ||
|
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
Oops, something went wrong.