forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of rust-lang#65274 - pietroalbini:ci-upload-toolstate, r…
…=alexcrichton Upload toolstates.json to rust-lang-ci2 This PR does two things: * Following up with rust-lang#65202, it migrates deploying artifacts to CI in a script. Both uploading release artifacts and CPU stats were merged into the same script, designing it to be easily extended. * Uploads the toolstate JSON to `rust-lang-ci2` along with the release artifacts, both for Linux and Windows. This is needed because @RalfJung wants to stop shipping MIRI when its tests are failing, and the toolstate repo doesn't have entries for each commit. Having the toolstate data (just for that specific commit) on `rust-lang-ci2` will simplify the code a lot. r? @alexcrichton cc @RalfJung
- Loading branch information
Showing
4 changed files
with
61 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
#!/bin/bash | ||
# Upload all the artifacts to our S3 bucket. All the files inside ${upload_dir} | ||
# will be uploaded to the deploy bucket and eventually signed and released in | ||
# static.rust-lang.org. | ||
|
||
set -euo pipefail | ||
IFS=$'\n\t' | ||
|
||
source "$(cd "$(dirname "$0")" && pwd)/../shared.sh" | ||
|
||
upload_dir="$(mktemp -d)" | ||
|
||
# Release tarballs produced by a dist builder. | ||
if [[ "${DEPLOY-0}" -eq "1" ]] || [[ "${DEPLOY_ALT-0}" -eq "1" ]]; then | ||
dist_dir=build/dist | ||
if isLinux; then | ||
dist_dir=obj/build/dist | ||
fi | ||
rm -rf "${dist_dir}/doc" | ||
cp -r "${dist_dir}"/* "${upload_dir}" | ||
fi | ||
|
||
# CPU usage statistics. | ||
cp cpu-usage.csv "${upload_dir}/cpu-${CI_JOB_NAME}.csv" | ||
|
||
# Toolstate data. | ||
if [[ -n "${DEPLOY_TOOLSTATES_JSON+x}" ]]; then | ||
cp /tmp/toolstates.json "${upload_dir}/${DEPLOY_TOOLSTATES_JSON}" | ||
fi | ||
|
||
echo "Files that will be uploaded:" | ||
ls -lah "${upload_dir}" | ||
echo | ||
|
||
deploy_dir="rustc-builds" | ||
if [[ "${DEPLOY_ALT-0}" -eq "1" ]]; then | ||
deploy_dir="rustc-builds-alt" | ||
fi | ||
deploy_url="s3://${DEPLOY_BUCKET}/${deploy_dir}/$(ciCommit)" | ||
|
||
retry aws s3 cp --no-progress --recursive --acl public-read "${upload_dir}" "${deploy_url}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters