Skip to content

Commit fc218d2

Browse files
committed
set job
1 parent 6d6cc21 commit fc218d2

File tree

1 file changed

+187
-181
lines changed

1 file changed

+187
-181
lines changed

.github/workflows/ci.yml

Lines changed: 187 additions & 181 deletions
Original file line numberDiff line numberDiff line change
@@ -117,191 +117,197 @@ jobs:
117117
with:
118118
fetch-depth: 2
119119

120+
- name: install typos-cli
121+
run: time RUSTFLAGS="-Copt-level=0" cargo install [email protected] --force
122+
123+
- name: run typos-cli
124+
run: time typos compiler library src/bootstrap src/librustdoc
125+
120126
# Free up disk space on Linux by removing preinstalled components that
121127
# we do not need. We do this to enable some of the less resource
122128
# intensive jobs to run on free runners, which however also have
123129
# less disk space.
124-
- name: free up disk space
125-
run: src/ci/scripts/free-disk-space-linux.sh
126-
if: matrix.free_disk
127-
128-
# If we don't need to free up disk space then just report how much space we have
129-
- name: print disk usage
130-
run: |
131-
echo "disk usage:"
132-
df -h
133-
if: matrix.free_disk == false
134-
135-
# Rust Log Analyzer can't currently detect the PR number of a GitHub
136-
# Actions build on its own, so a hint in the log message is needed to
137-
# point it in the right direction.
138-
- name: configure the PR in which the error message will be posted
139-
run: echo "[CI_PR_NUMBER=$num]"
140-
env:
141-
num: ${{ github.event.number }}
142-
if: needs.calculate_matrix.outputs.run_type == 'pr'
143-
144-
- name: add extra environment variables
145-
run: src/ci/scripts/setup-environment.sh
146-
env:
147-
# Since it's not possible to merge `${{ matrix.env }}` with the other
148-
# variables in `job.<name>.env`, the variables defined in the matrix
149-
# are passed to the `setup-environment.sh` script encoded in JSON,
150-
# which then uses log commands to actually set them.
151-
EXTRA_VARIABLES: ${{ toJson(matrix.env) }}
152-
153-
- name: ensure the channel matches the target branch
154-
run: src/ci/scripts/verify-channel.sh
155-
156-
- name: collect CPU statistics
157-
run: src/ci/scripts/collect-cpu-stats.sh
158-
159-
- name: show the current environment
160-
run: src/ci/scripts/dump-environment.sh
161-
162-
- name: install awscli
163-
run: src/ci/scripts/install-awscli.sh
164-
165-
- name: install sccache
166-
run: src/ci/scripts/install-sccache.sh
167-
168-
- name: select Xcode
169-
run: src/ci/scripts/select-xcode.sh
170-
171-
- name: install clang
172-
run: src/ci/scripts/install-clang.sh
173-
174-
- name: install tidy
175-
run: src/ci/scripts/install-tidy.sh
176-
177-
- name: install WIX
178-
run: src/ci/scripts/install-wix.sh
179-
180-
- name: disable git crlf conversion
181-
run: src/ci/scripts/disable-git-crlf-conversion.sh
182-
183-
- name: checkout submodules
184-
run: src/ci/scripts/checkout-submodules.sh
185-
186-
- name: install MinGW
187-
run: src/ci/scripts/install-mingw.sh
188-
189-
- name: install ninja
190-
run: src/ci/scripts/install-ninja.sh
191-
192-
- name: enable ipv6 on Docker
193-
# Don't run on codebuild because systemctl is not available
194-
if: ${{ !matrix.codebuild }}
195-
run: src/ci/scripts/enable-docker-ipv6.sh
196-
197-
# Disable automatic line ending conversion (again). On Windows, when we're
198-
# installing dependencies, something switches the git configuration directory or
199-
# re-enables autocrlf. We've not tracked down the exact cause -- and there may
200-
# be multiple -- but this should ensure submodules are checked out with the
201-
# appropriate line endings.
202-
- name: disable git crlf conversion
203-
run: src/ci/scripts/disable-git-crlf-conversion.sh
204-
205-
- name: ensure line endings are correct
206-
run: src/ci/scripts/verify-line-endings.sh
207-
208-
- name: ensure backported commits are in upstream branches
209-
run: src/ci/scripts/verify-backported-commits.sh
210-
211-
- name: ensure the stable version number is correct
212-
run: src/ci/scripts/verify-stable-version-number.sh
213-
214-
# Show the environment just before we run the build
215-
# This makes it easier to diagnose problems with the above install scripts.
216-
- name: show the current environment
217-
run: src/ci/scripts/dump-environment.sh
218-
219-
# Pre-build citool before the following step uninstalls rustup
220-
# Build it into the build directory, to avoid modifying sources
221-
- name: build citool
222-
run: |
223-
cd src/ci/citool
224-
CARGO_INCREMENTAL=0 CARGO_TARGET_DIR=../../../build/citool cargo build
225-
226-
- name: run the build
227-
run: |
228-
set +e
229-
# Redirect stderr to stdout to avoid reordering the two streams in the GHA logs.
230-
src/ci/scripts/run-build-from-ci.sh 2>&1
231-
STATUS=$?
232-
set -e
233-
234-
if [[ "$STATUS" -ne 0 && -n "$CI_JOB_DOC_URL" ]]; then
235-
echo "****************************************************************************"
236-
echo "To find more information about this job, visit the following URL:"
237-
echo "$CI_JOB_DOC_URL"
238-
echo "****************************************************************************"
239-
fi
240-
exit ${STATUS}
241-
env:
242-
AWS_ACCESS_KEY_ID: ${{ secrets.CACHES_AWS_ACCESS_KEY_ID }}
243-
AWS_SECRET_ACCESS_KEY: ${{ secrets.CACHES_AWS_SECRET_ACCESS_KEY }}
244-
245-
- name: create github artifacts
246-
run: src/ci/scripts/create-doc-artifacts.sh
247-
248-
- name: print disk usage
249-
run: |
250-
echo "disk usage:"
251-
df -h
252-
253-
- name: upload artifacts to github
254-
uses: actions/upload-artifact@v4
255-
with:
256-
# name is set in previous step
257-
name: ${{ env.DOC_ARTIFACT_NAME }}
258-
path: obj/artifacts/doc
259-
if-no-files-found: ignore
260-
retention-days: 5
261-
262-
- name: upload artifacts to S3
263-
run: src/ci/scripts/upload-artifacts.sh
264-
env:
265-
AWS_ACCESS_KEY_ID: ${{ secrets.ARTIFACTS_AWS_ACCESS_KEY_ID }}
266-
AWS_SECRET_ACCESS_KEY: ${{ secrets.ARTIFACTS_AWS_SECRET_ACCESS_KEY }}
267-
# Adding a condition on DEPLOY=1 or DEPLOY_ALT=1 is not needed as all deploy
268-
# builders *should* have the AWS credentials available. Still, explicitly
269-
# adding the condition is helpful as this way CI will not silently skip
270-
# deploying artifacts from a dist builder if the variables are misconfigured,
271-
# erroring about invalid credentials instead.
272-
if: github.event_name == 'push' || env.DEPLOY == '1' || env.DEPLOY_ALT == '1'
273-
274-
- name: postprocess metrics into the summary
275-
# This step is not critical, and if some I/O problem happens, we don't want
276-
# to cancel the build.
277-
continue-on-error: true
278-
run: |
279-
if [ -f build/metrics.json ]; then
280-
METRICS=build/metrics.json
281-
elif [ -f obj/build/metrics.json ]; then
282-
METRICS=obj/build/metrics.json
283-
else
284-
echo "No metrics.json found"
285-
exit 0
286-
fi
287-
288-
# Get closest bors merge commit
289-
PARENT_COMMIT=`git rev-list --author='bors <[email protected]>' -n1 --first-parent HEAD^1`
290-
291-
./build/citool/debug/citool postprocess-metrics \
292-
--job-name ${CI_JOB_NAME} \
293-
--parent ${PARENT_COMMIT} \
294-
${METRICS} >> ${GITHUB_STEP_SUMMARY}
295-
296-
- name: upload job metrics to DataDog
297-
# This step is not critical, and if some I/O problem happens, we don't want
298-
# to cancel the build.
299-
continue-on-error: true
300-
if: needs.calculate_matrix.outputs.run_type != 'pr'
301-
env:
302-
DATADOG_API_KEY: ${{ secrets.DATADOG_API_KEY }}
303-
DD_GITHUB_JOB_NAME: ${{ matrix.full_name }}
304-
run: ./build/citool/debug/citool upload-build-metrics build/cpu-usage.csv
130+
# - name: free up disk space
131+
# run: src/ci/scripts/free-disk-space-linux.sh
132+
# if: matrix.free_disk
133+
134+
# # If we don't need to free up disk space then just report how much space we have
135+
# - name: print disk usage
136+
# run: |
137+
# echo "disk usage:"
138+
# df -h
139+
# if: matrix.free_disk == false
140+
141+
# # Rust Log Analyzer can't currently detect the PR number of a GitHub
142+
# # Actions build on its own, so a hint in the log message is needed to
143+
# # point it in the right direction.
144+
# - name: configure the PR in which the error message will be posted
145+
# run: echo "[CI_PR_NUMBER=$num]"
146+
# env:
147+
# num: ${{ github.event.number }}
148+
# if: needs.calculate_matrix.outputs.run_type == 'pr'
149+
150+
# - name: add extra environment variables
151+
# run: src/ci/scripts/setup-environment.sh
152+
# env:
153+
# # Since it's not possible to merge `${{ matrix.env }}` with the other
154+
# # variables in `job.<name>.env`, the variables defined in the matrix
155+
# # are passed to the `setup-environment.sh` script encoded in JSON,
156+
# # which then uses log commands to actually set them.
157+
# EXTRA_VARIABLES: ${{ toJson(matrix.env) }}
158+
159+
# - name: ensure the channel matches the target branch
160+
# run: src/ci/scripts/verify-channel.sh
161+
162+
# - name: collect CPU statistics
163+
# run: src/ci/scripts/collect-cpu-stats.sh
164+
165+
# - name: show the current environment
166+
# run: src/ci/scripts/dump-environment.sh
167+
168+
# - name: install awscli
169+
# run: src/ci/scripts/install-awscli.sh
170+
171+
# - name: install sccache
172+
# run: src/ci/scripts/install-sccache.sh
173+
174+
# - name: select Xcode
175+
# run: src/ci/scripts/select-xcode.sh
176+
177+
# - name: install clang
178+
# run: src/ci/scripts/install-clang.sh
179+
180+
# - name: install tidy
181+
# run: src/ci/scripts/install-tidy.sh
182+
183+
# - name: install WIX
184+
# run: src/ci/scripts/install-wix.sh
185+
186+
# - name: disable git crlf conversion
187+
# run: src/ci/scripts/disable-git-crlf-conversion.sh
188+
189+
# - name: checkout submodules
190+
# run: src/ci/scripts/checkout-submodules.sh
191+
192+
# - name: install MinGW
193+
# run: src/ci/scripts/install-mingw.sh
194+
195+
# - name: install ninja
196+
# run: src/ci/scripts/install-ninja.sh
197+
198+
# - name: enable ipv6 on Docker
199+
# # Don't run on codebuild because systemctl is not available
200+
# if: ${{ !matrix.codebuild }}
201+
# run: src/ci/scripts/enable-docker-ipv6.sh
202+
203+
# # Disable automatic line ending conversion (again). On Windows, when we're
204+
# # installing dependencies, something switches the git configuration directory or
205+
# # re-enables autocrlf. We've not tracked down the exact cause -- and there may
206+
# # be multiple -- but this should ensure submodules are checked out with the
207+
# # appropriate line endings.
208+
# - name: disable git crlf conversion
209+
# run: src/ci/scripts/disable-git-crlf-conversion.sh
210+
211+
# - name: ensure line endings are correct
212+
# run: src/ci/scripts/verify-line-endings.sh
213+
214+
# - name: ensure backported commits are in upstream branches
215+
# run: src/ci/scripts/verify-backported-commits.sh
216+
217+
# - name: ensure the stable version number is correct
218+
# run: src/ci/scripts/verify-stable-version-number.sh
219+
220+
# # Show the environment just before we run the build
221+
# # This makes it easier to diagnose problems with the above install scripts.
222+
# - name: show the current environment
223+
# run: src/ci/scripts/dump-environment.sh
224+
225+
# # Pre-build citool before the following step uninstalls rustup
226+
# # Build it into the build directory, to avoid modifying sources
227+
# - name: build citool
228+
# run: |
229+
# cd src/ci/citool
230+
# CARGO_INCREMENTAL=0 CARGO_TARGET_DIR=../../../build/citool cargo build
231+
232+
# - name: run the build
233+
# run: |
234+
# set +e
235+
# # Redirect stderr to stdout to avoid reordering the two streams in the GHA logs.
236+
# src/ci/scripts/run-build-from-ci.sh 2>&1
237+
# STATUS=$?
238+
# set -e
239+
240+
# if [[ "$STATUS" -ne 0 && -n "$CI_JOB_DOC_URL" ]]; then
241+
# echo "****************************************************************************"
242+
# echo "To find more information about this job, visit the following URL:"
243+
# echo "$CI_JOB_DOC_URL"
244+
# echo "****************************************************************************"
245+
# fi
246+
# exit ${STATUS}
247+
# env:
248+
# AWS_ACCESS_KEY_ID: ${{ secrets.CACHES_AWS_ACCESS_KEY_ID }}
249+
# AWS_SECRET_ACCESS_KEY: ${{ secrets.CACHES_AWS_SECRET_ACCESS_KEY }}
250+
251+
# - name: create github artifacts
252+
# run: src/ci/scripts/create-doc-artifacts.sh
253+
254+
# - name: print disk usage
255+
# run: |
256+
# echo "disk usage:"
257+
# df -h
258+
259+
# - name: upload artifacts to github
260+
# uses: actions/upload-artifact@v4
261+
# with:
262+
# # name is set in previous step
263+
# name: ${{ env.DOC_ARTIFACT_NAME }}
264+
# path: obj/artifacts/doc
265+
# if-no-files-found: ignore
266+
# retention-days: 5
267+
268+
# - name: upload artifacts to S3
269+
# run: src/ci/scripts/upload-artifacts.sh
270+
# env:
271+
# AWS_ACCESS_KEY_ID: ${{ secrets.ARTIFACTS_AWS_ACCESS_KEY_ID }}
272+
# AWS_SECRET_ACCESS_KEY: ${{ secrets.ARTIFACTS_AWS_SECRET_ACCESS_KEY }}
273+
# # Adding a condition on DEPLOY=1 or DEPLOY_ALT=1 is not needed as all deploy
274+
# # builders *should* have the AWS credentials available. Still, explicitly
275+
# # adding the condition is helpful as this way CI will not silently skip
276+
# # deploying artifacts from a dist builder if the variables are misconfigured,
277+
# # erroring about invalid credentials instead.
278+
# if: github.event_name == 'push' || env.DEPLOY == '1' || env.DEPLOY_ALT == '1'
279+
280+
# - name: postprocess metrics into the summary
281+
# # This step is not critical, and if some I/O problem happens, we don't want
282+
# # to cancel the build.
283+
# continue-on-error: true
284+
# run: |
285+
# if [ -f build/metrics.json ]; then
286+
# METRICS=build/metrics.json
287+
# elif [ -f obj/build/metrics.json ]; then
288+
# METRICS=obj/build/metrics.json
289+
# else
290+
# echo "No metrics.json found"
291+
# exit 0
292+
# fi
293+
294+
# # Get closest bors merge commit
295+
# PARENT_COMMIT=`git rev-list --author='bors <[email protected]>' -n1 --first-parent HEAD^1`
296+
297+
# ./build/citool/debug/citool postprocess-metrics \
298+
# --job-name ${CI_JOB_NAME} \
299+
# --parent ${PARENT_COMMIT} \
300+
# ${METRICS} >> ${GITHUB_STEP_SUMMARY}
301+
302+
# - name: upload job metrics to DataDog
303+
# # This step is not critical, and if some I/O problem happens, we don't want
304+
# # to cancel the build.
305+
# continue-on-error: true
306+
# if: needs.calculate_matrix.outputs.run_type != 'pr'
307+
# env:
308+
# DATADOG_API_KEY: ${{ secrets.DATADOG_API_KEY }}
309+
# DD_GITHUB_JOB_NAME: ${{ matrix.full_name }}
310+
# run: ./build/citool/debug/citool upload-build-metrics build/cpu-usage.csv
305311

306312
# This job isused to tell bors the final status of the build, as there is no practical way to detect
307313
# when a workflow is successful listening to webhooks only in our current bors implementation (homu).

0 commit comments

Comments
 (0)