Skip to content

Commit 2b780cd

Browse files
committed
split mingw-check into two
Signed-off-by: onur-ozkan <[email protected]>
1 parent d28cb1c commit 2b780cd

File tree

13 files changed

+61
-26
lines changed

13 files changed

+61
-26
lines changed

src/ci/citool/src/jobs.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ use crate::utils::load_env_var;
1313
#[derive(serde::Deserialize, Debug, Clone)]
1414
#[serde(deny_unknown_fields)]
1515
pub struct Job {
16-
/// Name of the job, e.g. mingw-check
16+
/// Name of the job, e.g. mingw-check-1
1717
pub name: String,
1818
/// GitHub runner on which the job should be executed
1919
pub os: String,

src/ci/citool/tests/jobs.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ try-job: dist-i686-msvc"#,
4040
fn pr_jobs() {
4141
let stdout = get_matrix("pull_request", "commit", "refs/heads/pr/1234");
4242
insta::assert_snapshot!(stdout, @r#"
43-
jobs=[{"name":"mingw-check","full_name":"PR - mingw-check","os":"ubuntu-24.04","env":{"PR_CI_JOB":1},"free_disk":true},{"name":"mingw-check-tidy","full_name":"PR - mingw-check-tidy","os":"ubuntu-24.04","env":{"PR_CI_JOB":1},"continue_on_error":true,"free_disk":true,"doc_url":"https://foo.bar"}]
43+
jobs=[{"name":"mingw-check-1","full_name":"PR - mingw-check-1","os":"ubuntu-24.04","env":{"PR_CI_JOB":1},"free_disk":true},{"name":"mingw-check-2","full_name":"PR - mingw-check-2","os":"ubuntu-24.04","env":{"PR_CI_JOB":1},"free_disk":true},{"name":"mingw-check-tidy","full_name":"PR - mingw-check-tidy","os":"ubuntu-24.04","env":{"PR_CI_JOB":1},"continue_on_error":true,"free_disk":true,"doc_url":"https://foo.bar"}]
4444
run_type=pr
4545
"#);
4646
}

src/ci/citool/tests/test-jobs.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,9 @@ envs:
6464
# These jobs automatically inherit envs.pr, to avoid repeating
6565
# it in each job definition.
6666
pr:
67-
- name: mingw-check
67+
- name: mingw-check-1
68+
<<: *job-linux-4c
69+
- name: mingw-check-2
6870
<<: *job-linux-4c
6971
- name: mingw-check-tidy
7072
continue_on_error: true

src/ci/docker/host-x86_64/mingw-check/Dockerfile renamed to src/ci/docker/host-x86_64/mingw-check-1/Dockerfile

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -34,31 +34,22 @@ RUN npm install [email protected] [email protected] [email protected] -g
3434
COPY scripts/sccache.sh /scripts/
3535
RUN sh /scripts/sccache.sh
3636

37-
COPY host-x86_64/mingw-check/reuse-requirements.txt /tmp/
37+
COPY host-x86_64/mingw-check-1/reuse-requirements.txt /tmp/
3838
RUN pip3 install --no-deps --no-cache-dir --require-hashes -r /tmp/reuse-requirements.txt
3939

40-
COPY host-x86_64/mingw-check/check-default-config-profiles.sh /scripts/
41-
COPY host-x86_64/mingw-check/validate-toolstate.sh /scripts/
42-
COPY host-x86_64/mingw-check/validate-error-codes.sh /scripts/
40+
COPY host-x86_64/mingw-check-1/check-default-config-profiles.sh /scripts/
41+
COPY host-x86_64/mingw-check-1/validate-toolstate.sh /scripts/
42+
COPY host-x86_64/mingw-check-1/validate-error-codes.sh /scripts/
4343

4444
# Check library crates on all tier 1 targets.
4545
# We disable optimized compiler built-ins because that requires a C toolchain for the target.
4646
# We also skip the x86_64-unknown-linux-gnu target as it is well-tested by other jobs.
4747
ENV SCRIPT \
48-
python3 ../x.py check --stage 1 --set build.optimized-compiler-builtins=false core alloc std --target=aarch64-unknown-linux-gnu,i686-pc-windows-msvc,i686-unknown-linux-gnu,x86_64-apple-darwin,x86_64-pc-windows-gnu,x86_64-pc-windows-msvc && \
4948
/scripts/check-default-config-profiles.sh && \
50-
python3 ../x.py check compiletest --set build.compiletest-use-stage0-libtest=true && \
51-
python3 ../x.py check --target=x86_64-pc-windows-gnu --host=x86_64-pc-windows-gnu && \
52-
python3 ../x.py clippy ci && \
5349
python3 ../x.py build --stage 0 src/tools/build-manifest && \
54-
python3 ../x.py test --stage 0 src/tools/compiletest && \
55-
python3 ../x.py test --stage 1 core alloc std test proc_macro && \
56-
# Build both public and internal documentation.
57-
RUSTDOCFLAGS=\"--document-private-items --document-hidden-items\" python3 ../x.py doc --stage 1 library && \
58-
mkdir -p /checkout/obj/staging/doc && \
59-
cp -r build/x86_64-unknown-linux-gnu/doc /checkout/obj/staging && \
60-
RUSTDOCFLAGS=\"--document-private-items --document-hidden-items\" python3 ../x.py doc --stage 0 compiler && \
61-
RUSTDOCFLAGS=\"--document-private-items --document-hidden-items\" python3 ../x.py doc --stage 1 library/test && \
50+
python3 ../x.py check compiletest --set build.compiletest-use-stage0-libtest=true && \
51+
python3 ../x.py check --stage 1 --target=i686-pc-windows-gnu --host=i686-pc-windows-gnu && \
52+
python3 ../x.py check --stage 1 --set build.optimized-compiler-builtins=false core alloc std --target=aarch64-unknown-linux-gnu,i686-pc-windows-msvc,i686-unknown-linux-gnu,x86_64-apple-darwin,x86_64-pc-windows-gnu,x86_64-pc-windows-msvc && \
6253
/scripts/validate-toolstate.sh && \
6354
/scripts/validate-error-codes.sh && \
6455
reuse --include-submodules lint && \
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
FROM ubuntu:22.04
2+
3+
ARG DEBIAN_FRONTEND=noninteractive
4+
RUN apt-get update && apt-get install -y --no-install-recommends \
5+
g++ \
6+
make \
7+
ninja-build \
8+
file \
9+
curl \
10+
ca-certificates \
11+
python3 \
12+
python3-pip \
13+
python3-pkg-resources \
14+
git \
15+
cmake \
16+
sudo \
17+
gdb \
18+
xz-utils \
19+
libssl-dev \
20+
pkg-config \
21+
mingw-w64 \
22+
&& rm -rf /var/lib/apt/lists/*
23+
24+
ENV RUST_CONFIGURE_ARGS="--set rust.validate-mir-opts=3"
25+
26+
COPY scripts/sccache.sh /scripts/
27+
RUN sh /scripts/sccache.sh
28+
29+
ENV SCRIPT \
30+
python3 ../x.py clippy ci && \
31+
python3 ../x.py test --stage 1 core alloc std test proc_macro && \
32+
# Build both public and internal documentation.
33+
RUSTDOCFLAGS=\"--document-private-items --document-hidden-items\" python3 ../x.py doc --stage 0 compiler && \
34+
RUSTDOCFLAGS=\"--document-private-items --document-hidden-items\" python3 ../x.py doc --stage 1 library && \
35+
mkdir -p /checkout/obj/staging/doc && \
36+
cp -r build/x86_64-unknown-linux-gnu/doc /checkout/obj/staging && \
37+
RUSTDOCFLAGS=\"--document-private-items --document-hidden-items\" python3 ../x.py doc --stage 1 library/test

src/ci/docker/host-x86_64/mingw-check-tidy/Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,12 @@ COPY host-x86_64/mingw-check-tidy/eslint.version /tmp/
3434
COPY scripts/sccache.sh /scripts/
3535
RUN sh /scripts/sccache.sh
3636

37-
COPY host-x86_64/mingw-check/reuse-requirements.txt /tmp/
37+
COPY host-x86_64/mingw-check-1/reuse-requirements.txt /tmp/
3838
RUN pip3 install --no-deps --no-cache-dir --require-hashes -r /tmp/reuse-requirements.txt \
3939
&& pip3 install virtualenv
4040

41-
COPY host-x86_64/mingw-check/validate-toolstate.sh /scripts/
42-
COPY host-x86_64/mingw-check/validate-error-codes.sh /scripts/
41+
COPY host-x86_64/mingw-check-1/validate-toolstate.sh /scripts/
42+
COPY host-x86_64/mingw-check-1/validate-error-codes.sh /scripts/
4343

4444
# NOTE: intentionally uses python2 for x.py so we can test it still works.
4545
# validate-toolstate only runs in our CI, so it's ok for it to only support python3.

src/ci/github-actions/jobs.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,9 @@ envs:
111111
# These jobs automatically inherit envs.pr, to avoid repeating
112112
# it in each job definition.
113113
pr:
114-
- name: mingw-check
114+
- name: mingw-check-1
115+
<<: *job-linux-4c
116+
- name: mingw-check-2
115117
<<: *job-linux-4c
116118
- name: mingw-check-tidy
117119
continue_on_error: true
@@ -285,7 +287,10 @@ auto:
285287
/scripts/stage_2_test_set2.sh
286288
<<: *job-linux-4c
287289

288-
- name: mingw-check
290+
- name: mingw-check-1
291+
<<: *job-linux-4c
292+
293+
- name: mingw-check-2
289294
<<: *job-linux-4c
290295

291296
- name: test-various

src/doc/rustc-dev-guide/src/tests/ci.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@ kinds of builds (sets of jobs).
6666
### Pull Request builds
6767

6868
After each push to a pull request, a set of `pr` jobs are executed. Currently,
69-
these execute the `x86_64-gnu-llvm-X`, `x86_64-gnu-tools`, `mingw-check` and
70-
`mingw-check-tidy` jobs, all running on Linux. These execute a relatively short
69+
these execute the `x86_64-gnu-llvm-X`, `x86_64-gnu-tools`, `mingw-check-1`, `mingw-check-2`
70+
and `mingw-check-tidy` jobs, all running on Linux. These execute a relatively short
7171
(~30 minutes) and lightweight test suite that should catch common issues. More
7272
specifically, they run a set of lints, they try to perform a cross-compile check
7373
build to Windows mingw (without producing any artifacts) and they test the

0 commit comments

Comments
 (0)