Skip to content

Commit 76cd523

Browse files
authored
Merge pull request #783 from rust-embedded/improve-regress
fix regress ci problems
2 parents 4f5fa5b + b042c5a commit 76cd523

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

.github/workflows/diff.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
runs-on: ubuntu-latest
99
outputs:
1010
diffs: ${{ steps.regress-ci.outputs.diffs }}
11-
if: ${{ github.event.issue.pull_request }}
11+
if: github.event.issue.pull_request && (contains(github.event.comment.body, '\n/ci') || startsWith(github.event.comment.body, '/ci'))
1212
steps:
1313
- uses: actions/checkout@v4
1414

@@ -55,15 +55,15 @@ jobs:
5555
with:
5656
tool: git-delta
5757

58-
- run: cargo regress diff ${{ matrix.command }} --use-pager-directly
58+
- run: cargo regress diff --use-pager-directly ${{ matrix.command }}
5959
env:
6060
GH_TOKEN: ${{ github.token }}
6161
GITHUB_PR: ${{ matrix.pr }}
6262
GIT_PAGER: delta --hunk-header-style omit
6363
summary:
6464
runs-on: ubuntu-latest
6565
needs: [diff, generate]
66-
if: always() && needs.generate.outputs.diffs != '{}' && needs.generate.outputs.diffs != '[]' && needs.generate.outputs.diffs != ''
66+
if: always() && needs.generate.outputs.diffs != '{}' && needs.generate.outputs.diffs != '[]' && needs.generate.outputs.diffs != '' && needs.generate.result == 'success'
6767
steps:
6868
- uses: actions/checkout@v4
6969

ci/svd2rust-regress/src/svd_test.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use svd2rust::{util::ToSanitizedCase, Target};
44
use crate::{command::CommandExt, tests::TestCase, Opts, TestOpts};
55
use std::io::prelude::*;
66
use std::path::PathBuf;
7-
use std::process::{Command, Output};
7+
use std::process::Command;
88
use std::{
99
fmt::Write as _,
1010
fs::{self, File, OpenOptions},
@@ -340,7 +340,7 @@ impl TestCase {
340340
src_files.sort();
341341

342342
for entry in src_files {
343-
let output = Command::new(rustfmt_bin_path)
343+
Command::new(rustfmt_bin_path)
344344
.arg(entry)
345345
.args(["--edition", "2021"])
346346
.capture_outputs(

0 commit comments

Comments
 (0)