Skip to content

Commit 635fc94

Browse files
authored
Fix rust / generate artifacts / python workflows [OI-3062] (#1485)
1 parent 7218b62 commit 635fc94

File tree

247 files changed

+1332
-2635
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

247 files changed

+1332
-2635
lines changed

.github/workflows/benchmark.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ on:
2121
jobs:
2222
benchmark:
2323
name: Benchmark
24-
runs-on: [xlarge]
24+
runs-on: [ubuntu-22.04]
2525
steps:
2626
- uses: actions/checkout@v4
2727
- name: Setup

.github/workflows/generator.yaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ on:
1818
jobs:
1919
generation:
2020
name: Generated artifacts
21-
runs-on: ubuntu-20.04
22-
container:
21+
runs-on: ubuntu-24.04
22+
container:
2323
image: swiftnav/libsbp-build:2025-02-10
2424
options: --user root
2525
volumes:
@@ -60,7 +60,6 @@ jobs:
6060
with:
6161
name: ${{ steps.pdf.outputs.artifact_name }}
6262
path: ${{ steps.pdf.outputs.artifact_name }}
63-
6463
# - name: Check generated pdf
6564
# run: |
6665
# git diff --name-only --exit-code

.github/workflows/python.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ on:
1818
jobs:
1919
coverage:
2020
name: Test
21-
runs-on: ubuntu-20.04
21+
runs-on: ubuntu-22.04
2222
steps:
2323
- uses: actions/checkout@v4
2424

.github/workflows/rust.yaml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,17 +64,22 @@ jobs:
6464

6565
build:
6666
name: Build binaries
67-
needs: [ lint, test ]
67+
needs: [lint, test]
6868
strategy:
6969
matrix:
7070
os:
71-
- ubuntu-20.04
71+
- ubuntu-24.04
7272
- macos-13
7373
- windows-2022
7474
runs-on: ${{ matrix.os }}
7575
steps:
7676
- uses: actions/checkout@v4
7777

78+
- name: Setup cmake
79+
uses: jwlawson/actions-setup-cmake@v2
80+
with:
81+
cmake-version: "3.31.2"
82+
7883
- run: ./scripts/ci_prepare_rust.bash
7984
shell: bash
8085

@@ -104,7 +109,7 @@ jobs:
104109

105110
registry:
106111
if: startsWith(github.ref, 'refs/tags/v')
107-
needs: [ build ]
112+
needs: [build]
108113
name: Publish rust release to package-registry
109114
runs-on: ubuntu-latest
110115
steps:
@@ -123,5 +128,3 @@ jobs:
123128
token: ${{ secrets.GH_TOKEN }}
124129
gh-name: ${{ secrets.GH_NAME }}
125130
gh-email: ${{ secrets.GH_EMAIL }}
126-
127-

generator/sbpg/targets/resources/rust/test/sbp_tests_template.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ fn test_(((s.suite_name|snake_case)))()
5151
match &sbp_msg {
5252
sbp::messages::Sbp::(((t.msg.name|lower_acronyms)))(msg) => {
5353
let msg_type = msg.message_type().unwrap();
54-
assert_eq!( msg_type, (((t.msg_type))), "Incorrect message type, expected (((t.msg_type))), is {}", msg_type);
54+
assert_eq!( msg_type, (((t.msg_type))), "Incorrect message type, expected (((t.msg_type))), is {msg_type}");
5555
let sender_id = msg.sender_id().unwrap();
5656
assert_eq!(sender_id, (((t.sbp.sender))), "incorrect sender id, expected (((t.sbp.sender))), is {sender_id}");
5757
((*- for f in t.fieldskeys *))(((compare_value( (((f))), (((t.fields[f]))) ))))((*- endfor *))
@@ -98,7 +98,7 @@ fn test_json2sbp_(((s.suite_name|snake_case)))()
9898
match &sbp_msg {
9999
sbp::messages::Sbp::(((t.msg.name|lower_acronyms)))(msg) => {
100100
let msg_type = msg.message_type().unwrap();
101-
assert_eq!( msg_type, (((t.msg_type))), "Incorrect message type, expected (((t.msg_type))), is {}", msg_type);
101+
assert_eq!( msg_type, (((t.msg_type))), "Incorrect message type, expected (((t.msg_type))), is {msg_type}");
102102
let sender_id = msg.sender_id().unwrap();
103103
assert_eq!(sender_id, (((t.sbp.sender))), "incorrect sender id, expected (((t.sbp.sender))), is {sender_id}");
104104
((*- for f in t.fieldskeys *))(((compare_value( (((f))), (((t.fields[f]))) ))))((*- endfor *))
@@ -142,7 +142,7 @@ fn test_sbp2json_(((s.suite_name|snake_case)))()
142142
match &sbp_msg {
143143
sbp::messages::Sbp::(((t.msg.name|lower_acronyms)))(msg) => {
144144
let msg_type = msg.message_type().unwrap();
145-
assert_eq!( msg_type, (((t.msg_type))), "Incorrect message type, expected (((t.msg_type))), is {}", msg_type);
145+
assert_eq!( msg_type, (((t.msg_type))), "Incorrect message type, expected (((t.msg_type))), is {msg_type}");
146146
let sender_id = msg.sender_id().unwrap();
147147
assert_eq!(sender_id, (((t.sbp.sender))), "incorrect sender id, expected (((t.sbp.sender))), is {sender_id}");
148148
((*- for f in t.fieldskeys *))(((compare_value( (((f))), (((t.fields[f]))) ))))((*- endfor *))

rust/sbp/src/sbp_iter_ext.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ pub trait SbpIterExt: Iterator {
2323
Self: Iterator<Item = Result<Sbp, DeserializeError>> + Sized,
2424
{
2525
HandleErrorsIter::new(self, move |e| {
26-
log::log!(level, "{}", e);
26+
log::log!(level, "{e}");
2727
match e {
2828
DeserializeError::IoError(_) => ControlFlow::Break,
2929
_ => ControlFlow::Continue,

rust/sbp/src/ser.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ where
199199

200200
fn encode(&mut self, msg: T, dst: &mut BytesMut) -> Result<(), Self::Error> {
201201
if let Err(err) = to_buffer(dst, msg.borrow()) {
202-
log::error!("error serializing message: {}", err);
202+
log::error!("error serializing message: {err}");
203203
}
204204
Ok(())
205205
}

rust/sbp/tests/integration/auto_check_sbp_acquisition_msg_acq_result.rs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,7 @@ fn test_auto_check_sbp_acquisition_msg_acq_result() {
3838
let msg_type = msg.message_type().unwrap();
3939
assert_eq!(
4040
msg_type, 0x2f,
41-
"Incorrect message type, expected 0x2f, is {}",
42-
msg_type
41+
"Incorrect message type, expected 0x2f, is {msg_type}"
4342
);
4443
let sender_id = msg.sender_id().unwrap();
4544
assert_eq!(
@@ -115,8 +114,7 @@ fn test_json2sbp_auto_check_sbp_acquisition_msg_acq_result() {
115114
let msg_type = msg.message_type().unwrap();
116115
assert_eq!(
117116
msg_type, 0x2f,
118-
"Incorrect message type, expected 0x2f, is {}",
119-
msg_type
117+
"Incorrect message type, expected 0x2f, is {msg_type}"
120118
);
121119
let sender_id = msg.sender_id().unwrap();
122120
assert_eq!(
@@ -200,8 +198,7 @@ fn test_sbp2json_auto_check_sbp_acquisition_msg_acq_result() {
200198
let msg_type = msg.message_type().unwrap();
201199
assert_eq!(
202200
msg_type, 0x2f,
203-
"Incorrect message type, expected 0x2f, is {}",
204-
msg_type
201+
"Incorrect message type, expected 0x2f, is {msg_type}"
205202
);
206203
let sender_id = msg.sender_id().unwrap();
207204
assert_eq!(

rust/sbp/tests/integration/auto_check_sbp_acquisition_msg_acq_result_dep_a.rs

Lines changed: 18 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,7 @@ fn test_auto_check_sbp_acquisition_msg_acq_result_dep_a() {
3737
let msg_type = msg.message_type().unwrap();
3838
assert_eq!(
3939
msg_type, 0x15,
40-
"Incorrect message type, expected 0x15, is {}",
41-
msg_type
40+
"Incorrect message type, expected 0x15, is {msg_type}"
4241
);
4342
let sender_id = msg.sender_id().unwrap();
4443
assert_eq!(
@@ -88,8 +87,7 @@ fn test_auto_check_sbp_acquisition_msg_acq_result_dep_a() {
8887
let msg_type = msg.message_type().unwrap();
8988
assert_eq!(
9089
msg_type, 0x15,
91-
"Incorrect message type, expected 0x15, is {}",
92-
msg_type
90+
"Incorrect message type, expected 0x15, is {msg_type}"
9391
);
9492
let sender_id = msg.sender_id().unwrap();
9593
assert_eq!(
@@ -139,8 +137,7 @@ fn test_auto_check_sbp_acquisition_msg_acq_result_dep_a() {
139137
let msg_type = msg.message_type().unwrap();
140138
assert_eq!(
141139
msg_type, 0x15,
142-
"Incorrect message type, expected 0x15, is {}",
143-
msg_type
140+
"Incorrect message type, expected 0x15, is {msg_type}"
144141
);
145142
let sender_id = msg.sender_id().unwrap();
146143
assert_eq!(
@@ -191,8 +188,7 @@ fn test_auto_check_sbp_acquisition_msg_acq_result_dep_a() {
191188
let msg_type = msg.message_type().unwrap();
192189
assert_eq!(
193190
msg_type, 0x15,
194-
"Incorrect message type, expected 0x15, is {}",
195-
msg_type
191+
"Incorrect message type, expected 0x15, is {msg_type}"
196192
);
197193
let sender_id = msg.sender_id().unwrap();
198194
assert_eq!(
@@ -242,8 +238,7 @@ fn test_auto_check_sbp_acquisition_msg_acq_result_dep_a() {
242238
let msg_type = msg.message_type().unwrap();
243239
assert_eq!(
244240
msg_type, 0x15,
245-
"Incorrect message type, expected 0x15, is {}",
246-
msg_type
241+
"Incorrect message type, expected 0x15, is {msg_type}"
247242
);
248243
let sender_id = msg.sender_id().unwrap();
249244
assert_eq!(
@@ -293,8 +288,7 @@ fn test_auto_check_sbp_acquisition_msg_acq_result_dep_a() {
293288
let msg_type = msg.message_type().unwrap();
294289
assert_eq!(
295290
msg_type, 0x15,
296-
"Incorrect message type, expected 0x15, is {}",
297-
msg_type
291+
"Incorrect message type, expected 0x15, is {msg_type}"
298292
);
299293
let sender_id = msg.sender_id().unwrap();
300294
assert_eq!(
@@ -365,8 +359,7 @@ fn test_json2sbp_auto_check_sbp_acquisition_msg_acq_result_dep_a() {
365359
let msg_type = msg.message_type().unwrap();
366360
assert_eq!(
367361
msg_type, 0x15,
368-
"Incorrect message type, expected 0x15, is {}",
369-
msg_type
362+
"Incorrect message type, expected 0x15, is {msg_type}"
370363
);
371364
let sender_id = msg.sender_id().unwrap();
372365
assert_eq!(
@@ -423,8 +416,7 @@ fn test_json2sbp_auto_check_sbp_acquisition_msg_acq_result_dep_a() {
423416
let msg_type = msg.message_type().unwrap();
424417
assert_eq!(
425418
msg_type, 0x15,
426-
"Incorrect message type, expected 0x15, is {}",
427-
msg_type
419+
"Incorrect message type, expected 0x15, is {msg_type}"
428420
);
429421
let sender_id = msg.sender_id().unwrap();
430422
assert_eq!(
@@ -481,8 +473,7 @@ fn test_json2sbp_auto_check_sbp_acquisition_msg_acq_result_dep_a() {
481473
let msg_type = msg.message_type().unwrap();
482474
assert_eq!(
483475
msg_type, 0x15,
484-
"Incorrect message type, expected 0x15, is {}",
485-
msg_type
476+
"Incorrect message type, expected 0x15, is {msg_type}"
486477
);
487478
let sender_id = msg.sender_id().unwrap();
488479
assert_eq!(
@@ -539,8 +530,7 @@ fn test_json2sbp_auto_check_sbp_acquisition_msg_acq_result_dep_a() {
539530
let msg_type = msg.message_type().unwrap();
540531
assert_eq!(
541532
msg_type, 0x15,
542-
"Incorrect message type, expected 0x15, is {}",
543-
msg_type
533+
"Incorrect message type, expected 0x15, is {msg_type}"
544534
);
545535
let sender_id = msg.sender_id().unwrap();
546536
assert_eq!(
@@ -597,8 +587,7 @@ fn test_json2sbp_auto_check_sbp_acquisition_msg_acq_result_dep_a() {
597587
let msg_type = msg.message_type().unwrap();
598588
assert_eq!(
599589
msg_type, 0x15,
600-
"Incorrect message type, expected 0x15, is {}",
601-
msg_type
590+
"Incorrect message type, expected 0x15, is {msg_type}"
602591
);
603592
let sender_id = msg.sender_id().unwrap();
604593
assert_eq!(
@@ -655,8 +644,7 @@ fn test_json2sbp_auto_check_sbp_acquisition_msg_acq_result_dep_a() {
655644
let msg_type = msg.message_type().unwrap();
656645
assert_eq!(
657646
msg_type, 0x15,
658-
"Incorrect message type, expected 0x15, is {}",
659-
msg_type
647+
"Incorrect message type, expected 0x15, is {msg_type}"
660648
);
661649
let sender_id = msg.sender_id().unwrap();
662650
assert_eq!(
@@ -734,8 +722,7 @@ fn test_sbp2json_auto_check_sbp_acquisition_msg_acq_result_dep_a() {
734722
let msg_type = msg.message_type().unwrap();
735723
assert_eq!(
736724
msg_type, 0x15,
737-
"Incorrect message type, expected 0x15, is {}",
738-
msg_type
725+
"Incorrect message type, expected 0x15, is {msg_type}"
739726
);
740727
let sender_id = msg.sender_id().unwrap();
741728
assert_eq!(
@@ -804,8 +791,7 @@ fn test_sbp2json_auto_check_sbp_acquisition_msg_acq_result_dep_a() {
804791
let msg_type = msg.message_type().unwrap();
805792
assert_eq!(
806793
msg_type, 0x15,
807-
"Incorrect message type, expected 0x15, is {}",
808-
msg_type
794+
"Incorrect message type, expected 0x15, is {msg_type}"
809795
);
810796
let sender_id = msg.sender_id().unwrap();
811797
assert_eq!(
@@ -874,8 +860,7 @@ fn test_sbp2json_auto_check_sbp_acquisition_msg_acq_result_dep_a() {
874860
let msg_type = msg.message_type().unwrap();
875861
assert_eq!(
876862
msg_type, 0x15,
877-
"Incorrect message type, expected 0x15, is {}",
878-
msg_type
863+
"Incorrect message type, expected 0x15, is {msg_type}"
879864
);
880865
let sender_id = msg.sender_id().unwrap();
881866
assert_eq!(
@@ -945,8 +930,7 @@ fn test_sbp2json_auto_check_sbp_acquisition_msg_acq_result_dep_a() {
945930
let msg_type = msg.message_type().unwrap();
946931
assert_eq!(
947932
msg_type, 0x15,
948-
"Incorrect message type, expected 0x15, is {}",
949-
msg_type
933+
"Incorrect message type, expected 0x15, is {msg_type}"
950934
);
951935
let sender_id = msg.sender_id().unwrap();
952936
assert_eq!(
@@ -1015,8 +999,7 @@ fn test_sbp2json_auto_check_sbp_acquisition_msg_acq_result_dep_a() {
1015999
let msg_type = msg.message_type().unwrap();
10161000
assert_eq!(
10171001
msg_type, 0x15,
1018-
"Incorrect message type, expected 0x15, is {}",
1019-
msg_type
1002+
"Incorrect message type, expected 0x15, is {msg_type}"
10201003
);
10211004
let sender_id = msg.sender_id().unwrap();
10221005
assert_eq!(
@@ -1085,8 +1068,7 @@ fn test_sbp2json_auto_check_sbp_acquisition_msg_acq_result_dep_a() {
10851068
let msg_type = msg.message_type().unwrap();
10861069
assert_eq!(
10871070
msg_type, 0x15,
1088-
"Incorrect message type, expected 0x15, is {}",
1089-
msg_type
1071+
"Incorrect message type, expected 0x15, is {msg_type}"
10901072
);
10911073
let sender_id = msg.sender_id().unwrap();
10921074
assert_eq!(

0 commit comments

Comments
 (0)