@@ -117,6 +117,41 @@ jobs:
117
117
- name : rustdoc
118
118
run : RUSTDOCFLAGS="-Dwarnings" ./miri doc --document-private-items
119
119
120
+ bootstrap :
121
+ name : bootstrap build
122
+ runs-on : ubuntu-latest
123
+ steps :
124
+ - uses : actions/checkout@v4
125
+ # Deliberately skipping `./.github/workflows/setup` as we do our own setup
126
+ - name : Add cache for cargo
127
+ id : cache
128
+ uses : actions/cache@v4
129
+ with :
130
+ path : |
131
+ # Taken from <https://doc.rust-lang.org/nightly/cargo/guide/cargo-home.html#caching-the-cargo-home-in-ci>.
132
+ # Cache package/registry information
133
+ ~/.cargo/registry/index
134
+ ~/.cargo/registry/cache
135
+ ~/.cargo/git/db
136
+ # Cache bootstrap downloads
137
+ ../rust/build/cache
138
+ key : cargo-bootstrap-${{ hashFiles('rust-version') }}
139
+ restore-keys : cargo-bootstrap
140
+ - name : prepare build environment
141
+ run : |
142
+ MIRIDIR=$(pwd)
143
+ cd ..
144
+ # Bootstrap needs at least depth 2 to function.
145
+ git clone https://github.com/rust-lang/rust/ rust --depth 2 --revision $(cat "$MIRIDIR/rust-version")
146
+ cd rust
147
+ # Replace the in-tree Miri with the current version.
148
+ rm src/tools/miri -rf
149
+ ln -s "$MIRIDIR" src/tools/miri
150
+ - name : check build
151
+ run : |
152
+ cd ../rust # ./x does not seem to like being invoked from elsewhere
153
+ ./x check miri
154
+
120
155
coverage :
121
156
name : coverage report
122
157
runs-on : ubuntu-latest
@@ -130,7 +165,7 @@ jobs:
130
165
# ALL THE PREVIOUS JOBS NEED TO BE ADDED TO THE `needs` SECTION OF THIS JOB!
131
166
# And they should be added below in `cron-fail-notify` as well.
132
167
conclusion :
133
- needs : [test, style, coverage]
168
+ needs : [test, style, bootstrap, coverage]
134
169
# We need to ensure this job does *not* get skipped if its dependencies fail,
135
170
# because a skipped job is considered a success by GitHub. So we have to
136
171
# overwrite `if:`. We use `!cancelled()` to ensure the job does still not get run
@@ -211,7 +246,7 @@ jobs:
211
246
cron-fail-notify :
212
247
name : cronjob failure notification
213
248
runs-on : ubuntu-latest
214
- needs : [test, style, coverage]
249
+ needs : [test, style, bootstrap, coverage]
215
250
if : ${{ github.event_name == 'schedule' && failure() }}
216
251
steps :
217
252
# Send a Zulip notification
0 commit comments