Skip to content

Commit cda0b07

Browse files
committed
Auto merge of #1808 - RalfJung:fmt, r=oli-obk
add (bors-ignored) formatting check job
2 parents 25a43c7 + 74ae89e commit cda0b07

File tree

2 files changed

+24
-2
lines changed

2 files changed

+24
-2
lines changed

.github/workflows/ci.yml

+23
Original file line numberDiff line numberDiff line change
@@ -92,11 +92,34 @@ jobs:
9292
- name: Test
9393
run: bash ./ci.sh
9494

95+
fmt:
96+
name: check formatting (ignored by bors)
97+
runs-on: ubuntu-latest
98+
steps:
99+
- uses: actions/checkout@v2
100+
- name: Install latest nightly
101+
uses: actions-rs/toolchain@v1
102+
with:
103+
toolchain: nightly
104+
components: rustfmt
105+
default: true
106+
- name: Check formatting (miri)
107+
uses: actions-rs/cargo@v1
108+
with:
109+
command: fmt
110+
args: --all -- --check
111+
- name: Check formatting (cargo-miri)
112+
uses: actions-rs/cargo@v1
113+
with:
114+
command: fmt
115+
args: --manifest-path cargo-miri/Cargo.toml --all -- --check
116+
95117
# These jobs doesn't actually test anything, but they're only used to tell
96118
# bors the build completed, as there is no practical way to detect when a
97119
# workflow is successful listening to webhooks only.
98120
#
99121
# ALL THE PREVIOUS JOBS NEED TO BE ADDED TO THE `needs` SECTION OF THIS JOB!
122+
# (`fmt` is deliberately not listed, we want bors to ignore it.)
100123
end-success:
101124
name: bors build finished
102125
runs-on: ubuntu-latest

benches/helpers/miri_helper.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@ impl rustc_driver::Callbacks for MiriCompilerCalls<'_> {
2020
compiler.session().abort_if_errors();
2121

2222
queries.global_ctxt().unwrap().peek_mut().enter(|tcx| {
23-
let (entry_def_id, _) =
24-
tcx.entry_fn(()).expect("no main or start function found");
23+
let (entry_def_id, _) = tcx.entry_fn(()).expect("no main or start function found");
2524

2625
self.bencher.iter(|| {
2726
let config = miri::MiriConfig::default();

0 commit comments

Comments
 (0)