Skip to content

Fix rust / generate artifacts / python workflows [OI-3062] #1485

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

Merged
merged 14 commits into from
Jul 17, 2025
Merged
Show file tree
Hide file tree
Changes from all 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
2 changes: 1 addition & 1 deletion .github/workflows/benchmark.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ on:
jobs:
benchmark:
name: Benchmark
runs-on: [xlarge]
runs-on: [ubuntu-22.04]
steps:
- uses: actions/checkout@v4
- name: Setup
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/generator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ on:
jobs:
generation:
name: Generated artifacts
runs-on: ubuntu-20.04
container:
runs-on: ubuntu-24.04
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe this workflow can run on anything since it's using a container below

container:
image: swiftnav/libsbp-build:2025-02-10
options: --user root
volumes:
Expand Down Expand Up @@ -60,7 +60,6 @@ jobs:
with:
name: ${{ steps.pdf.outputs.artifact_name }}
path: ${{ steps.pdf.outputs.artifact_name }}

# - name: Check generated pdf
# run: |
# git diff --name-only --exit-code
2 changes: 1 addition & 1 deletion .github/workflows/python.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ on:
jobs:
coverage:
name: Test
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated to ubuntu-22.04 because the python dependencies build procedures are not portable and no wheels are available for newer OS versions (pip install fails on ubuntu-24.04 with default python version).

Wheels are available for ubuntu-22.04.

steps:
- uses: actions/checkout@v4

Expand Down
13 changes: 8 additions & 5 deletions .github/workflows/rust.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,17 +64,22 @@ jobs:

build:
name: Build binaries
needs: [ lint, test ]
needs: [lint, test]
strategy:
matrix:
os:
- ubuntu-20.04
- ubuntu-24.04
- macos-13
- windows-2022
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4

- name: Setup cmake
uses: jwlawson/actions-setup-cmake@v2
with:
cmake-version: "3.31.2"

Comment on lines +78 to +82
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pinned to this version because why not?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the minimum CMake version used anywhere right now should be 3.13. So maybe the solution is rather to update this repo's demands?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The issue occurs here
which is in the rust build of swiftnav-rs, which seems to be pulling/building libswiftnav using a generated cmake file

I don't have enough motivation to investigate/fix that today 😆

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Going to merge this PR as it is, I created this ticket to fix the public libswiftnav repo and swiftnav-rs separately https://swift-nav.atlassian.net/browse/OI-3100

- run: ./scripts/ci_prepare_rust.bash
shell: bash

Expand Down Expand Up @@ -104,7 +109,7 @@ jobs:

registry:
if: startsWith(github.ref, 'refs/tags/v')
needs: [ build ]
needs: [build]
name: Publish rust release to package-registry
runs-on: ubuntu-latest
steps:
Expand All @@ -123,5 +128,3 @@ jobs:
token: ${{ secrets.GH_TOKEN }}
gh-name: ${{ secrets.GH_NAME }}
gh-email: ${{ secrets.GH_EMAIL }}


Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ fn test_(((s.suite_name|snake_case)))()
match &sbp_msg {
sbp::messages::Sbp::(((t.msg.name|lower_acronyms)))(msg) => {
let msg_type = msg.message_type().unwrap();
assert_eq!( msg_type, (((t.msg_type))), "Incorrect message type, expected (((t.msg_type))), is {}", msg_type);
assert_eq!( msg_type, (((t.msg_type))), "Incorrect message type, expected (((t.msg_type))), is {msg_type}");
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

msg_type moved in between the curly braces to fix all lints in automatically generated tests

let sender_id = msg.sender_id().unwrap();
assert_eq!(sender_id, (((t.sbp.sender))), "incorrect sender id, expected (((t.sbp.sender))), is {sender_id}");
((*- for f in t.fieldskeys *))(((compare_value( (((f))), (((t.fields[f]))) ))))((*- endfor *))
Expand Down Expand Up @@ -98,7 +98,7 @@ fn test_json2sbp_(((s.suite_name|snake_case)))()
match &sbp_msg {
sbp::messages::Sbp::(((t.msg.name|lower_acronyms)))(msg) => {
let msg_type = msg.message_type().unwrap();
assert_eq!( msg_type, (((t.msg_type))), "Incorrect message type, expected (((t.msg_type))), is {}", msg_type);
assert_eq!( msg_type, (((t.msg_type))), "Incorrect message type, expected (((t.msg_type))), is {msg_type}");
let sender_id = msg.sender_id().unwrap();
assert_eq!(sender_id, (((t.sbp.sender))), "incorrect sender id, expected (((t.sbp.sender))), is {sender_id}");
((*- for f in t.fieldskeys *))(((compare_value( (((f))), (((t.fields[f]))) ))))((*- endfor *))
Expand Down Expand Up @@ -142,7 +142,7 @@ fn test_sbp2json_(((s.suite_name|snake_case)))()
match &sbp_msg {
sbp::messages::Sbp::(((t.msg.name|lower_acronyms)))(msg) => {
let msg_type = msg.message_type().unwrap();
assert_eq!( msg_type, (((t.msg_type))), "Incorrect message type, expected (((t.msg_type))), is {}", msg_type);
assert_eq!( msg_type, (((t.msg_type))), "Incorrect message type, expected (((t.msg_type))), is {msg_type}");
let sender_id = msg.sender_id().unwrap();
assert_eq!(sender_id, (((t.sbp.sender))), "incorrect sender id, expected (((t.sbp.sender))), is {sender_id}");
((*- for f in t.fieldskeys *))(((compare_value( (((f))), (((t.fields[f]))) ))))((*- endfor *))
Expand Down
2 changes: 1 addition & 1 deletion rust/sbp/src/sbp_iter_ext.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ pub trait SbpIterExt: Iterator {
Self: Iterator<Item = Result<Sbp, DeserializeError>> + Sized,
{
HandleErrorsIter::new(self, move |e| {
log::log!(level, "{}", e);
log::log!(level, "{e}");
match e {
DeserializeError::IoError(_) => ControlFlow::Break,
_ => ControlFlow::Continue,
Expand Down
2 changes: 1 addition & 1 deletion rust/sbp/src/ser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ where

fn encode(&mut self, msg: T, dst: &mut BytesMut) -> Result<(), Self::Error> {
if let Err(err) = to_buffer(dst, msg.borrow()) {
log::error!("error serializing message: {}", err);
log::error!("error serializing message: {err}");
}
Ok(())
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@ fn test_auto_check_sbp_acquisition_msg_acq_result() {
let msg_type = msg.message_type().unwrap();
assert_eq!(
msg_type, 0x2f,
"Incorrect message type, expected 0x2f, is {}",
msg_type
"Incorrect message type, expected 0x2f, is {msg_type}"
);
let sender_id = msg.sender_id().unwrap();
assert_eq!(
Expand Down Expand Up @@ -115,8 +114,7 @@ fn test_json2sbp_auto_check_sbp_acquisition_msg_acq_result() {
let msg_type = msg.message_type().unwrap();
assert_eq!(
msg_type, 0x2f,
"Incorrect message type, expected 0x2f, is {}",
msg_type
"Incorrect message type, expected 0x2f, is {msg_type}"
);
let sender_id = msg.sender_id().unwrap();
assert_eq!(
Expand Down Expand Up @@ -200,8 +198,7 @@ fn test_sbp2json_auto_check_sbp_acquisition_msg_acq_result() {
let msg_type = msg.message_type().unwrap();
assert_eq!(
msg_type, 0x2f,
"Incorrect message type, expected 0x2f, is {}",
msg_type
"Incorrect message type, expected 0x2f, is {msg_type}"
);
let sender_id = msg.sender_id().unwrap();
assert_eq!(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,7 @@ fn test_auto_check_sbp_acquisition_msg_acq_result_dep_a() {
let msg_type = msg.message_type().unwrap();
assert_eq!(
msg_type, 0x15,
"Incorrect message type, expected 0x15, is {}",
msg_type
"Incorrect message type, expected 0x15, is {msg_type}"
);
let sender_id = msg.sender_id().unwrap();
assert_eq!(
Expand Down Expand Up @@ -88,8 +87,7 @@ fn test_auto_check_sbp_acquisition_msg_acq_result_dep_a() {
let msg_type = msg.message_type().unwrap();
assert_eq!(
msg_type, 0x15,
"Incorrect message type, expected 0x15, is {}",
msg_type
"Incorrect message type, expected 0x15, is {msg_type}"
);
let sender_id = msg.sender_id().unwrap();
assert_eq!(
Expand Down Expand Up @@ -139,8 +137,7 @@ fn test_auto_check_sbp_acquisition_msg_acq_result_dep_a() {
let msg_type = msg.message_type().unwrap();
assert_eq!(
msg_type, 0x15,
"Incorrect message type, expected 0x15, is {}",
msg_type
"Incorrect message type, expected 0x15, is {msg_type}"
);
let sender_id = msg.sender_id().unwrap();
assert_eq!(
Expand Down Expand Up @@ -191,8 +188,7 @@ fn test_auto_check_sbp_acquisition_msg_acq_result_dep_a() {
let msg_type = msg.message_type().unwrap();
assert_eq!(
msg_type, 0x15,
"Incorrect message type, expected 0x15, is {}",
msg_type
"Incorrect message type, expected 0x15, is {msg_type}"
);
let sender_id = msg.sender_id().unwrap();
assert_eq!(
Expand Down Expand Up @@ -242,8 +238,7 @@ fn test_auto_check_sbp_acquisition_msg_acq_result_dep_a() {
let msg_type = msg.message_type().unwrap();
assert_eq!(
msg_type, 0x15,
"Incorrect message type, expected 0x15, is {}",
msg_type
"Incorrect message type, expected 0x15, is {msg_type}"
);
let sender_id = msg.sender_id().unwrap();
assert_eq!(
Expand Down Expand Up @@ -293,8 +288,7 @@ fn test_auto_check_sbp_acquisition_msg_acq_result_dep_a() {
let msg_type = msg.message_type().unwrap();
assert_eq!(
msg_type, 0x15,
"Incorrect message type, expected 0x15, is {}",
msg_type
"Incorrect message type, expected 0x15, is {msg_type}"
);
let sender_id = msg.sender_id().unwrap();
assert_eq!(
Expand Down Expand Up @@ -365,8 +359,7 @@ fn test_json2sbp_auto_check_sbp_acquisition_msg_acq_result_dep_a() {
let msg_type = msg.message_type().unwrap();
assert_eq!(
msg_type, 0x15,
"Incorrect message type, expected 0x15, is {}",
msg_type
"Incorrect message type, expected 0x15, is {msg_type}"
);
let sender_id = msg.sender_id().unwrap();
assert_eq!(
Expand Down Expand Up @@ -423,8 +416,7 @@ fn test_json2sbp_auto_check_sbp_acquisition_msg_acq_result_dep_a() {
let msg_type = msg.message_type().unwrap();
assert_eq!(
msg_type, 0x15,
"Incorrect message type, expected 0x15, is {}",
msg_type
"Incorrect message type, expected 0x15, is {msg_type}"
);
let sender_id = msg.sender_id().unwrap();
assert_eq!(
Expand Down Expand Up @@ -481,8 +473,7 @@ fn test_json2sbp_auto_check_sbp_acquisition_msg_acq_result_dep_a() {
let msg_type = msg.message_type().unwrap();
assert_eq!(
msg_type, 0x15,
"Incorrect message type, expected 0x15, is {}",
msg_type
"Incorrect message type, expected 0x15, is {msg_type}"
);
let sender_id = msg.sender_id().unwrap();
assert_eq!(
Expand Down Expand Up @@ -539,8 +530,7 @@ fn test_json2sbp_auto_check_sbp_acquisition_msg_acq_result_dep_a() {
let msg_type = msg.message_type().unwrap();
assert_eq!(
msg_type, 0x15,
"Incorrect message type, expected 0x15, is {}",
msg_type
"Incorrect message type, expected 0x15, is {msg_type}"
);
let sender_id = msg.sender_id().unwrap();
assert_eq!(
Expand Down Expand Up @@ -597,8 +587,7 @@ fn test_json2sbp_auto_check_sbp_acquisition_msg_acq_result_dep_a() {
let msg_type = msg.message_type().unwrap();
assert_eq!(
msg_type, 0x15,
"Incorrect message type, expected 0x15, is {}",
msg_type
"Incorrect message type, expected 0x15, is {msg_type}"
);
let sender_id = msg.sender_id().unwrap();
assert_eq!(
Expand Down Expand Up @@ -655,8 +644,7 @@ fn test_json2sbp_auto_check_sbp_acquisition_msg_acq_result_dep_a() {
let msg_type = msg.message_type().unwrap();
assert_eq!(
msg_type, 0x15,
"Incorrect message type, expected 0x15, is {}",
msg_type
"Incorrect message type, expected 0x15, is {msg_type}"
);
let sender_id = msg.sender_id().unwrap();
assert_eq!(
Expand Down Expand Up @@ -734,8 +722,7 @@ fn test_sbp2json_auto_check_sbp_acquisition_msg_acq_result_dep_a() {
let msg_type = msg.message_type().unwrap();
assert_eq!(
msg_type, 0x15,
"Incorrect message type, expected 0x15, is {}",
msg_type
"Incorrect message type, expected 0x15, is {msg_type}"
);
let sender_id = msg.sender_id().unwrap();
assert_eq!(
Expand Down Expand Up @@ -804,8 +791,7 @@ fn test_sbp2json_auto_check_sbp_acquisition_msg_acq_result_dep_a() {
let msg_type = msg.message_type().unwrap();
assert_eq!(
msg_type, 0x15,
"Incorrect message type, expected 0x15, is {}",
msg_type
"Incorrect message type, expected 0x15, is {msg_type}"
);
let sender_id = msg.sender_id().unwrap();
assert_eq!(
Expand Down Expand Up @@ -874,8 +860,7 @@ fn test_sbp2json_auto_check_sbp_acquisition_msg_acq_result_dep_a() {
let msg_type = msg.message_type().unwrap();
assert_eq!(
msg_type, 0x15,
"Incorrect message type, expected 0x15, is {}",
msg_type
"Incorrect message type, expected 0x15, is {msg_type}"
);
let sender_id = msg.sender_id().unwrap();
assert_eq!(
Expand Down Expand Up @@ -945,8 +930,7 @@ fn test_sbp2json_auto_check_sbp_acquisition_msg_acq_result_dep_a() {
let msg_type = msg.message_type().unwrap();
assert_eq!(
msg_type, 0x15,
"Incorrect message type, expected 0x15, is {}",
msg_type
"Incorrect message type, expected 0x15, is {msg_type}"
);
let sender_id = msg.sender_id().unwrap();
assert_eq!(
Expand Down Expand Up @@ -1015,8 +999,7 @@ fn test_sbp2json_auto_check_sbp_acquisition_msg_acq_result_dep_a() {
let msg_type = msg.message_type().unwrap();
assert_eq!(
msg_type, 0x15,
"Incorrect message type, expected 0x15, is {}",
msg_type
"Incorrect message type, expected 0x15, is {msg_type}"
);
let sender_id = msg.sender_id().unwrap();
assert_eq!(
Expand Down Expand Up @@ -1085,8 +1068,7 @@ fn test_sbp2json_auto_check_sbp_acquisition_msg_acq_result_dep_a() {
let msg_type = msg.message_type().unwrap();
assert_eq!(
msg_type, 0x15,
"Incorrect message type, expected 0x15, is {}",
msg_type
"Incorrect message type, expected 0x15, is {msg_type}"
);
let sender_id = msg.sender_id().unwrap();
assert_eq!(
Expand Down
Loading
Loading