Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move CI to ubuntu-24.04 #2458

Merged
merged 22 commits into from
Jan 23, 2025
Merged
Show file tree
Hide file tree
Changes from 20 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
2 changes: 1 addition & 1 deletion core/src/main/resources/lib/ts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down
3 changes: 1 addition & 2 deletions test/C/src/Hello.lf
Original file line number Diff line number Diff line change
Expand Up @@ -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 {=
Expand Down
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
Loading