Skip to content

Commit

Permalink
Merge branch 'master' into cmake-init-include
Browse files Browse the repository at this point in the history
  • Loading branch information
erlingrj committed Jan 22, 2025
2 parents 1062324 + 7b431ea commit f708f10
Show file tree
Hide file tree
Showing 51 changed files with 353 additions and 180 deletions.
1 change: 0 additions & 1 deletion .github/FUNDING.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/c-arduino-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/c-embedded.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@ jobs:
# uses: ./.github/workflows/c-flexpret-tests.yml

# Run the C Patmos integration tests.
patmos:
uses: ./.github/workflows/c-patmos-tests.yml
# patmos:
# uses: ./.github/workflows/c-patmos-tests.yml
4 changes: 2 additions & 2 deletions .github/workflows/c-flexpret-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -45,7 +45,7 @@ jobs:
if: ${{ inputs.runtime-ref }}
- name: Run FlexPRET smoke tests
run: |
cd "$FP_DIR" && source env.bash && cd -
source $FP_DIR/env.bash
./gradlew core:integrationTest \
--tests org.lflang.tests.runtime.CFlexPRETTest.* \
core:integrationTestCodeCoverageReport
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/c-patmos-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/c-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/c-verifier-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
22 changes: 11 additions & 11 deletions .github/workflows/c-zephyr-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -46,16 +46,16 @@ jobs:
--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 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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cancel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
jobs:
cancel:
name: run
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
timeout-minutes: 3
steps:
- uses: styfle/[email protected]
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check-diff.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check-labels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cli-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cpp-ros2-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/cpp-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
Expand All @@ -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' }}
2 changes: 1 addition & 1 deletion .github/workflows/custom-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/extract-ref.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ on:

jobs:
extract-ref:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
outputs:
ref: ${{ steps.read.outputs.ref }}
steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/latest-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/lsp-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -69,7 +69,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
python-version: "3.12"
- name: Run language server Python tests without PyLint
run: ./gradlew core:integrationTest --tests org.lflang.tests.lsp.LspTests.pythonValidationTestSyntaxOnly core:integrationTestCodeCoverageReport
- name: Install pylint
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/nightly-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/py-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -36,7 +36,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
python-version: '3.12'
- name: Install dependencies OS X
run: |
brew install coreutils
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/rs-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/rti-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/serialization-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ts-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -520,6 +520,7 @@ public String generatePreamble(
includes.pr("#include \"core/federated/federate.h\"");
includes.pr("#include \"core/federated/network/net_common.h\"");
includes.pr("#include \"core/federated/network/net_util.h\"");
includes.pr("#include \"core/federated/network/socket_common.h\"");
includes.pr("#include \"core/federated/clock-sync.h\"");
includes.pr("#include \"core/threaded/reactor_threaded.h\"");
includes.pr("#include \"core/utils/util.h\"");
Expand All @@ -542,6 +543,7 @@ protected String makePreamble(
code.pr("#include \"core/federated/federate.h\"");
code.pr("#include \"core/federated/network/net_common.h\"");
code.pr("#include \"core/federated/network/net_util.h\"");
code.pr("#include \"core/federated/network/socket_common.h\"");
code.pr("#include \"core/federated/clock-sync.h\"");
code.pr("#include \"core/threaded/reactor_threaded.h\"");
code.pr("#include \"core/utils/util.h\"");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,7 @@ public static void generateCMakeInclude(
"add_compile_definitions(LF_PACKAGE_DIRECTORY=\"" + fileConfig.srcPkgPath + "\")");
cmakeIncludeCode.pr(
"add_compile_definitions(LF_SOURCE_GEN_DIRECTORY=\"" + fileConfig.getSrcGenPath() + "\")");
cmakeIncludeCode.pr("add_compile_definitions(LF_FILE_SEPARATOR=\"" + File.separator + "\")");
try (var srcWriter = Files.newBufferedWriter(cmakeIncludePath)) {
srcWriter.write(cmakeIncludeCode.getCode());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,11 @@ protected String generateSerializationIncludes(
return code.getCode();
}

@Override
public String getNetworkBufferType() {
return "PyObject*";
}

@Override
public String generateNetworkSenderBody(
VarRef sendingPort,
Expand Down
Loading

0 comments on commit f708f10

Please sign in to comment.