-
Notifications
You must be signed in to change notification settings - Fork 156
improve regress #728
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
improve regress #728
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
90b406a
add output to gitignore
Emilgardis 4ea35e5
Improve svd2rust-regress
Emilgardis 1831ff4
Implement diff and ci command
Emilgardis 9584b22
make tests file yaml
Emilgardis 301eef1
cleanup
burrbull cb56476
check 404
burrbull 4560744
posborn -> cmsis-svd-data
burrbull a65d514
small fixes
Emilgardis 1a74d73
add more context to setup errors
Emilgardis f047661
improve output
Emilgardis b366167
bump lockfile
Emilgardis f041e58
add (some) patched stm32 svds and switch default to STM32F103
Emilgardis 848ca10
minimize tests.yml
Emilgardis eb0c405
fix last arg parsing and wrong lookup for chips
Emilgardis File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,5 @@ | ||
[target.aarch64-unknown-linux-gnu] | ||
linker = "aarch64-linux-gnu-gcc" | ||
|
||
[alias] | ||
regress = "run -p svd2rust-regress --" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
name: Diff | ||
on: | ||
issue_comment: | ||
types: [created] | ||
|
||
jobs: | ||
generate: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
diffs: ${{ steps.regress-ci.outputs.diffs }} | ||
if: ${{ github.event.issue.pull_request }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: dtolnay/rust-toolchain@master | ||
with: | ||
toolchain: stable | ||
|
||
- name: Cache | ||
uses: Swatinem/rust-cache@v2 | ||
with: | ||
shared-key: "diff" | ||
|
||
- run: cargo regress ci | ||
id: regress-ci | ||
env: | ||
GITHUB_COMMENT: ${{ github.event.comment.body }} | ||
GITHUB_COMMENT_PR: ${{ github.event.comment.issue_url }} | ||
diff: | ||
runs-on: ubuntu-latest | ||
needs: [generate] | ||
if: needs.generate.outputs.diffs != '{}' && needs.generate.outputs.diffs != '[]' && needs.generate.outputs.diffs != '' | ||
strategy: | ||
matrix: | ||
include: ${{ fromJson(needs.generate.outputs.diffs) }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: dtolnay/rust-toolchain@master | ||
with: | ||
toolchain: stable | ||
|
||
- name: Cache | ||
uses: Swatinem/rust-cache@v2 | ||
with: | ||
shared-key: "diff" | ||
|
||
- uses: taiki-e/install-action@v2 | ||
if: matrix.needs_semver_checks | ||
with: | ||
tool: cargo-semver-checks | ||
|
||
# if a new line is added here, make sure to update the `summary` job to reference the new step index | ||
- uses: taiki-e/install-action@v2 | ||
with: | ||
tool: git-delta | ||
|
||
- run: cargo regress diff ${{ matrix.command }} --use-pager-directly | ||
env: | ||
GH_TOKEN: ${{ github.token }} | ||
GITHUB_PR: ${{ matrix.pr }} | ||
GIT_PAGER: delta --hunk-header-style omit | ||
summary: | ||
runs-on: ubuntu-latest | ||
needs: [diff, generate] | ||
if: always() && needs.generate.outputs.diffs != '{}' && needs.generate.outputs.diffs != '[]' && needs.generate.outputs.diffs != '' | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- run: | | ||
PR_ID=$(echo "${{ github.event.comment.issue_url }}" | grep -o '[0-9]\+$') | ||
gh run view ${{ github.run_id }} --json jobs | \ | ||
jq -r '"Diff for [comment]("+$comment+")\n\n" + ([.jobs[] | select(.name | startswith("diff")) | "- [" + (.name | capture("\\((?<name>[^,]+),.*") | .name) + "](" + .url + "?pr=" + $pr_id + "#step:7:45)"] | join("\n"))' --arg pr_id "$PR_ID" --arg comment "${{ github.event.comment.url }}"| \ | ||
gh pr comment "$PR_ID" --body "$(< /dev/stdin)" | ||
env: | ||
GH_TOKEN: ${{ github.token }} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,4 +3,4 @@ | |
*.rs.bk | ||
*.svd | ||
target | ||
ci/svd2rust-regress/Cargo.lock | ||
output |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.