Skip to content

Commit

Permalink
Merge pull request #21 from Depetrol/latest-rti-image
Browse files Browse the repository at this point in the history
Latest rti image
  • Loading branch information
Depetrol authored Aug 2, 2024
2 parents 3e2ea09 + 15063d8 commit 799a53b
Show file tree
Hide file tree
Showing 13 changed files with 62 additions and 39 deletions.
52 changes: 26 additions & 26 deletions .github/workflows/c-zephyr-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,27 +39,27 @@ jobs:
path: core/src/main/resources/lib/c/reactor-c
ref: ${{ inputs.runtime-ref }}
if: ${{ inputs.runtime-ref }}
- name: Run Zephyr smoke tests
run: |
./gradlew core:integrationTest \
--tests org.lflang.tests.runtime.CZephyrTest.buildZephyrUnthreaded* \
--tests org.lflang.tests.runtime.CZephyrTest.buildZephyrThreaded* core:integrationTestCodeCoverageReport
./.github/scripts/run-zephyr-tests.sh test/C/src-gen
rm -rf test/C/src-gen
- name: Run basic tests
run: |
./gradlew core:integrationTest --tests org.lflang.tests.runtime.CZephyrTest.buildBasic* core:integrationTestCodeCoverageReport
./.github/scripts/run-zephyr-tests.sh test/C/src-gen
rm -rf test/C/src-gen
- name: Run concurrent tests
run: |
./gradlew core:integrationTest --tests org.lflang.tests.runtime.CZephyrTest.buildConcurrent* core:integrationTestCodeCoverageReport
./.github/scripts/run-zephyr-tests.sh test/C/src-gen
rm -rf test/C/src-gen
- name: Run Zephyr board tests
run: |
./gradlew core:integrationTest --tests org.lflang.tests.runtime.CZephyrTest.buildZephyrBoards* core:integrationTestCodeCoverageReport
rm -rf test/C/src-gen
# - name: Run Zephyr smoke tests
# run: |
# ./gradlew core:integrationTest \
# --tests org.lflang.tests.runtime.CZephyrTest.buildZephyrUnthreaded* \
# --tests org.lflang.tests.runtime.CZephyrTest.buildZephyrThreaded* core:integrationTestCodeCoverageReport
# ./.github/scripts/run-zephyr-tests.sh test/C/src-gen
# rm -rf test/C/src-gen
# - name: Run basic tests
# run: |
# ./gradlew core:integrationTest --tests org.lflang.tests.runtime.CZephyrTest.buildBasic* core:integrationTestCodeCoverageReport
# ./.github/scripts/run-zephyr-tests.sh test/C/src-gen
# rm -rf test/C/src-gen
# - name: Run concurrent tests
# run: |
# ./gradlew core:integrationTest --tests org.lflang.tests.runtime.CZephyrTest.buildConcurrent* core:integrationTestCodeCoverageReport
# ./.github/scripts/run-zephyr-tests.sh test/C/src-gen
# rm -rf test/C/src-gen
# - name: Run Zephyr board tests
# run: |
# ./gradlew core:integrationTest --tests org.lflang.tests.runtime.CZephyrTest.buildZephyrBoards* core:integrationTestCodeCoverageReport
# rm -rf test/C/src-gen
- name: Smoke test of lf-west-template
run: |
export LFC=$(pwd)/bin/lfc-dev
Expand All @@ -68,8 +68,8 @@ jobs:
west lfc apps/NrfBlinky/src/NrfBlinky.lf --lfc $LFC --build "-p always"
west lfc apps/NrfBlinky/src/NrfToggleGPIO.lf --lfc $LFC --build "-p always"
west build -b qemu_cortex_m3 -p always apps/HelloZephyr
- name: Report to CodeCov
uses: ./.github/actions/report-code-coverage
with:
files: core/build/reports/jacoco/integrationTestCodeCoverageReport/integrationTestCodeCoverageReport.xml
if: ${{ github.repository == 'lf-lang/lingua-franca' }}
# - name: Report to CodeCov
# uses: ./.github/actions/report-code-coverage
# with:
# files: core/build/reports/jacoco/integrationTestCodeCoverageReport/integrationTestCodeCoverageReport.xml
# if: ${{ github.repository == 'lf-lang/lingua-franca' }}
11 changes: 9 additions & 2 deletions .github/workflows/rti-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ jobs:
with:
submodules: recursive
fetch-depth: 0
- name: Check Lingua Franca Version
id: check_version
- name: Look up the current version and export as environment variable
run: |
export LF_VERSION=$(cat core/src/main/resources/org/lflang/StringsBundle.properties | sed -n 's/.*VERSION = \(.*\)/\1/p' | tr '[:upper:]' '[:lower:]')
echo "lf_version=$LF_VERSION"
Expand All @@ -28,3 +27,11 @@ jobs:
tag: ${{ env.lf_version }}
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Update latest (released versions only)
uses: ./.github/actions/push-rti-docker
with:
tag: latest
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
if: ${{ !endsWith(env.lf_version, '-snapshot') }}

4 changes: 3 additions & 1 deletion core/src/main/java/org/lflang/LinguaFranca.xtext
Original file line number Diff line number Diff line change
Expand Up @@ -425,6 +425,8 @@ terminal ML_COMMENT: ('/*' -> '*/') | ("'''" -> "'''");

terminal LT_ANNOT: "'" ID?;

terminal CPP_RAW_STR: 'R"' -> '"';

terminal STRING: '"' ( '\\' . | !('\\' | '"' | '\t' | '\r' | '\n') )* '"'
| '"""' -> '"""'
;
Expand Down Expand Up @@ -512,7 +514,7 @@ Body:
// the end of a target-code segment.
Token:
// Non-constant terminals
ID | INT | FLOAT_EXP_SUFFIX | LT_ANNOT | STRING | CHAR_LIT | ML_COMMENT | SL_COMMENT | WS | ANY_OTHER |
ID | INT | FLOAT_EXP_SUFFIX | LT_ANNOT | CPP_RAW_STR | STRING | CHAR_LIT | ML_COMMENT | SL_COMMENT | WS | ANY_OTHER |
// Keywords
'target' | 'import' | 'main' | 'realtime' | 'reactor' | 'state' | 'time' |
'mutable' | 'input' | 'output' | 'timer' | 'action' | 'reaction' |
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/java/org/lflang/generator/c/CGenerator.java
Original file line number Diff line number Diff line change
Expand Up @@ -635,7 +635,7 @@ private void generateCodeFor(String lfModuleName) throws IOException {
"\n",
"void logical_tag_complete(tag_t tag_to_send) {",
CExtensionUtils.surroundWithIfElseFederatedCentralized(
" lf_latest_tag_complete(tag_to_send);", " (void) tag_to_send;"),
" lf_latest_tag_confirmed(tag_to_send);", " (void) tag_to_send;"),
"}"));

// Generate an empty termination function for non-federated
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package org.lflang.target.property;

import org.lflang.LocalStrings;
import org.lflang.MessageReporter;
import org.lflang.ast.ASTUtils;
import org.lflang.lf.Element;
Expand Down Expand Up @@ -149,7 +150,8 @@ public record DockerOptions(
String dockerConfigFile) {

/** Default location to pull the rti from. */
public static final String DOCKERHUB_RTI_IMAGE = "lflang/rti:rti";
public static final String DOCKERHUB_RTI_IMAGE =
"lflang/rti:" + LocalStrings.VERSION.toLowerCase();

public static final String DEFAULT_SHELL = "/bin/sh";

Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[header]
group=org.lflang
version=0.8.2-SNAPSHOT
version=0.8.2

[versions]
antlrVersion=4.7.2
Expand Down
4 changes: 3 additions & 1 deletion test/Python/src/docker/FilesPropertyContainerized.lf
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
target Python {
files: "../include/hello.py",
docker: true
docker: {
rti-image: "rti:local"
}
}

preamble {=
Expand Down
4 changes: 3 additions & 1 deletion test/Python/src/docker/HelloWorldContainerized.lf
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
target Python {
docker: true
docker: {
rti-image: "rti:local"
}
}

import HelloWorld2 from "../HelloWorld.lf"
Expand Down
4 changes: 3 additions & 1 deletion test/Python/src/docker/PingPongContainerized.lf
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@
*/
target Python {
fast: true,
docker: true
docker: {
rti-image: "rti:local"
}
}

import Ping from "../PingPong.lf"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ target Python {
timeout: 5 sec,
logging: DEBUG,
coordination: centralized,
docker: true
docker: {
rti-image: "rti:local"
}
}

import Count from "../../lib/Count.lf"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
target Python {
timeout: 1 sec,
coordination: centralized,
docker: true
docker: {
rti-image: "rti:local"
}
}

import Source, Destination from "../../federated/DistributedMultiport.lf"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
target Python {
coordination: centralized,
docker: true
docker: {
rti-image: "rti:local"
}
}

import A, B from "../../federated/DistributedSendClass.lf"
Expand Down

0 comments on commit 799a53b

Please sign in to comment.