From d29122c11f833c458b3f4e31530ca08dd3d94112 Mon Sep 17 00:00:00 2001 From: erlingrj Date: Mon, 20 Jan 2025 10:28:20 +0100 Subject: [PATCH 01/22] Update to ubuntu-24.04 --- .github/workflows/build.yml | 2 +- .github/workflows/c-arduino-tests.yml | 2 +- .github/workflows/c-flexpret-tests.yml | 2 +- .github/workflows/c-patmos-tests.yml | 2 +- .github/workflows/c-tests.yml | 2 +- .github/workflows/c-verifier-tests.yml | 2 +- .github/workflows/c-zephyr-tests.yml | 2 +- .github/workflows/cancel.yml | 2 +- .github/workflows/check-diff.yml | 2 +- .github/workflows/check-labels.yml | 2 +- .github/workflows/cli-tests.yml | 2 +- .github/workflows/cpp-ros2-tests.yml | 2 +- .github/workflows/cpp-tests.yml | 10 +++++----- .github/workflows/custom-build.yml | 2 +- .github/workflows/extract-ref.yml | 2 +- .github/workflows/latest-release.yml | 2 +- .github/workflows/lsp-tests.yml | 2 +- .github/workflows/nightly-build.yml | 2 +- .github/workflows/py-tests.yml | 2 +- .github/workflows/rs-tests.yml | 2 +- .github/workflows/rti-docker.yml | 2 +- .github/workflows/serialization-tests.yml | 2 +- .github/workflows/ts-tests.yml | 2 +- 23 files changed, 27 insertions(+), 27 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e84f9fce42..987432e02f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -13,7 +13,7 @@ jobs: build-toolchain: strategy: matrix: - platform: ${{ (inputs.all-platforms && fromJSON('["ubuntu-latest", "macos-latest", "windows-latest"]')) || fromJSON('["ubuntu-latest"]') }} + platform: ${{ (inputs.all-platforms && fromJSON('["ubuntu-24.04", "macos-latest", "windows-latest"]')) || fromJSON('["ubuntu-24.04"]') }} runs-on: ${{ matrix.platform }} steps: - name: Check out lingua-franca repository diff --git a/.github/workflows/c-arduino-tests.yml b/.github/workflows/c-arduino-tests.yml index a9d75f1e56..9e4a91cbe7 100644 --- a/.github/workflows/c-arduino-tests.yml +++ b/.github/workflows/c-arduino-tests.yml @@ -25,7 +25,7 @@ jobs: arduino-tests: strategy: matrix: - platform: ${{ (inputs.all-platforms && fromJSON('["ubuntu-latest", "macos-latest"]')) || fromJSON('["ubuntu-latest"]') }} + platform: ${{ (inputs.all-platforms && fromJSON('["ubuntu-24.04", "macos-latest"]')) || fromJSON('["ubuntu-24.04"]') }} runs-on: ${{ matrix.platform }} steps: - name: Check out lingua-franca repository diff --git a/.github/workflows/c-flexpret-tests.yml b/.github/workflows/c-flexpret-tests.yml index fb045be8e1..b3ad2cd6fe 100644 --- a/.github/workflows/c-flexpret-tests.yml +++ b/.github/workflows/c-flexpret-tests.yml @@ -23,7 +23,7 @@ on: jobs: flexpret-tests: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: - name: Check out lingua-franca repository uses: actions/checkout@v3 diff --git a/.github/workflows/c-patmos-tests.yml b/.github/workflows/c-patmos-tests.yml index 5dedf58682..6d41fde310 100644 --- a/.github/workflows/c-patmos-tests.yml +++ b/.github/workflows/c-patmos-tests.yml @@ -23,7 +23,7 @@ on: jobs: Patmos-tests: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: - name: Check out lingua-franca repository uses: actions/checkout@v3 diff --git a/.github/workflows/c-tests.yml b/.github/workflows/c-tests.yml index 7625897923..b835f07426 100644 --- a/.github/workflows/c-tests.yml +++ b/.github/workflows/c-tests.yml @@ -25,7 +25,7 @@ jobs: regular-tests: strategy: matrix: - platform: ${{ (inputs.all-platforms && fromJSON('["ubuntu-latest", "macos-latest", "windows-latest"]')) || fromJSON('["ubuntu-latest"]') }} + platform: ${{ (inputs.all-platforms && fromJSON('["ubuntu-24.04", "macos-latest", "windows-latest"]')) || fromJSON('["ubuntu-24.04"]') }} runs-on: ${{ matrix.platform }} timeout-minutes: 120 steps: diff --git a/.github/workflows/c-verifier-tests.yml b/.github/workflows/c-verifier-tests.yml index 8e2ec09915..189ddd1a95 100644 --- a/.github/workflows/c-verifier-tests.yml +++ b/.github/workflows/c-verifier-tests.yml @@ -15,7 +15,7 @@ jobs: run: strategy: matrix: - platform: [ubuntu-latest] + platform: [ubuntu-24.04] runs-on: ${{ matrix.platform }} steps: - name: Check out lingua-franca repository diff --git a/.github/workflows/c-zephyr-tests.yml b/.github/workflows/c-zephyr-tests.yml index 85ad929d95..7ac3ba4b59 100644 --- a/.github/workflows/c-zephyr-tests.yml +++ b/.github/workflows/c-zephyr-tests.yml @@ -19,7 +19,7 @@ on: jobs: zephyr-tests: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: - name: Check out lingua-franca repository uses: actions/checkout@v3 diff --git a/.github/workflows/cancel.yml b/.github/workflows/cancel.yml index 49765257c9..3fdb1a8292 100644 --- a/.github/workflows/cancel.yml +++ b/.github/workflows/cancel.yml @@ -6,7 +6,7 @@ on: jobs: cancel: name: run - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 timeout-minutes: 3 steps: - uses: styfle/cancel-workflow-action@0.11.0 diff --git a/.github/workflows/check-diff.yml b/.github/workflows/check-diff.yml index 17e968b76b..b88e68bb4b 100644 --- a/.github/workflows/check-diff.yml +++ b/.github/workflows/check-diff.yml @@ -30,7 +30,7 @@ on: jobs: check: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 outputs: skip: ${{ steps.should-skip.outputs.skip == 'true' }} run_c: ${{ steps.do.outputs.changed_c == 1 || !github.event.pull_request.draft }} diff --git a/.github/workflows/check-labels.yml b/.github/workflows/check-labels.yml index cbe1ee5784..8d4a7050cd 100644 --- a/.github/workflows/check-labels.yml +++ b/.github/workflows/check-labels.yml @@ -5,7 +5,7 @@ on: jobs: check: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: - name: Check that a label has been assigned uses: mheap/github-action-required-labels@v5 diff --git a/.github/workflows/cli-tests.yml b/.github/workflows/cli-tests.yml index edcc31b6f8..5b55fd32e7 100644 --- a/.github/workflows/cli-tests.yml +++ b/.github/workflows/cli-tests.yml @@ -12,7 +12,7 @@ jobs: test-cli: strategy: matrix: - platform: ${{ (inputs.all-platforms && fromJSON('["ubuntu-latest", "macos-latest", "windows-latest"]')) || fromJSON('["ubuntu-latest"]') }} + platform: ${{ (inputs.all-platforms && fromJSON('["ubuntu-24.04", "macos-latest", "windows-latest"]')) || fromJSON('["ubuntu-24.04"]') }} runs-on: ${{ matrix.platform }} steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/cpp-ros2-tests.yml b/.github/workflows/cpp-ros2-tests.yml index a3a2e2c9aa..e405caf404 100644 --- a/.github/workflows/cpp-ros2-tests.yml +++ b/.github/workflows/cpp-ros2-tests.yml @@ -12,7 +12,7 @@ on: jobs: cpp-ros2-tests: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: - name: Check out lingua-franca repository uses: actions/checkout@v3 diff --git a/.github/workflows/cpp-tests.yml b/.github/workflows/cpp-tests.yml index e7e68ee048..2a4bd61cce 100644 --- a/.github/workflows/cpp-tests.yml +++ b/.github/workflows/cpp-tests.yml @@ -18,7 +18,7 @@ jobs: regular-tests: strategy: matrix: - platform: ${{ (inputs.all-platforms && fromJSON('["ubuntu-latest", "macos-latest", "windows-latest"]')) || fromJSON('["ubuntu-latest"]') }} + platform: ${{ (inputs.all-platforms && fromJSON('["ubuntu-24.04", "macos-latest", "windows-latest"]')) || fromJSON('["ubuntu-24.04"]') }} runs-on: ${{ matrix.platform }} timeout-minutes: 120 steps: @@ -39,7 +39,7 @@ jobs: sudo apt-get update sudo apt-get install -y clang-tidy sudo apt-get install -y lcov - if: matrix.platform == 'ubuntu-latest' + if: matrix.platform == 'ubuntu-24.04' - name: Check out specific ref of reactor-cpp uses: actions/checkout@v2 with: @@ -60,15 +60,15 @@ jobs: lcov --capture --directory test/Cpp --output-file coverage.info lcov --extract coverage.info ${GITHUB_WORKSPACE}/test/Cpp/src-gen/reactor-cpp-default/\* --output-file reactor-cpp.info genhtml reactor-cpp.info --output-directory reactor-cpp.coverage - if: matrix.platform == 'ubuntu-latest' + if: matrix.platform == 'ubuntu-24.04' - name: Upload coverage report uses: actions/upload-artifact@v3 with: name: reactor-cpp.coverage path: reactor-cpp.coverage - if: matrix.platform == 'ubuntu-latest' + if: matrix.platform == 'ubuntu-24.04' - name: Report to CodeCov uses: ./.github/actions/report-code-coverage with: files: reactor-cpp.info - if: ${{ github.repository == 'lf-lang/lingua-franca' && matrix.platform == 'ubuntu-latest' }} + if: ${{ github.repository == 'lf-lang/lingua-franca' && matrix.platform == 'ubuntu-24.04' }} diff --git a/.github/workflows/custom-build.yml b/.github/workflows/custom-build.yml index 9f63be882f..95ee5412fa 100644 --- a/.github/workflows/custom-build.yml +++ b/.github/workflows/custom-build.yml @@ -6,7 +6,7 @@ on: jobs: custom-build: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: - name: Check out lingua-franca repository uses: actions/checkout@v3 diff --git a/.github/workflows/extract-ref.yml b/.github/workflows/extract-ref.yml index cb10c29a8b..4ca2af17a1 100644 --- a/.github/workflows/extract-ref.yml +++ b/.github/workflows/extract-ref.yml @@ -14,7 +14,7 @@ on: jobs: extract-ref: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 outputs: ref: ${{ steps.read.outputs.ref }} steps: diff --git a/.github/workflows/latest-release.yml b/.github/workflows/latest-release.yml index 1169ff30ee..edcd874382 100644 --- a/.github/workflows/latest-release.yml +++ b/.github/workflows/latest-release.yml @@ -32,7 +32,7 @@ on: jobs: get-latest-release: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 outputs: ref: ${{ steps.semver.outputs.ref }} ver: ${{ steps.semver.outputs.ver }} diff --git a/.github/workflows/lsp-tests.yml b/.github/workflows/lsp-tests.yml index 115924d686..c73eb4469f 100644 --- a/.github/workflows/lsp-tests.yml +++ b/.github/workflows/lsp-tests.yml @@ -16,7 +16,7 @@ jobs: test-lsp: strategy: matrix: - platform: ${{ (inputs.all-platforms && fromJSON('["ubuntu-latest", "macos-latest", "windows-latest"]')) || fromJSON('["ubuntu-latest"]') }} + platform: ${{ (inputs.all-platforms && fromJSON('["ubuntu-24.04", "macos-latest", "windows-latest"]')) || fromJSON('["ubuntu-24.04"]') }} runs-on: ${{ matrix.platform }} steps: # Uninstall operations are needed because the language server is able to use multiple diff --git a/.github/workflows/nightly-build.yml b/.github/workflows/nightly-build.yml index 199f15ba23..75766e9224 100644 --- a/.github/workflows/nightly-build.yml +++ b/.github/workflows/nightly-build.yml @@ -8,7 +8,7 @@ on: jobs: nightly-build: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: - name: Check out lingua-franca repository uses: actions/checkout@v3 diff --git a/.github/workflows/py-tests.yml b/.github/workflows/py-tests.yml index 8a29a886bb..d18908c8f7 100644 --- a/.github/workflows/py-tests.yml +++ b/.github/workflows/py-tests.yml @@ -21,7 +21,7 @@ jobs: regular-tests: strategy: matrix: - platform: ${{ (inputs.all-platforms && fromJSON('["ubuntu-latest", "macos-latest", "windows-latest"]')) || fromJSON('["ubuntu-latest"]') }} + platform: ${{ (inputs.all-platforms && fromJSON('["ubuntu-24.04", "macos-latest", "windows-latest"]')) || fromJSON('["ubuntu-24.04"]') }} runs-on: ${{ matrix.platform }} steps: - name: Check out lingua-franca repository diff --git a/.github/workflows/rs-tests.yml b/.github/workflows/rs-tests.yml index e730f0f7df..bb4171f65d 100644 --- a/.github/workflows/rs-tests.yml +++ b/.github/workflows/rs-tests.yml @@ -24,7 +24,7 @@ jobs: regular-tests: strategy: matrix: - platform: ${{ (inputs.all-platforms && fromJSON('["ubuntu-latest", "macos-latest", "windows-latest"]')) || fromJSON('["ubuntu-latest"]') }} + platform: ${{ (inputs.all-platforms && fromJSON('["ubuntu-24.04", "macos-latest", "windows-latest"]')) || fromJSON('["ubuntu-24.04"]') }} rust: [stable] runs-on: ${{ matrix.platform }} timeout-minutes: 60 diff --git a/.github/workflows/rti-docker.yml b/.github/workflows/rti-docker.yml index c5ba1e0620..f27aed6b01 100644 --- a/.github/workflows/rti-docker.yml +++ b/.github/workflows/rti-docker.yml @@ -9,7 +9,7 @@ on: jobs: build-and-push: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 name: Build and push RTI to Docker Hub steps: - name: Check out lingua-franca repository diff --git a/.github/workflows/serialization-tests.yml b/.github/workflows/serialization-tests.yml index 1fad0490f3..ca5ea16aac 100644 --- a/.github/workflows/serialization-tests.yml +++ b/.github/workflows/serialization-tests.yml @@ -9,7 +9,7 @@ on: jobs: serialization-tests: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: - name: Check out lingua-franca repository uses: actions/checkout@v3 diff --git a/.github/workflows/ts-tests.yml b/.github/workflows/ts-tests.yml index 5e110e9253..f81db50c19 100644 --- a/.github/workflows/ts-tests.yml +++ b/.github/workflows/ts-tests.yml @@ -12,7 +12,7 @@ jobs: regular-tests: strategy: matrix: - platform: ${{ (inputs.all-platforms && fromJSON('["ubuntu-latest", "macos-latest", "windows-latest"]')) || fromJSON('["ubuntu-latest"]') }} + platform: ${{ (inputs.all-platforms && fromJSON('["ubuntu-24.04", "macos-latest", "windows-latest"]')) || fromJSON('["ubuntu-24.04"]') }} runs-on: ${{ matrix.platform }} timeout-minutes: 120 steps: From 7b431eac34577d27732b0d492f22570b33d33732 Mon Sep 17 00:00:00 2001 From: erlingrj Date: Mon, 20 Jan 2025 10:28:59 +0100 Subject: [PATCH 02/22] Bump submodules --- core/src/main/resources/lib/c/reactor-c | 2 +- core/src/main/resources/lib/cpp/reactor-cpp | 2 +- core/src/main/resources/lib/rs/reactor-rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/core/src/main/resources/lib/c/reactor-c b/core/src/main/resources/lib/c/reactor-c index c2437e1f94..1b2346d8f4 160000 --- a/core/src/main/resources/lib/c/reactor-c +++ b/core/src/main/resources/lib/c/reactor-c @@ -1 +1 @@ -Subproject commit c2437e1f948a5d4f2bc487137c3ccb02ca89f631 +Subproject commit 1b2346d8f43548d9be2c3707139b1326836973be diff --git a/core/src/main/resources/lib/cpp/reactor-cpp b/core/src/main/resources/lib/cpp/reactor-cpp index e0df4349bb..d009fdd85b 160000 --- a/core/src/main/resources/lib/cpp/reactor-cpp +++ b/core/src/main/resources/lib/cpp/reactor-cpp @@ -1 +1 @@ -Subproject commit e0df4349bb5726e659d5c6589fa948a18991e2b8 +Subproject commit d009fdd85bf15beb992a3102a99ed91497f8a6fd diff --git a/core/src/main/resources/lib/rs/reactor-rs b/core/src/main/resources/lib/rs/reactor-rs index 10fee74e32..bca71291d2 160000 --- a/core/src/main/resources/lib/rs/reactor-rs +++ b/core/src/main/resources/lib/rs/reactor-rs @@ -1 +1 @@ -Subproject commit 10fee74e32a72f15ec3bc5605d61c27f63c8e037 +Subproject commit bca71291d2b9547863bd42171872203336e9ec3f From fa5f32ef1592536f03e474c327a8fb2d5bd9ba09 Mon Sep 17 00:00:00 2001 From: erlingrj Date: Mon, 20 Jan 2025 10:42:28 +0100 Subject: [PATCH 03/22] c-verifier: Setup-scala --- .github/workflows/c-verifier-tests.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/c-verifier-tests.yml b/.github/workflows/c-verifier-tests.yml index 189ddd1a95..833dbfeafa 100644 --- a/.github/workflows/c-verifier-tests.yml +++ b/.github/workflows/c-verifier-tests.yml @@ -34,6 +34,10 @@ jobs: path: core/src/main/resources/lib/c/reactor-c ref: ${{ inputs.runtime-ref }} if: ${{ inputs.runtime-ref }} + - name: Setup Scala + uses: olafurpg/setup-scala@v11 + with: + java-version: adopt@1.7 - name: Check out Uclid5 repository uses: actions/checkout@v3 with: @@ -54,6 +58,7 @@ jobs: - name: Install Uclid5 working-directory: uclid/ run: | + sbt update clean compile sbt universal:packageBin cd target/universal/ From 887db6ee299787f1aa404b52cdcbf51f9c9ba932 Mon Sep 17 00:00:00 2001 From: erlingrj Date: Mon, 20 Jan 2025 10:43:53 +0100 Subject: [PATCH 04/22] UpdateRustRuntime --- core/src/main/resources/lib/rs/runtime-version.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/main/resources/lib/rs/runtime-version.properties b/core/src/main/resources/lib/rs/runtime-version.properties index 95b59bc67a..2e9a7684bd 100644 --- a/core/src/main/resources/lib/rs/runtime-version.properties +++ b/core/src/main/resources/lib/rs/runtime-version.properties @@ -1 +1 @@ -rs = 10fee74e32a72f15ec3bc5605d61c27f63c8e037 +rs = bca71291d2b9547863bd42171872203336e9ec3f From a65b57f0e9f1c94999de8d1da370a158352956c6 Mon Sep 17 00:00:00 2001 From: erlingrj Date: Mon, 20 Jan 2025 10:46:11 +0100 Subject: [PATCH 05/22] c-flexpret setup-cala --- .github/actions/setup-flexpret/action.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/actions/setup-flexpret/action.yml b/.github/actions/setup-flexpret/action.yml index e97521d66a..80c78d4267 100644 --- a/.github/actions/setup-flexpret/action.yml +++ b/.github/actions/setup-flexpret/action.yml @@ -3,6 +3,10 @@ description: Install FlexPRET and dependencies (Linux only) runs: using: "composite" steps: + - name: Setup Scala + uses: olafurpg/setup-scala@v11 + with: + java-version: adopt@1.7 - name: Setup run: | # Clone the FlexPRET repository From 167351c550603eabcd6beb2de8ccad60af3630e3 Mon Sep 17 00:00:00 2001 From: erlingrj Date: Mon, 20 Jan 2025 10:54:29 +0100 Subject: [PATCH 06/22] Update to ros2 humble and pray --- .github/actions/setup-ros2/action.yml | 6 +++--- .../kotlin/org/lflang/generator/cpp/CppRos2Generator.kt | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/actions/setup-ros2/action.yml b/.github/actions/setup-ros2/action.yml index 1e35624a7f..057441bac4 100644 --- a/.github/actions/setup-ros2/action.yml +++ b/.github/actions/setup-ros2/action.yml @@ -1,5 +1,5 @@ -name: Install ROS2 rolling (Linux only) -description: Install ROS2 rolling (Linux only) +name: Install ROS2 humble (Linux only) +description: Install ROS2 humble (Linux only) runs: using: "composite" steps: @@ -11,4 +11,4 @@ runs: - name: Setup ROS2 uses: ros-tooling/setup-ros@0.7.0 with: - required-ros-distributions: rolling + required-ros-distributions: humble diff --git a/core/src/main/kotlin/org/lflang/generator/cpp/CppRos2Generator.kt b/core/src/main/kotlin/org/lflang/generator/cpp/CppRos2Generator.kt index 58a7f005a0..bb381f782f 100644 --- a/core/src/main/kotlin/org/lflang/generator/cpp/CppRos2Generator.kt +++ b/core/src/main/kotlin/org/lflang/generator/cpp/CppRos2Generator.kt @@ -16,7 +16,7 @@ class CppRos2Generator(generator: CppGenerator) : CppPlatformGenerator(generator private val packageGenerator = CppRos2PackageGenerator(generator, nodeGenerator.nodeName) companion object { - const val DEFAULT_BASE_IMAGE: String = "ros:rolling-ros-base" + const val DEFAULT_BASE_IMAGE: String = "ros:humble-ros-base" } override fun generatePlatformFiles() { @@ -116,7 +116,7 @@ class CppRos2Generator(generator: CppGenerator) : CppPlatformGenerator(generator if (script.isNotEmpty()) { return mutableListOf(". src/" + StringEscapeUtils.escapeXSI(script)) } - return mutableListOf(". /opt/ros/rolling/setup.sh") + return mutableListOf(". /opt/ros/humble/setup.sh") } override fun getPostBuildCommand(): MutableList { From 0b0663ae5c51abf6c84bc3c5c162979bed09679b Mon Sep 17 00:00:00 2001 From: erlingrj Date: Mon, 20 Jan 2025 10:57:43 +0100 Subject: [PATCH 07/22] Fix setup-scala --- .github/actions/setup-flexpret/action.yml | 2 +- .github/workflows/c-verifier-tests.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/actions/setup-flexpret/action.yml b/.github/actions/setup-flexpret/action.yml index 80c78d4267..461d3986e0 100644 --- a/.github/actions/setup-flexpret/action.yml +++ b/.github/actions/setup-flexpret/action.yml @@ -6,7 +6,7 @@ runs: - name: Setup Scala uses: olafurpg/setup-scala@v11 with: - java-version: adopt@1.7 + java-version: openjdk@1.17.0 - name: Setup run: | # Clone the FlexPRET repository diff --git a/.github/workflows/c-verifier-tests.yml b/.github/workflows/c-verifier-tests.yml index 833dbfeafa..1248c40b71 100644 --- a/.github/workflows/c-verifier-tests.yml +++ b/.github/workflows/c-verifier-tests.yml @@ -37,7 +37,7 @@ jobs: - name: Setup Scala uses: olafurpg/setup-scala@v11 with: - java-version: adopt@1.7 + java-version: openjdk@1.17.0 - name: Check out Uclid5 repository uses: actions/checkout@v3 with: @@ -58,7 +58,7 @@ jobs: - name: Install Uclid5 working-directory: uclid/ run: | - + sbt update clean compile sbt universal:packageBin cd target/universal/ From 4910ca18a4de8e4bf918f4a8cbd52f4dcc53a488 Mon Sep 17 00:00:00 2001 From: erlingrj Date: Mon, 20 Jan 2025 11:09:37 +0100 Subject: [PATCH 08/22] Try removing ros2 setup code --- .github/actions/setup-ros2/action.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/actions/setup-ros2/action.yml b/.github/actions/setup-ros2/action.yml index 057441bac4..2ba8ccaa98 100644 --- a/.github/actions/setup-ros2/action.yml +++ b/.github/actions/setup-ros2/action.yml @@ -3,11 +3,6 @@ description: Install ROS2 humble (Linux only) runs: using: "composite" steps: - - if: runner.os == 'Linux' - shell: bash - # azure ubuntu repo can be flaky so add an alternate source - # see https://github.com/ros-tooling/setup-ros/issues/80 and https://github.com/ros2/rmw_cyclonedds/pull/134 - run: sed -e 's/azure.archive.ubuntu.com/us.archive.ubuntu.com/g' -e t -e d /etc/apt/sources.list | sudo tee /etc/apt/sources.list.d/nonazure.list - name: Setup ROS2 uses: ros-tooling/setup-ros@0.7.0 with: From e05d303f3b4d6ebcd01c87fca198d971c0f450d2 Mon Sep 17 00:00:00 2001 From: erlingrj Date: Mon, 20 Jan 2025 11:12:04 +0100 Subject: [PATCH 09/22] Bump setup-ros to 0.7.9 instead --- .github/actions/setup-ros2/action.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/actions/setup-ros2/action.yml b/.github/actions/setup-ros2/action.yml index 2ba8ccaa98..bb82ec2088 100644 --- a/.github/actions/setup-ros2/action.yml +++ b/.github/actions/setup-ros2/action.yml @@ -3,7 +3,12 @@ description: Install ROS2 humble (Linux only) runs: using: "composite" steps: + - if: runner.os == 'Linux' + shell: bash + # azure ubuntu repo can be flaky so add an alternate source + # see https://github.com/ros-tooling/setup-ros/issues/80 and https://github.com/ros2/rmw_cyclonedds/pull/134 + run: sed -e 's/azure.archive.ubuntu.com/us.archive.ubuntu.com/g' -e t -e d /etc/apt/sources.list | sudo tee /etc/apt/sources.list.d/nonazure.list - name: Setup ROS2 - uses: ros-tooling/setup-ros@0.7.0 + uses: ros-tooling/setup-ros@0.7.9 with: required-ros-distributions: humble From 8f9df420eb9208c32bb3e901e2cbc6b1d25bbe61 Mon Sep 17 00:00:00 2001 From: erlingrj Date: Mon, 20 Jan 2025 11:20:03 +0100 Subject: [PATCH 10/22] Try ROS2 Jazzy instead --- .github/actions/setup-ros2/action.yml | 6 +++--- .../kotlin/org/lflang/generator/cpp/CppRos2Generator.kt | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/actions/setup-ros2/action.yml b/.github/actions/setup-ros2/action.yml index bb82ec2088..45b596474e 100644 --- a/.github/actions/setup-ros2/action.yml +++ b/.github/actions/setup-ros2/action.yml @@ -1,5 +1,5 @@ -name: Install ROS2 humble (Linux only) -description: Install ROS2 humble (Linux only) +name: Install ROS2 jazzy (Linux only) +description: Install ROS2 jazzy (Linux only) runs: using: "composite" steps: @@ -11,4 +11,4 @@ runs: - name: Setup ROS2 uses: ros-tooling/setup-ros@0.7.9 with: - required-ros-distributions: humble + required-ros-distributions: jazzy diff --git a/core/src/main/kotlin/org/lflang/generator/cpp/CppRos2Generator.kt b/core/src/main/kotlin/org/lflang/generator/cpp/CppRos2Generator.kt index bb381f782f..bb48c1cc72 100644 --- a/core/src/main/kotlin/org/lflang/generator/cpp/CppRos2Generator.kt +++ b/core/src/main/kotlin/org/lflang/generator/cpp/CppRos2Generator.kt @@ -16,7 +16,7 @@ class CppRos2Generator(generator: CppGenerator) : CppPlatformGenerator(generator private val packageGenerator = CppRos2PackageGenerator(generator, nodeGenerator.nodeName) companion object { - const val DEFAULT_BASE_IMAGE: String = "ros:humble-ros-base" + const val DEFAULT_BASE_IMAGE: String = "ros:jazzy-ros-base" } override fun generatePlatformFiles() { @@ -116,7 +116,7 @@ class CppRos2Generator(generator: CppGenerator) : CppPlatformGenerator(generator if (script.isNotEmpty()) { return mutableListOf(". src/" + StringEscapeUtils.escapeXSI(script)) } - return mutableListOf(". /opt/ros/humble/setup.sh") + return mutableListOf(". /opt/ros/jazzy/setup.sh") } override fun getPostBuildCommand(): MutableList { From cb72a1ba385e47e6a9163f612482b9cfd6f43f17 Mon Sep 17 00:00:00 2001 From: erlingrj Date: Mon, 20 Jan 2025 11:24:02 +0100 Subject: [PATCH 11/22] ros-setup: Dont change apt repo --- .github/actions/setup-ros2/action.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/actions/setup-ros2/action.yml b/.github/actions/setup-ros2/action.yml index 45b596474e..3395cd7095 100644 --- a/.github/actions/setup-ros2/action.yml +++ b/.github/actions/setup-ros2/action.yml @@ -3,11 +3,6 @@ description: Install ROS2 jazzy (Linux only) runs: using: "composite" steps: - - if: runner.os == 'Linux' - shell: bash - # azure ubuntu repo can be flaky so add an alternate source - # see https://github.com/ros-tooling/setup-ros/issues/80 and https://github.com/ros2/rmw_cyclonedds/pull/134 - run: sed -e 's/azure.archive.ubuntu.com/us.archive.ubuntu.com/g' -e t -e d /etc/apt/sources.list | sudo tee /etc/apt/sources.list.d/nonazure.list - name: Setup ROS2 uses: ros-tooling/setup-ros@0.7.9 with: From b4bb65a84ef1fe770223bf51e27c5a1eabd8b10d Mon Sep 17 00:00:00 2001 From: erlingrj Date: Mon, 20 Jan 2025 12:07:58 +0100 Subject: [PATCH 12/22] Install protoc-gen-js --- .github/workflows/serialization-tests.yml | 1 + .../main/java/org/lflang/LinguaFranca.xtext | 1 + core/src/main/resources/lib/c/reactor-c | 2 +- test/C/src/Hello.lf | 3 +-- test/C/src/OverrideClock.cmake | 1 + test/C/src/OverrideClock.lf | 18 ++++++++++++++++++ test/C/src/override_clock.c | 6 ++++++ 7 files changed, 29 insertions(+), 3 deletions(-) create mode 100644 test/C/src/OverrideClock.cmake create mode 100644 test/C/src/OverrideClock.lf create mode 100644 test/C/src/override_clock.c diff --git a/.github/workflows/serialization-tests.yml b/.github/workflows/serialization-tests.yml index ca5ea16aac..ebbff52379 100644 --- a/.github/workflows/serialization-tests.yml +++ b/.github/workflows/serialization-tests.yml @@ -29,6 +29,7 @@ jobs: run: | sudo apt-get update sudo apt-get install -y libprotobuf-c-dev protobuf-c-compiler protobuf-compiler libprotobuf-dev python3-protobuf + npm install -g protoc-gen-js - name: Install LinguaFrancaBase run: pip3 install LinguaFrancaBase - name: Run serialization tests; diff --git a/core/src/main/java/org/lflang/LinguaFranca.xtext b/core/src/main/java/org/lflang/LinguaFranca.xtext index 5b1bda9028..380273a7db 100644 --- a/core/src/main/java/org/lflang/LinguaFranca.xtext +++ b/core/src/main/java/org/lflang/LinguaFranca.xtext @@ -237,6 +237,7 @@ Instantiation: ')' (('at' host=Host ';') | ';'?); Connection: + (attributes+=Attribute)* ((leftPorts += VarRef (',' leftPorts += VarRef)*) | ( '(' leftPorts += VarRef (',' leftPorts += VarRef)* ')' iterated ?= '+'?)) ('->' | physical?='~>') diff --git a/core/src/main/resources/lib/c/reactor-c b/core/src/main/resources/lib/c/reactor-c index 1b2346d8f4..a70c3d0f06 160000 --- a/core/src/main/resources/lib/c/reactor-c +++ b/core/src/main/resources/lib/c/reactor-c @@ -1 +1 @@ -Subproject commit 1b2346d8f43548d9be2c3707139b1326836973be +Subproject commit a70c3d0f06b4ba8a14272e92dbde0c7e224a74ba diff --git a/test/C/src/Hello.lf b/test/C/src/Hello.lf index 98f9b969ab..48c029d1ed 100644 --- a/test/C/src/Hello.lf +++ b/test/C/src/Hello.lf @@ -3,8 +3,7 @@ // timing aligned reactions. The first instance has a period of 4 seconds, the second of 2 seconds, // and the third (composite) or 1 second. target C { - timeout: 10 sec, - fast: true + timeout: 10 sec // fast: true } preamble {= diff --git a/test/C/src/OverrideClock.cmake b/test/C/src/OverrideClock.cmake new file mode 100644 index 0000000000..4f00e8a99f --- /dev/null +++ b/test/C/src/OverrideClock.cmake @@ -0,0 +1 @@ +target_sources(${LF_MAIN_TARGET} PRIVATE ${CMAKE_CURRENT_LIST_DIR}/override_clock.c) \ No newline at end of file diff --git a/test/C/src/OverrideClock.lf b/test/C/src/OverrideClock.lf new file mode 100644 index 0000000000..9e5a94ab24 --- /dev/null +++ b/test/C/src/OverrideClock.lf @@ -0,0 +1,18 @@ +target C { + cmake-include: "OverrideClock.cmake", + files: ["override_clock.c"] +} + +main reactor { + timer t(0, 1 s) + preamble {= + #ifndef TEST + #define TEST + + #endif + =} + + reaction(t) {= + printf("logical=%ld physical=%ld\n", lf_time_logical_elapsed(), lf_time_physical_elapsed()); + =} +} diff --git a/test/C/src/override_clock.c b/test/C/src/override_clock.c new file mode 100644 index 0000000000..e2c27930d5 --- /dev/null +++ b/test/C/src/override_clock.c @@ -0,0 +1,6 @@ +#include "tag.h" + +int lf_clock_gettime(instant_t* now) { + static instant_t clock = 0; + *now = clock++; +} \ No newline at end of file From 12ae009aa1c4f98e4ac21ec6e44d2d58f2efc3f3 Mon Sep 17 00:00:00 2001 From: erlingrj Date: Mon, 20 Jan 2025 13:05:14 +0100 Subject: [PATCH 13/22] Mak CustomSerializer.lf not depend on being launched from a particular place --- .github/workflows/serialization-tests.yml | 2 ++ test/Python/src/serialization/CustomSerializer.lf | 6 ++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/serialization-tests.yml b/.github/workflows/serialization-tests.yml index ebbff52379..65807d5425 100644 --- a/.github/workflows/serialization-tests.yml +++ b/.github/workflows/serialization-tests.yml @@ -34,6 +34,8 @@ jobs: run: pip3 install LinguaFrancaBase - name: Run serialization tests; run: | + python3 -m venv .venv + source .venv/bin/activate source /opt/ros/*/setup.bash ./gradlew core:integrationTest --tests org.lflang.tests.serialization.SerializationTest.* core:integrationTestCodeCoverageReport - name: Report to CodeCov diff --git a/test/Python/src/serialization/CustomSerializer.lf b/test/Python/src/serialization/CustomSerializer.lf index ee1f112ed1..ee479bb28c 100644 --- a/test/Python/src/serialization/CustomSerializer.lf +++ b/test/Python/src/serialization/CustomSerializer.lf @@ -1,13 +1,15 @@ # To run this test, the `pickle_serializer` package must be installed in the Python environment. # Run `pip3 install -e ./test/Python/src/serialization/pickle_serializer` in the project root directory to install the pickle_serializer. target Python { - coordination: decentralized + coordination: decentralized, + files: ["pickle_serializer"] } preamble {= # Note that both federates will try to install the pickle_serializer package. One will likely fail, # but the other will succeed. - os.system("pip install ./src/serialization/pickle_serializer/ --user") + cwd = os.path.abspath(__file__) + os.system(f"pip install {cwd}/../pickle_serializer/") import pickle_serializer =} From f0d8c26e45458d527932730d185b536ab82644dd Mon Sep 17 00:00:00 2001 From: erlingrj Date: Mon, 20 Jan 2025 13:13:39 +0100 Subject: [PATCH 14/22] Add -fprofile-update=atmoic to cpp to fix codecov issue --- .../org/lflang/generator/cpp/CppStandaloneCmakeGenerator.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/main/kotlin/org/lflang/generator/cpp/CppStandaloneCmakeGenerator.kt b/core/src/main/kotlin/org/lflang/generator/cpp/CppStandaloneCmakeGenerator.kt index 2c041fe6d2..c064e239a1 100644 --- a/core/src/main/kotlin/org/lflang/generator/cpp/CppStandaloneCmakeGenerator.kt +++ b/core/src/main/kotlin/org/lflang/generator/cpp/CppStandaloneCmakeGenerator.kt @@ -60,7 +60,7 @@ class CppStandaloneCmakeGenerator(private val targetConfig: TargetConfig, privat | if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU") | find_program(LCOV_BIN lcov) | if(LCOV_BIN MATCHES "lcov$S") - | set(CMAKE_CXX_FLAGS "$S{CMAKE_CXX_FLAGS} --coverage -fprofile-arcs -ftest-coverage") + | set(CMAKE_CXX_FLAGS "$S{CMAKE_CXX_FLAGS} --coverage -fprofile-arcs -ftest-coverage -fprofile-update=atomic") | else() | message("Not producing code coverage information since lcov was not found") | endif() From b35d6587ef764c1d62644d8726555aee0944cefe Mon Sep 17 00:00:00 2001 From: erlingrj Date: Mon, 20 Jan 2025 13:16:45 +0100 Subject: [PATCH 15/22] Spotless --- test/Python/src/serialization/CustomSerializer.lf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/Python/src/serialization/CustomSerializer.lf b/test/Python/src/serialization/CustomSerializer.lf index ee479bb28c..cdb03999c1 100644 --- a/test/Python/src/serialization/CustomSerializer.lf +++ b/test/Python/src/serialization/CustomSerializer.lf @@ -8,7 +8,7 @@ target Python { preamble {= # Note that both federates will try to install the pickle_serializer package. One will likely fail, # but the other will succeed. - cwd = os.path.abspath(__file__) + cwd = os.path.abspath(__file__) os.system(f"pip install {cwd}/../pickle_serializer/") import pickle_serializer =} From 4848bca6143394335d1ad8a1f3047784a16b856e Mon Sep 17 00:00:00 2001 From: erlingrj Date: Mon, 20 Jan 2025 13:30:57 +0100 Subject: [PATCH 16/22] Remove mistakenly commited files --- test/C/src/OverrideClock.cmake | 1 - test/C/src/OverrideClock.lf | 18 ------------------ test/C/src/override_clock.c | 6 ------ 3 files changed, 25 deletions(-) delete mode 100644 test/C/src/OverrideClock.cmake delete mode 100644 test/C/src/OverrideClock.lf delete mode 100644 test/C/src/override_clock.c diff --git a/test/C/src/OverrideClock.cmake b/test/C/src/OverrideClock.cmake deleted file mode 100644 index 4f00e8a99f..0000000000 --- a/test/C/src/OverrideClock.cmake +++ /dev/null @@ -1 +0,0 @@ -target_sources(${LF_MAIN_TARGET} PRIVATE ${CMAKE_CURRENT_LIST_DIR}/override_clock.c) \ No newline at end of file diff --git a/test/C/src/OverrideClock.lf b/test/C/src/OverrideClock.lf deleted file mode 100644 index 9e5a94ab24..0000000000 --- a/test/C/src/OverrideClock.lf +++ /dev/null @@ -1,18 +0,0 @@ -target C { - cmake-include: "OverrideClock.cmake", - files: ["override_clock.c"] -} - -main reactor { - timer t(0, 1 s) - preamble {= - #ifndef TEST - #define TEST - - #endif - =} - - reaction(t) {= - printf("logical=%ld physical=%ld\n", lf_time_logical_elapsed(), lf_time_physical_elapsed()); - =} -} diff --git a/test/C/src/override_clock.c b/test/C/src/override_clock.c deleted file mode 100644 index e2c27930d5..0000000000 --- a/test/C/src/override_clock.c +++ /dev/null @@ -1,6 +0,0 @@ -#include "tag.h" - -int lf_clock_gettime(instant_t* now) { - static instant_t clock = 0; - *now = clock++; -} \ No newline at end of file From 36af602fbf82da912ff145b5548f38f760362ec9 Mon Sep 17 00:00:00 2001 From: erlingrj Date: Mon, 20 Jan 2025 13:31:55 +0100 Subject: [PATCH 17/22] Serialization CI --- .github/workflows/serialization-tests.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/serialization-tests.yml b/.github/workflows/serialization-tests.yml index 65807d5425..d465dace50 100644 --- a/.github/workflows/serialization-tests.yml +++ b/.github/workflows/serialization-tests.yml @@ -31,10 +31,12 @@ jobs: sudo apt-get install -y libprotobuf-c-dev protobuf-c-compiler protobuf-compiler libprotobuf-dev python3-protobuf npm install -g protoc-gen-js - name: Install LinguaFrancaBase - run: pip3 install LinguaFrancaBase - - name: Run serialization tests; run: | python3 -m venv .venv + source .venv/bin/activate + pip install LinguaFrancaBase + - name: Run serialization tests; + run: | source .venv/bin/activate source /opt/ros/*/setup.bash ./gradlew core:integrationTest --tests org.lflang.tests.serialization.SerializationTest.* core:integrationTestCodeCoverageReport From c85c85f84cdb0ec41925ebf3f2bef08cadfe0108 Mon Sep 17 00:00:00 2001 From: erlingrj Date: Mon, 20 Jan 2025 15:06:01 +0100 Subject: [PATCH 18/22] serialization --- .github/workflows/serialization-tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/serialization-tests.yml b/.github/workflows/serialization-tests.yml index d465dace50..20cc4ffb67 100644 --- a/.github/workflows/serialization-tests.yml +++ b/.github/workflows/serialization-tests.yml @@ -28,13 +28,13 @@ jobs: - name: Install Protobuf Ubuntu run: | sudo apt-get update - sudo apt-get install -y libprotobuf-c-dev protobuf-c-compiler protobuf-compiler libprotobuf-dev python3-protobuf + sudo apt-get install -y libprotobuf-c-dev protobuf-c-compiler protobuf-compiler libprotobuf-dev npm install -g protoc-gen-js - name: Install LinguaFrancaBase run: | python3 -m venv .venv source .venv/bin/activate - pip install LinguaFrancaBase + pip install LinguaFrancaBase protobuf - name: Run serialization tests; run: | source .venv/bin/activate From aa0f12021e2b04b28421ac01c25647409a61c1b1 Mon Sep 17 00:00:00 2001 From: Byeonggil Jun Date: Mon, 20 Jan 2025 09:56:12 -0700 Subject: [PATCH 19/22] Update reactor-ts --- core/src/main/resources/lib/ts/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/main/resources/lib/ts/package.json b/core/src/main/resources/lib/ts/package.json index eec471ab6d..6b4e2ef85c 100644 --- a/core/src/main/resources/lib/ts/package.json +++ b/core/src/main/resources/lib/ts/package.json @@ -2,7 +2,7 @@ "name": "LinguaFrancaDefault", "type": "commonjs", "dependencies": { - "@lf-lang/reactor-ts": "^0.6.1", + "@lf-lang/reactor-ts": "git://github.com/lf-lang/reactor-ts.git#ubuntu-24.04", "command-line-args": "^5.1.1", "command-line-usage": "^6.1.3" }, From d8cf00079f67a7f4435a3f06430bb66ba0a7509f Mon Sep 17 00:00:00 2001 From: Byeonggil Jun <78055940+byeonggiljun@users.noreply.github.com> Date: Mon, 20 Jan 2025 15:36:43 -0700 Subject: [PATCH 20/22] Remove unnecessary line --- core/src/main/java/org/lflang/LinguaFranca.xtext | 1 - 1 file changed, 1 deletion(-) diff --git a/core/src/main/java/org/lflang/LinguaFranca.xtext b/core/src/main/java/org/lflang/LinguaFranca.xtext index 380273a7db..5b1bda9028 100644 --- a/core/src/main/java/org/lflang/LinguaFranca.xtext +++ b/core/src/main/java/org/lflang/LinguaFranca.xtext @@ -237,7 +237,6 @@ Instantiation: ')' (('at' host=Host ';') | ';'?); Connection: - (attributes+=Attribute)* ((leftPorts += VarRef (',' leftPorts += VarRef)*) | ( '(' leftPorts += VarRef (',' leftPorts += VarRef)* ')' iterated ?= '+'?)) ('->' | physical?='~>') From eb56bfda1542c3cb31c049b2437a331835e5638e Mon Sep 17 00:00:00 2001 From: erlingrj Date: Thu, 23 Jan 2025 09:15:57 +0100 Subject: [PATCH 21/22] Do we have to change reactor-ts package.json? --- core/src/main/resources/lib/ts/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/main/resources/lib/ts/package.json b/core/src/main/resources/lib/ts/package.json index 6b4e2ef85c..eec471ab6d 100644 --- a/core/src/main/resources/lib/ts/package.json +++ b/core/src/main/resources/lib/ts/package.json @@ -2,7 +2,7 @@ "name": "LinguaFrancaDefault", "type": "commonjs", "dependencies": { - "@lf-lang/reactor-ts": "git://github.com/lf-lang/reactor-ts.git#ubuntu-24.04", + "@lf-lang/reactor-ts": "^0.6.1", "command-line-args": "^5.1.1", "command-line-usage": "^6.1.3" }, From 68dfeb7780ca91ce9e4c8fac1591544a2517d633 Mon Sep 17 00:00:00 2001 From: erlingrj Date: Thu, 23 Jan 2025 09:16:33 +0100 Subject: [PATCH 22/22] Revert mistaken change --- test/C/src/Hello.lf | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/C/src/Hello.lf b/test/C/src/Hello.lf index 48c029d1ed..98f9b969ab 100644 --- a/test/C/src/Hello.lf +++ b/test/C/src/Hello.lf @@ -3,7 +3,8 @@ // timing aligned reactions. The first instance has a period of 4 seconds, the second of 2 seconds, // and the third (composite) or 1 second. target C { - timeout: 10 sec // fast: true + timeout: 10 sec, + fast: true } preamble {=