-
Notifications
You must be signed in to change notification settings - Fork 63
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 #866 from lf-lang/ci
Test Maven build in CI
- Loading branch information
Showing
6 changed files
with
66 additions
and
55 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,52 @@ | ||
name: Build toolchain | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
nightly: | ||
required: false | ||
type: boolean | ||
default: false | ||
|
||
jobs: | ||
run: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Set up Java JDK | ||
uses: actions/setup-java@v2 | ||
with: | ||
java-version: 11 | ||
distribution: zulu | ||
- name: Set up Maven | ||
uses: stCarolas/setup-maven@v4 | ||
with: | ||
maven-version: 3.8.1 | ||
- name: Cache local Maven repository | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.m2/repository | ||
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | ||
restore-keys: | | ||
${{ runner.os }}-maven- | ||
- name: Check out lingua-franca repository | ||
uses: actions/checkout@v2 | ||
with: | ||
submodules: recursive | ||
- name: Validate Gradle wrapper | ||
uses: gradle/wrapper-validation-action@v1 | ||
- name: Build and package lfc | ||
run: .github/scripts/package_lfc.sh | ||
- name: Build and package epoch | ||
run: mvn package | ||
|
||
- name: Deploy nightly release | ||
uses: marvinpinto/action-automatic-releases@latest | ||
with: | ||
repo_token: "${{ secrets.NIGHTLY_BUILD }}" | ||
automatic_release_tag: 'nightly' | ||
prerelease: true | ||
files: | | ||
org.lflang.rca/target/products/*.tar.gz | ||
org.lflang.rca/target/products/*.zip | ||
build_upload/* | ||
if: ${{ inputs.nightly == true }} |
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
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,60 +1,13 @@ | ||
name: Nightly build | ||
|
||
# Trigger the workflow every day at 5 AM (UTC) i.e., 10 PM Pacific. | ||
# Trigger the workflow every day at 5 AM (UTC). | ||
on: | ||
schedule: | ||
- cron: '0 5 * * *' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
package: | ||
strategy: | ||
matrix: | ||
platform: [ubuntu-latest] | ||
runs-on: ${{ matrix.platform }} | ||
steps: | ||
# Setup Build dependencies | ||
- name: Set up Java JDK | ||
uses: actions/setup-java@v2 | ||
with: | ||
java-version: 11 | ||
distribution: zulu | ||
- name: Set up Maven | ||
uses: stCarolas/setup-maven@v4 | ||
with: | ||
maven-version: 3.8.1 | ||
|
||
- name: Cache local Maven repository | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.m2/repository | ||
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | ||
restore-keys: | | ||
${{ runner.os }}-maven- | ||
# Check out the repository under $GITHUB_WORKSPACE, so the job can access it | ||
- uses: actions/checkout@v2 | ||
with: | ||
submodules: recursive | ||
|
||
- name: Gradle Wrapper Validation | ||
uses: gradle/wrapper-validation-action@v1 | ||
|
||
# Build products | ||
- name: Build the lfc compiler | ||
run: .github/scripts/package_lfc.sh | ||
- name: Build Eclipse product | ||
run: mvn compile | ||
- name: Package IDE | ||
run: mvn package | ||
|
||
- name: Deploy release | ||
uses: marvinpinto/action-automatic-releases@latest | ||
with: | ||
repo_token: "${{ secrets.NIGHTLY_BUILD }}" | ||
automatic_release_tag: 'nightly' | ||
prerelease: true | ||
files: | | ||
org.lflang.rca/target/products/*.tar.gz | ||
org.lflang.rca/target/products/*.zip | ||
build_upload/* | ||
build: | ||
uses: lf-lang/lingua-franca/.github/workflows/build.yml@master | ||
with: | ||
nightly: true |
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
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
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