-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge master into tracing-refactoring2
- Loading branch information
Showing
15 changed files
with
127 additions
and
29 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 |
---|---|---|
@@ -1,11 +1,11 @@ | ||
#!/bin/bash | ||
|
||
changes() { | ||
git diff --name-only HEAD $(git merge-base HEAD origin/master) | ||
git diff --name-only HEAD $(git merge-base HEAD origin/$1) | ||
} | ||
|
||
if changes | grep "$1" | grep -q -v "^.*md\|txt$"; then | ||
echo "changed_$2=1" >> $GITHUB_OUTPUT | ||
if changes $1 | grep "$2" | grep -q -v "^.*md\|txt$"; then | ||
echo "changed_$3=1" >> $GITHUB_OUTPUT | ||
else | ||
echo "changed_$2=0" >> $GITHUB_OUTPUT | ||
echo "changed_$3=0" >> $GITHUB_OUTPUT | ||
fi |
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,43 @@ | ||
name: Custom build | ||
|
||
# Trigger the workflow every day at 5 AM (UTC). | ||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
custom-build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out lingua-franca repository | ||
uses: actions/checkout@v3 | ||
with: | ||
submodules: recursive | ||
fetch-depth: 0 | ||
- name: Prepare build environment | ||
uses: ./.github/actions/prepare-build-env | ||
- name: Modify property file to contain the commit SHA | ||
shell: bash | ||
run: | | ||
TIMESTAMP="$(date +'%Y-%m-%d')" | ||
SHA="$(git rev-parse --short HEAD)" | ||
sed --regexp-extended --in-place "s/^(VERSION = .*)$/\1 ${SHA} ${TIMESTAMP}/" core/src/main/resources/org/lflang/StringsBundle.properties | ||
- name: Build and package lf cli tools (nightly build) | ||
shell: bash | ||
run: | | ||
export TIMESTAMP="$(date +'%Y%m%d%H%M%S')" | ||
echo "timestamp=$TIMESTAMP" >> "$GITHUB_ENV" | ||
./gradlew build -Pnightly=$TIMESTAMP -PtargetOS=Linux -PtargetArch=x86_64 | ||
./gradlew assemble -Pnightly=$TIMESTAMP -PtargetOS=Linux -PtargetArch=aarch64 | ||
./gradlew assemble -Pnightly=$TIMESTAMP -PtargetOS=MacOS -PtargetArch=x86_64 | ||
./gradlew assemble -Pnightly=$TIMESTAMP -PtargetOS=MacOS -PtargetArch=aarch64 | ||
./gradlew assemble -Pnightly=$TIMESTAMP -PtargetOS=Windows -PtargetArch=x86_64 | ||
- name: Deploy nightly release | ||
uses: marvinpinto/action-automatic-releases@latest | ||
with: | ||
repo_token: "${{ secrets.NIGHTLY_BUILD }}" | ||
automatic_release_tag: '${{ github.ref_name }}-${{ github.env.timestamp }}' | ||
prerelease: true | ||
draft: true | ||
title: "Custom Lingua Franca build for ${{ github.ref_name }} branch" | ||
files: | | ||
build/distributions/* |
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
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
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
Submodule reactor-c
updated
7 files
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
42 changes: 42 additions & 0 deletions
42
test/Cpp/src/multiport/MultiportToMultiportAfterParameterized.lf
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,42 @@ | ||
// Test multiport to multiport connections. See also MultiportToMultiport. | ||
target Cpp | ||
|
||
reactor Source(width: size_t = 2) { | ||
output[width] out: size_t | ||
|
||
reaction(startup) -> out {= | ||
for (size_t i = 0; i < out.size(); i++) { | ||
out[i].set(i); | ||
} | ||
=} | ||
} | ||
|
||
reactor Destination(width: size_t = 2) { | ||
input[width] in: size_t | ||
|
||
reaction(in) {= | ||
for (size_t i = 0; i < in.size(); i++) { | ||
if (in[i].is_present()) { | ||
size_t value = *in[i].get(); | ||
std::cout << "Received on channel " << i << ": " << value << '\n'; | ||
// NOTE: For testing purposes, this assumes the specific | ||
// widths instantiated below. | ||
if (value != i % 3) { | ||
std::cerr << "ERROR: expected " << i % 3 << '\n'; | ||
exit(1); | ||
} | ||
} | ||
} | ||
if (get_elapsed_logical_time() != 1s) { | ||
std::cerr << "ERROR: Expected to receive input after one second.\n"; | ||
exit(2); | ||
} | ||
=} | ||
} | ||
|
||
main reactor(delay: time = 1 sec) { | ||
a1 = new Source(width=3) | ||
a2 = new Source(width=2) | ||
b = new Destination(width=5) | ||
a1.out, a2.out -> b.in after delay | ||
} |