Skip to content

Commit 7035da1

Browse files
authored
Merge pull request #1005 from rust-lang/crate-report
Migrate crate reporting to the orchestrator
2 parents c5eadf7 + 49f2b6d commit 7035da1

File tree

18 files changed

+121
-548
lines changed

18 files changed

+121
-548
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -50,44 +50,6 @@ jobs:
5050
tags: "${{ env.IMAGE_NAME }}:${{ github.run_id }}"
5151
cache-from: type=gha,scope=${{ matrix.channel }}
5252
cache-to: type=gha,scope=${{ matrix.channel }},mode=max
53-
build_tool_containers:
54-
name: Build ${{ matrix.tool }} tool container
55-
runs-on: ubuntu-latest
56-
needs: build_compiler_containers
57-
strategy:
58-
matrix:
59-
tool:
60-
- clippy
61-
- miri
62-
- rustfmt
63-
if: 'github.event_name == ''push'' || contains(github.event.pull_request.labels.*.name, ''CI: approved'')'
64-
env:
65-
IMAGE_NAME: ghcr.io/integer32llc/rust-playground-ci-tool-${{ matrix.tool }}
66-
steps:
67-
- name: Checkout code
68-
uses: actions/checkout@v3
69-
with:
70-
ref: "${{ github.event.pull_request.head.sha }}"
71-
- name: Set up Docker Buildx
72-
uses: docker/setup-buildx-action@v2
73-
with:
74-
driver-opts: image=moby/buildkit:v0.11.6
75-
- name: Login to GitHub Container Registry
76-
uses: docker/login-action@v2
77-
with:
78-
registry: ghcr.io
79-
username: "${{ env.GH_CONTAINER_REGISTRY_USERNAME }}"
80-
password: "${{ secrets.GH_CONTAINER_REGISTRY_TOKEN }}"
81-
- name: Build and push container
82-
uses: docker/build-push-action@v4
83-
with:
84-
context: compiler/${{ matrix.tool }}/
85-
file: compiler/${{ matrix.tool }}/Dockerfile
86-
build-args: base_image=ghcr.io/integer32llc/rust-playground-ci-rust-nightly:${{ github.run_id }}
87-
push: true
88-
tags: "${{ env.IMAGE_NAME }}:${{ github.run_id }}"
89-
cache-from: type=gha,scope=${{ matrix.tool }}
90-
cache-to: type=gha,scope=${{ matrix.tool }},mode=max
9153
build_backend:
9254
name: Build backend
9355
runs-on: ubuntu-latest
@@ -171,7 +133,6 @@ jobs:
171133
if: 'github.event_name == ''push'' || contains(github.event.pull_request.labels.*.name, ''CI: approved'')'
172134
needs:
173135
- build_compiler_containers
174-
- build_tool_containers
175136
- build_backend
176137
- build_frontend
177138
defaults:
@@ -198,19 +159,14 @@ jobs:
198159
bundle config path vendor/bundle
199160
bundle install --jobs 4 --retry 3
200161
- name: Pull containers
201-
run: echo ghcr.io/integer32llc/rust-playground-ci-{rust-{stable,beta,nightly},tool-{clippy,rustfmt,miri}}:${{ github.run_id }} | xargs -n1 docker pull
162+
run: echo ghcr.io/integer32llc/rust-playground-ci-rust-{stable,beta,nightly}:${{ github.run_id }} | xargs -n1 docker pull
202163
- name: Rename containers
203164
run: |-
204165
for c in stable beta nightly; do
205166
docker tag ghcr.io/integer32llc/rust-playground-ci-rust-$c:${{ github.run_id }} ghcr.io/integer32llc/rust-playground-ci-rust-$c
206167
docker tag ghcr.io/integer32llc/rust-playground-ci-rust-$c:${{ github.run_id }} shepmaster/rust-$c
207168
docker tag ghcr.io/integer32llc/rust-playground-ci-rust-$c:${{ github.run_id }} rust-$c
208169
done
209-
for t in clippy miri rustfmt; do
210-
docker tag ghcr.io/integer32llc/rust-playground-ci-tool-$t:${{ github.run_id }} ghcr.io/integer32llc/rust-playground-ci-tool-$t
211-
docker tag ghcr.io/integer32llc/rust-playground-ci-tool-$t:${{ github.run_id }} shepmaster/$t
212-
docker tag ghcr.io/integer32llc/rust-playground-ci-tool-$t:${{ github.run_id }} $t
213-
done
214170
- name: Download backend
215171
uses: actions/download-artifact@v3
216172
with:
@@ -265,29 +221,20 @@ jobs:
265221
username: "${{ env.DOCKER_HUB_USERNAME }}"
266222
password: "${{ secrets.DOCKER_HUB_TOKEN }}"
267223
- name: Pull containers
268-
run: echo ghcr.io/integer32llc/rust-playground-ci-{rust-{stable,beta,nightly},tool-{clippy,rustfmt,miri}}:${{ github.run_id }} | xargs -n1 docker pull
224+
run: echo ghcr.io/integer32llc/rust-playground-ci-rust-{stable,beta,nightly}:${{ github.run_id }} | xargs -n1 docker pull
269225
- name: Rename containers
270226
run: |-
271227
for c in stable beta nightly; do
272228
docker tag ghcr.io/integer32llc/rust-playground-ci-rust-$c:${{ github.run_id }} ghcr.io/integer32llc/rust-playground-ci-rust-$c
273229
docker tag ghcr.io/integer32llc/rust-playground-ci-rust-$c:${{ github.run_id }} shepmaster/rust-$c
274230
docker tag ghcr.io/integer32llc/rust-playground-ci-rust-$c:${{ github.run_id }} rust-$c
275231
done
276-
for t in clippy miri rustfmt; do
277-
docker tag ghcr.io/integer32llc/rust-playground-ci-tool-$t:${{ github.run_id }} ghcr.io/integer32llc/rust-playground-ci-tool-$t
278-
docker tag ghcr.io/integer32llc/rust-playground-ci-tool-$t:${{ github.run_id }} shepmaster/$t
279-
docker tag ghcr.io/integer32llc/rust-playground-ci-tool-$t:${{ github.run_id }} $t
280-
done
281232
- name: Push containers
282233
run: |-
283234
for c in stable beta nightly; do
284235
docker push ghcr.io/integer32llc/rust-playground-ci-rust-$c
285236
docker push shepmaster/rust-$c
286237
done
287-
for t in clippy miri rustfmt; do
288-
docker push ghcr.io/integer32llc/rust-playground-ci-tool-$t
289-
docker push shepmaster/$t
290-
done
291238
- name: Download backend
292239
uses: actions/download-artifact@v3
293240
with:

.github/workflows/cron.yml

Lines changed: 0 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -61,55 +61,3 @@ jobs:
6161
run: |-
6262
docker push ${{ env.IMAGE_NAME }}
6363
docker push ${{ env.DOCKER_HUB_IMAGE_NAME }}
64-
build_tool_containers:
65-
name: Build ${{ matrix.tool }} tool container
66-
runs-on: ubuntu-latest
67-
needs: build_compiler_containers
68-
strategy:
69-
matrix:
70-
tool:
71-
- clippy
72-
- miri
73-
- rustfmt
74-
env:
75-
IMAGE_NAME: ghcr.io/integer32llc/rust-playground-ci-tool-${{ matrix.tool }}
76-
DOCKER_HUB_IMAGE_NAME: shepmaster/${{ matrix.tool }}
77-
continue-on-error: true
78-
steps:
79-
- name: Checkout code
80-
uses: actions/checkout@v3
81-
- name: Set up Docker Buildx
82-
uses: docker/setup-buildx-action@v2
83-
with:
84-
driver-opts: image=moby/buildkit:v0.11.6
85-
- name: Login to GitHub Container Registry
86-
uses: docker/login-action@v2
87-
with:
88-
registry: ghcr.io
89-
username: "${{ env.GH_CONTAINER_REGISTRY_USERNAME }}"
90-
password: "${{ secrets.GH_CONTAINER_REGISTRY_TOKEN }}"
91-
- name: Login to Docker Hub
92-
uses: docker/login-action@v2
93-
with:
94-
username: "${{ env.DOCKER_HUB_USERNAME }}"
95-
password: "${{ secrets.DOCKER_HUB_TOKEN }}"
96-
- name: Build and push container
97-
uses: docker/build-push-action@v4
98-
with:
99-
context: compiler/${{ matrix.tool }}/
100-
file: compiler/${{ matrix.tool }}/Dockerfile
101-
build-args: base_image=ghcr.io/integer32llc/rust-playground-ci-rust-nightly:${{ github.run_id }}
102-
push: true
103-
tags: "${{ env.IMAGE_NAME }}:${{ github.run_id }}"
104-
cache-from: type=gha,scope=${{ matrix.tool }}
105-
cache-to: type=gha,scope=${{ matrix.tool }},mode=max
106-
- name: Pull container
107-
run: docker pull ${{ env.IMAGE_NAME }}:${{ github.run_id }}
108-
- name: Rename container
109-
run: |-
110-
docker tag ${{ env.IMAGE_NAME }}:${{ github.run_id }} ${{ env.IMAGE_NAME }}
111-
docker tag ${{ env.IMAGE_NAME }}:${{ github.run_id }} ${{ env.DOCKER_HUB_IMAGE_NAME }}
112-
- name: Push container
113-
run: |-
114-
docker push ${{ env.IMAGE_NAME }}
115-
docker push ${{ env.DOCKER_HUB_IMAGE_NAME }}

ci/workflows.yml

Lines changed: 1 addition & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -64,36 +64,10 @@ components:
6464
cache-from: type=gha,scope=${{ matrix.channel }}
6565
cache-to: type=gha,scope=${{ matrix.channel }},mode=max
6666

67-
- build_tool_containers_job: &build_tool_containers_job
68-
name: "Build ${{ matrix.tool }} tool container"
69-
runs-on: ubuntu-latest
70-
needs: build_compiler_containers
71-
72-
strategy:
73-
matrix:
74-
tool: [clippy, miri, rustfmt]
75-
76-
- build_tool_containers_job_env: &build_tool_containers_job_env
77-
IMAGE_NAME: ghcr.io/integer32llc/rust-playground-ci-tool-${{ matrix.tool }}
78-
79-
- build_tool_containers: &build_tool_containers
80-
name: "Build and push container"
81-
uses: docker/build-push-action@v4
82-
with:
83-
context: compiler/${{ matrix.tool }}/
84-
file: compiler/${{ matrix.tool }}/Dockerfile
85-
build-args: |-
86-
base_image=ghcr.io/integer32llc/rust-playground-ci-rust-nightly:${{ github.run_id }}
87-
push: true
88-
tags: |-
89-
${{ env.IMAGE_NAME }}:${{ github.run_id }}
90-
cache-from: type=gha,scope=${{ matrix.tool }}
91-
cache-to: type=gha,scope=${{ matrix.tool }},mode=max
92-
9367
- pull_containers: &pull_containers
9468
name: "Pull containers"
9569
run: |-
96-
echo ghcr.io/integer32llc/rust-playground-ci-{rust-{stable,beta,nightly},tool-{clippy,rustfmt,miri}}:${{ github.run_id }} | xargs -n1 docker pull
70+
echo ghcr.io/integer32llc/rust-playground-ci-rust-{stable,beta,nightly}:${{ github.run_id }} | xargs -n1 docker pull
9771
9872
- rename_all_containers: &rename_all_containers
9973
name: "Rename containers"
@@ -103,11 +77,6 @@ components:
10377
docker tag ghcr.io/integer32llc/rust-playground-ci-rust-$c:${{ github.run_id }} shepmaster/rust-$c
10478
docker tag ghcr.io/integer32llc/rust-playground-ci-rust-$c:${{ github.run_id }} rust-$c
10579
done
106-
for t in clippy miri rustfmt; do
107-
docker tag ghcr.io/integer32llc/rust-playground-ci-tool-$t:${{ github.run_id }} ghcr.io/integer32llc/rust-playground-ci-tool-$t
108-
docker tag ghcr.io/integer32llc/rust-playground-ci-tool-$t:${{ github.run_id }} shepmaster/$t
109-
docker tag ghcr.io/integer32llc/rust-playground-ci-tool-$t:${{ github.run_id }} $t
110-
done
11180
11281
- pull_current_container: &pull_current_container
11382
name: "Pull container"
@@ -152,18 +121,6 @@ workflows:
152121
- *login_ghcr
153122
- *build_compiler_containers
154123

155-
build_tool_containers:
156-
<<: *build_tool_containers_job
157-
if: "github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'CI: approved')"
158-
env:
159-
<<: *build_tool_containers_job_env
160-
161-
steps:
162-
- *checkout_pr
163-
- *docker_buildx
164-
- *login_ghcr
165-
- *build_tool_containers
166-
167124
build_backend:
168125
name: "Build backend"
169126
runs-on: ubuntu-latest
@@ -266,7 +223,6 @@ workflows:
266223
if: "github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'CI: approved')"
267224
needs:
268225
- build_compiler_containers
269-
- build_tool_containers
270226
- build_backend
271227
- build_frontend
272228

@@ -367,10 +323,6 @@ workflows:
367323
docker push ghcr.io/integer32llc/rust-playground-ci-rust-$c
368324
docker push shepmaster/rust-$c
369325
done
370-
for t in clippy miri rustfmt; do
371-
docker push ghcr.io/integer32llc/rust-playground-ci-tool-$t
372-
docker push shepmaster/$t
373-
done
374326
375327
- name: "Download backend"
376328
uses: actions/download-artifact@v3
@@ -444,21 +396,3 @@ workflows:
444396
- *pull_current_container
445397
- *rename_current_container
446398
- *push_current_container
447-
448-
build_tool_containers:
449-
<<: *build_tool_containers_job
450-
env:
451-
<<: *build_tool_containers_job_env
452-
DOCKER_HUB_IMAGE_NAME: shepmaster/${{ matrix.tool }}
453-
continue-on-error: true
454-
455-
steps:
456-
- *checkout
457-
- *docker_buildx
458-
- *login_ghcr
459-
- *login_docker_hub
460-
- *build_tool_containers
461-
462-
- *pull_current_container
463-
- *rename_current_container
464-
- *push_current_container

compiler/base/orchestrator/Cargo.lock

Lines changed: 24 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

compiler/base/orchestrator/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ bincode = { version = "1.3", default-features = false }
1212
futures = { version = "0.3.28", default-features = false, features = ["executor"] }
1313
modify-cargo-toml = { path = "../modify-cargo-toml", default-features = false }
1414
serde = { version = "1.0", default-features = false, features = ["derive"] }
15+
serde_json = { version = "1.0.108", default-features = false, features = ["std"] }
1516
snafu = { version = "0.7.4", default-features = false, features = ["futures", "std"] }
1617
tokio = { version = "1.28", default-features = false, features = ["fs", "io-std", "io-util", "macros", "process", "rt", "time", "sync"] }
1718
tokio-stream = { version = "0.1.14", default-features = false }

0 commit comments

Comments
 (0)