Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into rust-more-benchmarks
- Loading branch information
Showing
210 changed files
with
11,119 additions
and
5,381 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,7 @@ | ||
name: Build RTI docker image | ||
description: Build and install | ||
runs: | ||
using: "composite" | ||
steps: | ||
- run: .github/actions/build-rti-docker/build-rti-image.sh | ||
shell: bash |
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,3 @@ | ||
#!/bin/bash | ||
cd org.lflang/src/lib/c/reactor-c/core/federated/RTI | ||
docker build -t rti:rti -f rti.Dockerfile ../../../core/ |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,8 @@ | ||
name: Install RTI | ||
description: Build and install | ||
runs: | ||
using: "composite" | ||
steps: | ||
- run: .github/actions/install-rti/install.sh | ||
shell: bash | ||
|
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,7 @@ | ||
#!/bin/bash | ||
cd org.lflang/src/lib/c/reactor-c/core/federated/RTI | ||
mkdir build | ||
cd build | ||
cmake ../ | ||
make | ||
sudo make install |
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 @@ | ||
#!/bin/bash | ||
latest="0.0.0" | ||
while IFS= read -r line; do | ||
if [[ $(semver compare ${line} ${latest} 2> /dev/null) = '1' ]]; then | ||
latest=${line} | ||
fi | ||
#echo "... $line ..." | ||
done <<< "$(git tag)" | ||
echo $latest |
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 |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# Lingua Franca workflows | ||
|
||
## Continuous Integration | ||
The main CI configuration can be found in [ci.yml](https://github.com/lf-lang/lingua-franca/blob/master/.github/workflows/ci.yml) and gets triggered by pushes to `master` and by pushes to branches involved in an open pull request. | ||
|
||
**NOTE: [ci.yml](https://github.com/lf-lang/lingua-franca/blob/master/.github/workflows/ci.yml) references these workflows with respect to master (signified by the "@master" suffix). If you edit a workflow and want your changes reflected in the CI run for your pull request, then make sure that the workflow of your feature branch gets invoked instead of the one on master (and change back to "@master" before merging so that the feature branch can be safely deleted).** | ||
|
||
### Benchmark tests | ||
The [benchmark-tests.yml](https://github.com/lf-lang/lingua-franca/blob/master/.github/workflows/lfc-tests.yml) workflow compiles and runs benchmarks for a given target. The purpose of this workflow is not to gather performance results but to ensure that the benchmark programs remain functional. This workflow has one (optional) argument: | ||
- `target` to specify the target to run benchmark test for (defaults to `Cpp`). | ||
|
||
### CLI tests | ||
The [lfc-tests.yml](https://github.com/lf-lang/lingua-franca/blob/master/.github/workflows/lfc-tests.yml) workflow tests command line access to the Lingua Franca compiler via `lfc`. | ||
### Target-specific tests | ||
Each target has its own [reusable workflow](https://docs.github.com/en/actions/learn-github-actions/reusing-workflows). | ||
#### C/CCpp ([c-tests.yml](https://github.com/lf-lang/lingua-franca/blob/master/.github/workflows/c-tests.yml)) | ||
This workflow has the following (optional) arguments: | ||
- `compiler-ref` to specify which ref of the `lingua-franca` repository to check out; and | ||
- `runtime-ref` to specify which ref of the `reactor-c` submodule to check out. | ||
|
||
#### C++ ([cpp-tests.yml](https://github.com/lf-lang/lingua-franca/blob/master/.github/workflows/cpp-tests.yml)) | ||
|
||
#### Python ([py-tests.yml](https://github.com/lf-lang/lingua-franca/blob/master/.github/workflows/py-tests.yml)) | ||
This workflow has the following (optional) arguments: | ||
- `compiler-ref` to specify which ref of the `lingua-franca` repository to check out; | ||
- `reactor-c-ref` to specify which ref of the `reactor-c` submodule to check out; and | ||
- `reactor-c-py-ref` to specify which ref of the `reactor-c-py` submodule to check out. | ||
|
||
#### Rust ([rs-tests.yml](https://github.com/lf-lang/lingua-franca/blob/master/.github/workflows/rs-tests.yml)) | ||
|
||
#### TypeScript ([ts-tests.yml](https://github.com/lf-lang/lingua-franca/blob/master/.github/workflows/ts-tests.yml)) | ||
This workflow has the following (optional) arguments: | ||
- `compiler-ref` to specify which ref of the `lingua-franca` repository to check out; and | ||
- `runtime-ref` to specify which ref of the `reactor-ts` submodule to check out. | ||
|
||
### Unit tests | ||
Several parts of the compiler are probed using unit tests. These tests are carried out using the [unit-tests.yml](https://github.com/lf-lang/lingua-franca/blob/master/.github/workflows/unit-tests.yml) workflow. This workflow also collects code coverage statistics based on these unit tests _as well as_ the joint coverage achieved by the target-specific integration tests. It does this using an [extra JUnit test](https://github.com/lf-lang/lingua-franca/blob/master/org.lflang.tests/src/org/lflang/tests/compiler/CodeGenCoverage.java) that carries out a lighter version of all the integration tests (skipping the target compilation and program execution parts, which do not involve much of our own compiler code). | ||
|
||
### Utilities | ||
Satellite repositories that make use of Lingua Franca may want to reuse workflows that are of general utility. | ||
#### Extract a ref from a file ([extract-ref.yml](https://github.com/lf-lang/lingua-franca/blob/master/.github/workflows/extract-ref.yml)) | ||
If a repository has a text file that stores a ref (e.g., a SHA1 hash of a commit) and its contents must be used as a variable in a workflow, then [extract-ref.yml](https://github.com/lf-lang/lingua-franca/blob/master/.github/workflows/extract-ref.yml) can be used to accomplish this. This workflow takes a single (required) parameter: | ||
- `file`: a string that specifies the path to the text file that has the ref. | ||
After workflow execution, the value of the output `ref` will be equal to the first line in the given `file`. | ||
## Nightly Build | ||
See [nightly-build.yml](https://github.com/lf-lang/lingua-franca/blob/master/.github/workflows/nightly-build.yml). |
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,44 @@ | ||
name: Benchmark tests | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
target: | ||
required: false | ||
type: string | ||
default: Cpp | ||
|
||
jobs: | ||
run: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Setup Java JDK | ||
uses: actions/setup-java@v1.4.3 | ||
with: | ||
java-version: 14 | ||
- name: Setup Python | ||
uses: actions/setup-python@v2 | ||
- uses: actions/checkout@v2 | ||
with: | ||
submodules: true | ||
- name: Install Python dependencies | ||
run: pip3 install -r benchmark/runner/requirements.txt | ||
- name: Build lfc | ||
run: | | ||
./gradlew buildLfc | ||
- name: Setup C++ build environment | ||
run: | | ||
./bin/lfc test/Cpp/src/Minimal.lf | ||
echo "LD_LIBRARY_PATH=$GITHUB_WORKSPACE/test/Cpp/lib" >> $GITHUB_ENV | ||
if: ${{ inputs.target == 'Cpp' }} | ||
- name: Set LF_PATH environmental variable | ||
run: | | ||
echo "LF_PATH=$GITHUB_WORKSPACE" >> $GITHUB_ENV | ||
- name: Test C benchmarks | ||
run: | | ||
python3 benchmark/runner/run_benchmark.py -m test_mode=True iterations=1 benchmark="glob(*)" target=lf-c,lf-c-unthreaded iterations=1 | ||
if: ${{ inputs.target == 'C' }} | ||
- name: Test C++ benchmarks | ||
run: | | ||
python3 benchmark/runner/run_benchmark.py -m test_mode=True iterations=1 benchmark="glob(*)" target=lf-cpp iterations=1 target.params.extra_args="[--external-runtime-path, ${GITHUB_WORKSPACE}/test/Cpp]" | ||
if: ${{ inputs.target == 'Cpp' }} |
Oops, something went wrong.