Skip to content

Commit d612081

Browse files
committed
Auto merge of #143294 - ChrisDenton:rename-mingw, r=Kobzol
Rename `mingw-*` CI jobs to `pr-*` The name `mingw` confuses people because these CI jobs now do much more than just cross-compile to mingw. This is basically a find/replace. I chose the name `pr-` because it's job is to do general PR checks,
2 parents 6268d0a + 6671d9b commit d612081

File tree

16 files changed

+80
-81
lines changed

16 files changed

+80
-81
lines changed

‎.github/workflows/ghcr.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,9 @@ jobs:
5353
run: |
5454
# List of DockerHub images to mirror to ghcr.io
5555
images=(
56-
# Mirrored because used by the mingw-check-tidy, which doesn't cache Docker images
56+
# Mirrored because used by the tidy job, which doesn't cache Docker images
5757
"ubuntu:22.04"
58-
# Mirrored because used by all linux CI jobs, including mingw-check-tidy
58+
# Mirrored because used by all linux CI jobs, including tidy
5959
"moby/buildkit:buildx-stable-1"
6060
# Mirrored because used when CI is running inside a Docker container
6161
"alpine:3.4"

‎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-1
16+
/// Name of the job, e.g. pr-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-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"}]
43+
jobs=[{"name":"pr-check-1","full_name":"PR - pr-check-1","os":"ubuntu-24.04","env":{"PR_CI_JOB":1},"free_disk":true},{"name":"pr-check-2","full_name":"PR - pr-check-2","os":"ubuntu-24.04","env":{"PR_CI_JOB":1},"free_disk":true},{"name":"tidy","full_name":"PR - 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 & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,11 @@ envs:
6464
# These jobs automatically inherit envs.pr, to avoid repeating
6565
# it in each job definition.
6666
pr:
67-
- name: mingw-check-1
67+
- name: pr-check-1
6868
<<: *job-linux-4c
69-
- name: mingw-check-2
69+
- name: pr-check-2
7070
<<: *job-linux-4c
71-
- name: mingw-check-tidy
71+
- name: tidy
7272
continue_on_error: true
7373
doc_url: https://foo.bar
7474
<<: *job-linux-4c

‎src/ci/docker/host-x86_64/mingw-check-1/Dockerfile

Lines changed: 0 additions & 58 deletions
This file was deleted.
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
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/nodejs.sh /scripts/
27+
RUN sh /scripts/nodejs.sh /node
28+
ENV PATH="/node/bin:${PATH}"
29+
30+
# Install es-check
31+
# Pin its version to prevent unrelated CI failures due to future es-check versions.
32+
RUN npm install es-check@6.1.1 eslint@8.6.0 typescript@5.7.3 -g
33+
34+
COPY scripts/sccache.sh /scripts/
35+
RUN sh /scripts/sccache.sh
36+
37+
COPY host-x86_64/pr-check-1/reuse-requirements.txt /tmp/
38+
RUN pip3 install --no-deps --no-cache-dir --require-hashes -r /tmp/reuse-requirements.txt
39+
40+
COPY host-x86_64/pr-check-1/check-default-config-profiles.sh /scripts/
41+
COPY host-x86_64/pr-check-1/validate-toolstate.sh /scripts/
42+
43+
# Check library crates on all tier 1 targets.
44+
# We disable optimized compiler built-ins because that requires a C toolchain for the target.
45+
# We also skip the x86_64-unknown-linux-gnu target as it is well-tested by other jobs.
46+
ENV SCRIPT \
47+
/scripts/check-default-config-profiles.sh && \
48+
python3 ../x.py build --stage 1 src/tools/build-manifest && \
49+
python3 ../x.py test --stage 0 src/tools/compiletest && \
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 && \
53+
/scripts/validate-toolstate.sh && \
54+
reuse --include-submodules lint && \
55+
python3 ../x.py test collect-license-metadata && \
56+
# Runs checks to ensure that there are no issues in our JS code.
57+
es-check es2019 ../src/librustdoc/html/static/js/*.js && \
58+
tsc --project ../src/librustdoc/html/static/js/tsconfig.json

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# We use the ghcr base image because ghcr doesn't have a rate limit
2-
# and the mingw-check-tidy job doesn't cache docker images in CI.
2+
# and the tidy job doesn't cache docker images in CI.
33
FROM ghcr.io/rust-lang/ubuntu:22.04
44

55
ARG DEBIAN_FRONTEND=noninteractive
@@ -29,20 +29,20 @@ RUN sh /scripts/nodejs.sh /node
2929
ENV PATH="/node/bin:${PATH}"
3030

3131
# Install eslint
32-
COPY host-x86_64/mingw-check-tidy/eslint.version /tmp/
32+
COPY host-x86_64/tidy/eslint.version /tmp/
3333

3434
COPY scripts/sccache.sh /scripts/
3535
RUN sh /scripts/sccache.sh
3636

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

41-
COPY host-x86_64/mingw-check-1/validate-toolstate.sh /scripts/
41+
COPY host-x86_64/pr-check-1/validate-toolstate.sh /scripts/
4242

4343
RUN bash -c 'npm install -g eslint@$(cat /tmp/eslint.version)'
4444

4545
# NOTE: intentionally uses python2 for x.py so we can test it still works.
4646
# validate-toolstate only runs in our CI, so it's ok for it to only support python3.
4747
ENV SCRIPT TIDY_PRINT_DIFF=1 python2.7 ../x.py test --stage 0 \
48-
src/tools/tidy tidyselftest --extra-checks=py,cpp
48+
src/tools/tidy tidyselftest --extra-checks=py,cpp

‎src/ci/github-actions/jobs.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -122,11 +122,11 @@ jobs:
122122
# These jobs automatically inherit envs.pr, to avoid repeating
123123
# it in each job definition.
124124
pr:
125-
- name: mingw-check-1
125+
- name: pr-check-1
126126
<<: *job-linux-4c
127-
- name: mingw-check-2
127+
- name: pr-check-2
128128
<<: *job-linux-4c
129-
- name: mingw-check-tidy
129+
- name: tidy
130130
continue_on_error: true
131131
free_disk: false
132132
env:
@@ -323,13 +323,13 @@ auto:
323323
/scripts/stage_2_test_set2.sh
324324
<<: *job-linux-4c
325325

326-
- name: mingw-check-1
326+
- name: pr-check-1
327327
<<: *job-linux-4c
328328

329-
- name: mingw-check-2
329+
- name: pr-check-2
330330
<<: *job-linux-4c
331331

332-
- name: mingw-check-tidy
332+
- name: tidy
333333
free_disk: false
334334
<<: *job-linux-4c
335335

‎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-1`, `mingw-check-2`
70-
and `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`, `pr-check-1`, `pr-check-2`
70+
and `tidy` jobs, all running on Linux. These execute a relatively short
7171
(~40 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

‎src/tools/tidy/src/rustdoc_js.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,7 @@ fn get_eslint_version() -> Option<String> {
5252
}
5353

5454
pub fn check(librustdoc_path: &Path, tools_path: &Path, src_path: &Path, bad: &mut bool) {
55-
let eslint_version_path =
56-
src_path.join("ci/docker/host-x86_64/mingw-check-tidy/eslint.version");
55+
let eslint_version_path = src_path.join("ci/docker/host-x86_64/tidy/eslint.version");
5756
let eslint_version = match std::fs::read_to_string(&eslint_version_path) {
5857
Ok(version) => version.trim().to_string(),
5958
Err(error) => {

0 commit comments

Comments
 (0)