diff --git a/.github/workflows/c-zephyr-tests.yml b/.github/workflows/c-zephyr-tests.yml index 2a69452506..53ce259cda 100644 --- a/.github/workflows/c-zephyr-tests.yml +++ b/.github/workflows/c-zephyr-tests.yml @@ -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 @@ -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' }} diff --git a/.github/workflows/rti-docker.yml b/.github/workflows/rti-docker.yml index fc28ad2d11..321d4a5aac 100644 --- a/.github/workflows/rti-docker.yml +++ b/.github/workflows/rti-docker.yml @@ -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" @@ -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') }} + diff --git a/core/src/main/java/org/lflang/LinguaFranca.xtext b/core/src/main/java/org/lflang/LinguaFranca.xtext index 6b3e6c8f7f..37c4495c8b 100644 --- a/core/src/main/java/org/lflang/LinguaFranca.xtext +++ b/core/src/main/java/org/lflang/LinguaFranca.xtext @@ -425,6 +425,8 @@ terminal ML_COMMENT: ('/*' -> '*/') | ("'''" -> "'''"); terminal LT_ANNOT: "'" ID?; +terminal CPP_RAW_STR: 'R"' -> '"'; + terminal STRING: '"' ( '\\' . | !('\\' | '"' | '\t' | '\r' | '\n') )* '"' | '"""' -> '"""' ; @@ -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' | diff --git a/core/src/main/java/org/lflang/generator/c/CGenerator.java b/core/src/main/java/org/lflang/generator/c/CGenerator.java index 9fcdf860f0..3e54b8d5ba 100644 --- a/core/src/main/java/org/lflang/generator/c/CGenerator.java +++ b/core/src/main/java/org/lflang/generator/c/CGenerator.java @@ -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 diff --git a/core/src/main/java/org/lflang/target/property/DockerProperty.java b/core/src/main/java/org/lflang/target/property/DockerProperty.java index c9e3a27de7..fd5383653a 100644 --- a/core/src/main/java/org/lflang/target/property/DockerProperty.java +++ b/core/src/main/java/org/lflang/target/property/DockerProperty.java @@ -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; @@ -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"; diff --git a/core/src/main/resources/lib/c/reactor-c b/core/src/main/resources/lib/c/reactor-c index 1fae32cdcf..4026514ff1 160000 --- a/core/src/main/resources/lib/c/reactor-c +++ b/core/src/main/resources/lib/c/reactor-c @@ -1 +1 @@ -Subproject commit 1fae32cdcf4277b94ae07e2aeea011179d7afc85 +Subproject commit 4026514ff116ca492fb47086cafd86118e4ce9ae diff --git a/gradle.properties b/gradle.properties index 5cc77fa46e..822b97e32c 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,6 +1,6 @@ [header] group=org.lflang -version=0.8.2-SNAPSHOT +version=0.8.2 [versions] antlrVersion=4.7.2 diff --git a/test/Python/src/docker/FilesPropertyContainerized.lf b/test/Python/src/docker/FilesPropertyContainerized.lf index 139f1b682a..800e020f04 100644 --- a/test/Python/src/docker/FilesPropertyContainerized.lf +++ b/test/Python/src/docker/FilesPropertyContainerized.lf @@ -1,6 +1,8 @@ target Python { files: "../include/hello.py", - docker: true + docker: { + rti-image: "rti:local" + } } preamble {= diff --git a/test/Python/src/docker/HelloWorldContainerized.lf b/test/Python/src/docker/HelloWorldContainerized.lf index 26e684c580..64df9fb222 100644 --- a/test/Python/src/docker/HelloWorldContainerized.lf +++ b/test/Python/src/docker/HelloWorldContainerized.lf @@ -1,5 +1,7 @@ target Python { - docker: true + docker: { + rti-image: "rti:local" + } } import HelloWorld2 from "../HelloWorld.lf" diff --git a/test/Python/src/docker/PingPongContainerized.lf b/test/Python/src/docker/PingPongContainerized.lf index 1539a12615..708d4213ff 100644 --- a/test/Python/src/docker/PingPongContainerized.lf +++ b/test/Python/src/docker/PingPongContainerized.lf @@ -19,7 +19,9 @@ */ target Python { fast: true, - docker: true + docker: { + rti-image: "rti:local" + } } import Ping from "../PingPong.lf" diff --git a/test/Python/src/docker/federated/DistributedCountContainerized.lf b/test/Python/src/docker/federated/DistributedCountContainerized.lf index 48b71bd046..785467d12f 100644 --- a/test/Python/src/docker/federated/DistributedCountContainerized.lf +++ b/test/Python/src/docker/federated/DistributedCountContainerized.lf @@ -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" diff --git a/test/Python/src/docker/federated/DistributedMultiportContainerized.lf b/test/Python/src/docker/federated/DistributedMultiportContainerized.lf index b4333d8c00..1c07a9c174 100644 --- a/test/Python/src/docker/federated/DistributedMultiportContainerized.lf +++ b/test/Python/src/docker/federated/DistributedMultiportContainerized.lf @@ -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" diff --git a/test/Python/src/docker/federated/DistributedSendClassContainerized.lf b/test/Python/src/docker/federated/DistributedSendClassContainerized.lf index 797a017146..c13fbea651 100644 --- a/test/Python/src/docker/federated/DistributedSendClassContainerized.lf +++ b/test/Python/src/docker/federated/DistributedSendClassContainerized.lf @@ -1,6 +1,8 @@ target Python { coordination: centralized, - docker: true + docker: { + rti-image: "rti:local" + } } import A, B from "../../federated/DistributedSendClass.lf"