Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement release process for rustup #84

Draft
wants to merge 28 commits into
base: master
Choose a base branch
from
Draft
Changes from 1 commit
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
00e1a90
Fix error message when parsing actions
jdno May 20, 2024
0a64d25
Create action for rustup
jdno May 20, 2024
8d4a447
Implement release process for rustup
jdno May 22, 2024
d40ff45
Extract channel check for Rustup into function
jdno Jun 27, 2024
b803170
Get latest commit from Rustup's stable branch
jdno Jun 27, 2024
da3164d
Fetch next Rustup version from GitHub
jdno Jun 27, 2024
49980a3
Download Rustup artifacts for a given commit
jdno Jun 27, 2024
c4cff77
Pass Rustup version to archive and manifest
jdno Jun 27, 2024
7ccff04
Update documentation for Rustup release process
jdno Jun 27, 2024
ede844c
Refactor run script to execute different local releases
jdno Sep 24, 2024
1e516af
Support other platforms than Linux
jdno Sep 25, 2024
b1dd2a2
Download Rustup files from CDN
jdno Oct 1, 2024
b843e51
Build promote-release inside the container if necessary
jdno Oct 1, 2024
f5c3c5e
Get download path from config
jdno Oct 1, 2024
a947033
Fix upload directory
jdno Oct 1, 2024
883b5ed
Get version from user-provided commit
jdno Oct 1, 2024
ad86e13
Don't require GitHub credentials to fetch Rustup metadata
jdno Oct 1, 2024
694e3a4
Create rustup-builds bucket in local environment
jdno Oct 1, 2024
8132d69
Fix upload destination for Rustup archives
jdno Oct 1, 2024
89f7324
Fix upload destination for stable Rustup release
jdno Oct 1, 2024
f82d531
Fix upload destination for Rustup manifest
jdno Oct 1, 2024
9b7dba8
Configure environment to run Rustup releases locally
jdno Oct 1, 2024
5aad90d
Set up CI workflows for refactored actions
jdno Oct 1, 2024
a52f975
Fix required jobs for deployments
jdno Oct 1, 2024
839b35d
Merge branch 'master' into promote-rustup
jdno Oct 2, 2024
ad0c357
Fix unnecessary borrow warnings
jdno Oct 3, 2024
fd3f06d
Cut beta releases for Rustup from the stable branch
jdno Oct 3, 2024
a3a0d89
Allow Rustup version to be overridden in tests
jdno Oct 8, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Download Rustup files from CDN
jdno committed Oct 1, 2024
commit b1dd2a2c21f86cde5a6877d1bb35e0dea9b8ee34
48 changes: 48 additions & 0 deletions local/rustup.sh
Original file line number Diff line number Diff line change
@@ -6,3 +6,51 @@

set -euo pipefail
IFS=$'\n\t'

RUSTUP_REPO="https://github.com/rust-lang/rustup"
RUSTUP_DEFAULT_BRANCH="master"

# S3 bucket from which to download the Rustup artifacts
S3_BUCKET="rustup-builds"

# CDN from which to download the CI artifacts
DOWNLOAD_BASE="https://rustup-builds.rust-lang.org"

# The artifacts for the following targets will be downloaded and copied during
# the release process. At least one target is required.
DOWNLOAD_TARGETS=(
"x86_64-unknown-linux-gnu"
)

# The following files will be downloaded and put into the local MinIO instance.
DOWNLOAD_FILES=(
"rustup-init"
"rustup-init.sha256"
"rustup-setup"
"rustup-setup.sha256"
)

channel="$1"
override_commit="$2"

if [[ "${override_commit}" = "" ]]; then
echo "==> detecting the last Rustup commit on the default branch"
commit="$(git ls-remote "${RUSTUP_REPO}" | grep "refs/heads/${RUSTUP_DEFAULT_BRANCH}" | awk '{print($1)}')"
else
echo "=>> using overridden commit ${override_commit}"
commit="${override_commit}"
fi

for target in "${DOWNLOAD_TARGETS[@]}"; do
if ! mc stat "local/artifacts/builds/${commit}/dist/${target}" >/dev/null 2>&1; then
echo "==> copying ${target} from S3"

for file in "${DOWNLOAD_FILES[@]}"; do
if curl -Lo /tmp/component "${DOWNLOAD_BASE}/${commit}/dist/${target}/${file}" --fail; then
mc cp /tmp/component "local/artifacts/builds/${commit}/dist/${target}/${file}" >/dev/null
fi
done
else
echo "==> reusing cached ${target} target"
fi
done