Skip to content

Commit aa7081d

Browse files
committed
refactor
1 parent 5a11fab commit aa7081d

File tree

6 files changed

+61
-84
lines changed

6 files changed

+61
-84
lines changed

src/ci/docker/host-x86_64/i686-gnu-2/Dockerfile

Lines changed: 0 additions & 38 deletions
This file was deleted.

src/ci/docker/host-x86_64/i686-gnu-nopt-1/Dockerfile

Lines changed: 0 additions & 36 deletions
This file was deleted.

src/ci/docker/host-x86_64/i686-gnu-nopt-2/Dockerfile renamed to src/ci/docker/host-x86_64/i686-gnu-nopt/Dockerfile

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,7 @@ RUN echo "[rust]" > /config/nopt-std-config.toml
2727
RUN echo "optimize = false" >> /config/nopt-std-config.toml
2828

2929
ENV RUST_CONFIGURE_ARGS --build=i686-unknown-linux-gnu --disable-optimize-tests
30-
ENV SCRIPT python3 ../x.py --stage 2 test \
31-
# Skip tests that we run in i686-gnu-nopt-1
32-
--skip compiler \
33-
--skip library \
34-
--skip tidyselftest
30+
ARG SCRIPT_ARG
31+
ENV DEFAULT_SCRIPT python3 ../x.py test --stage 0 --config /config/nopt-std-config.toml library/std \
32+
&& python3 ../x.py --stage 2 test
33+
ENV SCRIPT=${SCRIPT_ARG:-$DEFAULT_SCRIPT}

src/ci/docker/host-x86_64/i686-gnu-1/Dockerfile renamed to src/ci/docker/host-x86_64/i686-gnu/Dockerfile

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,12 @@ COPY scripts/sccache.sh /scripts/
2424
RUN sh /scripts/sccache.sh
2525

2626
ENV RUST_CONFIGURE_ARGS --build=i686-unknown-linux-gnu
27-
ENV SCRIPT python3 ../x.py --stage 2 test \
28-
# Skip tests that we run in i686-gnu-2
29-
--skip compiler \
30-
--skip library \
31-
--skip tidyselftest \
27+
ARG SCRIPT_ARG
28+
ENV DEFAULT_SCRIPT python3 ../x.py --stage 2 test \
3229
# Skip some tests that are unlikely to be platform specific, to speed up
3330
# this slow job.
3431
--skip src/bootstrap \
3532
--skip tests/rustdoc-js \
3633
--skip src/tools/error_index_generator \
3734
--skip src/tools/linkchecker
35+
ENV SCRIPT=${SCRIPT_ARG:-$DEFAULT_SCRIPT}

src/ci/docker/run.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,14 @@ else
300300
command=(/checkout/src/ci/run.sh)
301301
fi
302302

303+
# If the environment variable SCRIPT is defined,
304+
# set the build argument SCRIPT_ARG to SCRIPT.
305+
# In this way, we run the SCRIPT defined in CI,
306+
# instead of the one defined in the Dockerfile.
307+
if [ -n "${SCRIPT+x}" ]; then
308+
args="$args --build-arg SCRIPT_ARG=$SCRIPT"
309+
fi
310+
303311
if isCI; then
304312
# Get some needed information for $BASE_COMMIT
305313
#

src/ci/github-actions/jobs.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,15 +213,61 @@ auto:
213213
<<: *job-linux-4c
214214

215215
- image: i686-gnu-1
216+
env:
217+
IMAGE: i686-gnu
218+
SCRIPT: >
219+
python3 ../x.py --stage 2 test
220+
# Skip tests that we run in i686-gnu-2
221+
--skip compiler
222+
--skip library
223+
--skip tidyselftest
224+
# Skip some tests that are unlikely to be platform specific, to speed up
225+
# this slow job.
226+
--skip src/bootstrap
227+
--skip tests/rustdoc-js
228+
--skip src/tools/error_index_generator
229+
--skip src/tools/linkchecker
216230
<<: *job-linux-4c
217231

218232
- image: i686-gnu-2
233+
env:
234+
IMAGE: i686-gnu
235+
SCRIPT: >
236+
python3 ../x.py --stage 2 test
237+
# Skip tests that we run in i686-gnu-1
238+
--skip tests
239+
--skip src
240+
--skip coverage-map
241+
--skip coverage-run
242+
# Skip some tests that are unlikely to be platform specific, to speed up
243+
# this slow job.
244+
--skip src/bootstrap
245+
--skip tests/rustdoc-js
246+
--skip src/tools/error_index_generator
247+
--skip src/tools/linkchecker
219248
<<: *job-linux-4c
220249

221250
- image: i686-gnu-nopt-1
251+
env:
252+
IMAGE: i686-gnu-nopt
253+
SCRIPT: >
254+
python3 ../x.py --stage 2 test
255+
# Skip tests that we run in i686-gnu-nopt-1
256+
--skip compiler
257+
--skip library
258+
--skip tidyselftest
222259
<<: *job-linux-4c
223260

224261
- image: i686-gnu-nopt-2
262+
env:
263+
IMAGE: i686-gnu-nopt
264+
SCRIPT: >
265+
python3 ../x.py --stage 2 test
266+
# Skip tests that we run in i686-gnu-nopt-1
267+
--skip tests
268+
--skip src
269+
--skip coverage-map
270+
--skip coverage-run
225271
<<: *job-linux-4c
226272

227273
- image: mingw-check

0 commit comments

Comments
 (0)