Skip to content

Commit

Permalink
Merge pull request #2458 from lf-lang/ubuntu-24.04
Browse files Browse the repository at this point in the history
Move CI to ubuntu-24.04
  • Loading branch information
erlingrj authored Jan 23, 2025
2 parents 35ebba7 + 68dfeb7 commit 50a1e82
Show file tree
Hide file tree
Showing 32 changed files with 58 additions and 47 deletions.
4 changes: 4 additions & 0 deletions .github/actions/setup-flexpret/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: [email protected]
- name: Setup
run: |
# Clone the FlexPRET repository
Expand Down
13 changes: 4 additions & 9 deletions .github/actions/setup-ros2/action.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@
name: Install ROS2 rolling (Linux only)
description: Install ROS2 rolling (Linux only)
name: Install ROS2 jazzy (Linux only)
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/[email protected].0
uses: ros-tooling/[email protected].9
with:
required-ros-distributions: rolling
required-ros-distributions: jazzy
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
2 changes: 1 addition & 1 deletion .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 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
7 changes: 6 additions & 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 All @@ -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: [email protected]
- name: Check out Uclid5 repository
uses: actions/checkout@v3
with:
Expand All @@ -54,6 +58,7 @@ jobs:
- name: Install Uclid5
working-directory: uclid/
run: |
sbt update clean compile
sbt universal:packageBin
cd target/universal/
Expand Down
2 changes: 1 addition & 1 deletion .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 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
2 changes: 1 addition & 1 deletion .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
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
2 changes: 1 addition & 1 deletion .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 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
11 changes: 8 additions & 3 deletions .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 All @@ -28,11 +28,16 @@ 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: pip3 install LinguaFrancaBase
run: |
python3 -m venv .venv
source .venv/bin/activate
pip install LinguaFrancaBase protobuf
- 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
- name: Report to CodeCov
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 @@ -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:jazzy-ros-base"
}

override fun generatePlatformFiles() {
Expand Down Expand Up @@ -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/jazzy/setup.sh")
}

override fun getPostBuildCommand(): MutableList<String> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/resources/lib/cpp/reactor-cpp
2 changes: 1 addition & 1 deletion core/src/main/resources/lib/rs/reactor-rs
2 changes: 1 addition & 1 deletion core/src/main/resources/lib/rs/runtime-version.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
rs = 10fee74e32a72f15ec3bc5605d61c27f63c8e037
rs = bca71291d2b9547863bd42171872203336e9ec3f
6 changes: 4 additions & 2 deletions test/Python/src/serialization/CustomSerializer.lf
Original file line number Diff line number Diff line change
@@ -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
=}

Expand Down

0 comments on commit 50a1e82

Please sign in to comment.