rust-embedded / svd2rust

Generate Rust register maps (`struct`s) from SVD files
Apache License 2.0
697 stars 150 forks source link

improve regress #728

Closed Emilgardis closed 10 months ago

Emilgardis commented 1 year ago

Beginning of revamp for our CI

This pr adds the following new features

resolves #355

burrbull commented 1 year ago

Nice!

burrbull commented 1 year ago

we need to add retry for curl https://stackoverflow.com/questions/42873285/curl-retry-mechanism

Emilgardis commented 1 year ago

added no changelog just to make ci happy for now

burrbull commented 1 year ago

What status of this?

Emilgardis commented 1 year ago

I still want to implement it, just don't have the time or motivation right now

Emilgardis commented 10 months ago

Header text

Diff result (click to expand) ```patch diff --git "a/.\\output\\head\\atmel_at91sam9cn11\\/src/lib.rs" "b/.\\output\\base\\atmel_at91sam9cn11\\/src/lib.rs" index 4fe602c..b31966b 100644 --- "a/.\\output\\head\\atmel_at91sam9cn11\\/src/lib.rs" +++ "b/.\\output\\base\\atmel_at91sam9cn11\\/src/lib.rs" @@ -1,4 +1,4 @@ -/*!Peripheral access API for AT91SAM9CN11 microcontrollers (generated using svd2rust v0.31.2 (99e68c7 2023-11-29)) +/*!Peripheral access API for AT91SAM9CN11 microcontrollers (generated using svd2rust v0.31.2 (ef9b813 2023-11-29)) You can find an overview of the generated API [here]. ```
Emilgardis commented 10 months ago

it's now possible to do

cargo regress diff --format --base "@v0.30.3" --head "@v0.31.2" cargo regress diff --format --head "@debug"

etc.

i have one problem with this though, the diff is way to large to be always useful. I think it would be helpful to have a very small default example case that is expected to only emit few changes. Maybe we could even make a query somehow to specify something like "I only want the diff inside mod clusterb"

Emilgardis commented 10 months ago

https://github.com/Emilgardis/svd2rust/actions/runs/7079947413/job/19267177832?pr=1#step:7:45 feedback appreciated!

burrbull commented 10 months ago

What advances of using json here? Yaml looks more clear: изображение

Emilgardis commented 10 months ago

switched to yaml! Any opinions on the diff? I think I want it in another way, and having it be saved elsewhere other than action logs would be nice, but I don't think a comment works for it and there's no way to create a gist using an organization account (we'd need a rust-embedded bot account)

burrbull commented 10 months ago

Any opinions on the diff? I think I want it in another way, and having it be saved elsewhere other than action logs would be nice, but I don't think a comment works for it and there's no way to create a gist using an organization account (we'd need a rust-embedded bot account)

Need someone more powerful. cc @therealprof @adamgreig

burrbull commented 10 months ago

@Emilgardis I've made several fixes. See #782

burrbull commented 10 months ago

Maybe it is better to merge this PR and make future changes in new PRs?

Emilgardis commented 10 months ago

I think that's fine, I'll cleanup the commits and do the last adjustments before a review to merge

Emilgardis commented 10 months ago

managed to sneak in a bug during the rebase and implementing regress pr, should be all good now.

Emilgardis commented 10 months ago

🥳

Emilgardis commented 10 months ago

/ci diff pr

lets try it :)

github-actions[bot] commented 10 months ago

Diff for comment

Emilgardis commented 10 months ago

well it works, but it doesn't like the command , will fix