Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test Maven build in CI #866

Merged
merged 7 commits into from
Jan 20, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 52 additions & 0 deletions .github/workflows/build.yml
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 }}
4 changes: 4 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ env:
vcpkgGitRef: 0bf3923f9fab4001c00f0f429682a0853b5749e0

jobs:
# Test the Maven build.
build:
uses: lf-lang/lingua-franca/.github/workflows/build.yml@ci

# Run the unit tests.
unit-tests:
uses: lf-lang/lingua-franca/.github/workflows/unit-tests.yml@master
Expand Down
57 changes: 5 additions & 52 deletions .github/workflows/nightly-build.yml
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
3 changes: 3 additions & 0 deletions RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@

## Libraries

## Dependencies
- Kotlin `1.4.10` -> `1.6.10` (#866)

# Version 0.1.0-alpha (06-04-2021)
This is a preliminary release of the Lingua Franca Compiler (`lfc`), a **command-line compiler** that translates Lingua Franca programs into target language programs, and an **Eclipse-based IDE** (integrated development environment) that provides a sophisticated editor as well as a code generator. This release supports four target languages: C, C++, Python, and Typescript. See [documentation](https://github.com/icyphy/lingua-franca/wiki). Of the four target languages, C is the most complete. It supports all documented language features including an experimental implementation of [federated execution](https://github.com/icyphy/lingua-franca/wiki/Distributed-Execution).

Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
buildscript {
ext.kotlinVersion = "1.4.10" // sync with pom.xml
ext.kotlinVersion = "1.6.10" // sync with pom.xml
repositories {
mavenCentral()
}
Expand Down
3 changes: 1 addition & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,7 @@

<properties>
<!-- Sync with build.gradle -->
<!-- Note that this version is forced upon us by https://github.com/JetBrains/kotlin-eclipse -->
<kotlin.version>1.4.10</kotlin.version>
<kotlin.version>1.6.10</kotlin.version>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<tycho-version>2.3.0</tycho-version>
Expand Down