Merge pull request #2 from will-bank/1.90

Sync 1.90
This commit is contained in:
Alefh Sousa 2025-11-04 23:39:26 -03:00 committed by GitHub
commit 74ed3f78d0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 17 additions and 16 deletions

View file

@ -6,10 +6,6 @@ branding:
color: purple color: purple
inputs: inputs:
toolchain:
description: Rust toolchain specification -- see https://rust-lang.github.io/rustup/concepts/toolchains.html#toolchain-specification
required: false
default: 1.80.0
targets: targets:
description: Comma-separated list of target triples to install for this toolchain description: Comma-separated list of target triples to install for this toolchain
required: false required: false
@ -46,7 +42,7 @@ runs:
echo "toolchain=$toolchain" >> $GITHUB_OUTPUT echo "toolchain=$toolchain" >> $GITHUB_OUTPUT
fi fi
env: env:
toolchain: ${{inputs.toolchain}} toolchain: 1.90.0
shell: bash shell: bash
- id: flags - id: flags
@ -54,17 +50,22 @@ runs:
: construct rustup command line : construct rustup command line
echo "targets=$(for t in ${targets//,/ }; do echo -n ' --target' $t; done)" >> $GITHUB_OUTPUT echo "targets=$(for t in ${targets//,/ }; do echo -n ' --target' $t; done)" >> $GITHUB_OUTPUT
echo "components=$(for c in ${components//,/ }; do echo -n ' --component' $c; done)" >> $GITHUB_OUTPUT echo "components=$(for c in ${components//,/ }; do echo -n ' --component' $c; done)" >> $GITHUB_OUTPUT
echo "downgrade=${{inputs.toolchain == 'nightly' && inputs.components && ' --allow-downgrade' || ''}}" >> $GITHUB_OUTPUT echo "downgrade=${{steps.parse.outputs.toolchain == 'nightly' && inputs.components && ' --allow-downgrade' || ''}}" >> $GITHUB_OUTPUT
env: env:
targets: ${{inputs.targets || inputs.target || ''}} targets: ${{inputs.targets || inputs.target || ''}}
components: ${{inputs.components}} components: ${{inputs.components}}
shell: bash shell: bash
- run: |
: set $CARGO_HOME
echo CARGO_HOME=${CARGO_HOME:-${{runner.os == 'Windows' && '$USERPROFILE' || '$HOME'}}/.cargo} >> $GITHUB_ENV
shell: bash
- run: | - run: |
: install rustup if needed : install rustup if needed
if ! command -v rustup &>/dev/null; then if ! command -v rustup &>/dev/null; then
curl --proto '=https' --tlsv1.2 --retry 10 --retry-connrefused --location --silent --show-error --fail "https://sh.rustup.rs" | sh -s -- --default-toolchain none -y curl --proto '=https' --tlsv1.2 --retry 10 --retry-connrefused --location --silent --show-error --fail "https://sh.rustup.rs" | sh -s -- --default-toolchain none -y
echo "${CARGO_HOME:-$HOME/.cargo}/bin" >> $GITHUB_PATH echo "$CARGO_HOME/bin" >> $GITHUB_PATH
fi fi
if: runner.os != 'Windows' if: runner.os != 'Windows'
shell: bash shell: bash

View file

@ -10,11 +10,11 @@ fi
patch_releases=( patch_releases=(
1.12.1 1.15.1 1.22.1 1.24.1 1.26.1 1.26.2 1.27.1 1.27.2 1.29.1 1.29.2 1.30.1 1.12.1 1.15.1 1.22.1 1.24.1 1.26.1 1.26.2 1.27.1 1.27.2 1.29.1 1.29.2 1.30.1
1.31.1 1.34.1 1.34.2 1.41.1 1.43.1 1.44.1 1.45.1 1.45.2 1.52.1 1.56.1 1.58.1 1.31.1 1.34.1 1.34.2 1.41.1 1.43.1 1.44.1 1.45.1 1.45.2 1.52.1 1.56.1 1.58.1
1.62.1 1.66.1 1.67.1 1.68.1 1.68.2 1.71.1 1.72.1 1.62.1 1.66.1 1.67.1 1.68.1 1.68.2 1.71.1 1.72.1 1.74.1 1.77.1 1.77.2
) )
releases() { releases() {
printf "%s\n" 1.{0..80}.0 ${patch_releases[@]} | sort -V printf "%s\n" 1.{0..90}.0 ${patch_releases[@]} | sort -V
} }
base=$(git rev-parse HEAD) base=$(git rev-parse HEAD)
@ -29,7 +29,11 @@ for rev in `releases` stable beta nightly; do
echo "Updating $rev branch" echo "Updating $rev branch"
git checkout --quiet "$base" git checkout --quiet "$base"
git branch --quiet --delete --force $rev &>/dev/null || true git branch --quiet --delete --force $rev &>/dev/null || true
sed -i "s/required: true/required: false\n default: $rev/" action.yml if [[ $rev == 1* ]]; then
sed -i "/^ toolchain:/,+2d; s/\${{inputs\.toolchain}}/$rev/" action.yml
else
sed -i "s/required: true/required: false\n default: $rev/" action.yml
fi
git add action.yml git add action.yml
git commit --quiet --message "toolchain: $rev" git commit --quiet --message "toolchain: $rev"
git checkout --quiet -b $rev git checkout --quiet -b $rev
@ -43,12 +47,8 @@ for tool in clippy miri; do
echo "Updating $tool branch" echo "Updating $tool branch"
git checkout --quiet --detach nightly git checkout --quiet --detach nightly
git branch --quiet --delete --force $tool &>/dev/null || true git branch --quiet --delete --force $tool &>/dev/null || true
if [ $tool == miri ]; then default=$tool
default="miri, rust-src" if [ $tool == miri ]; then default+=,\ rust-src; fi
echo -e " - uses: dtolnay/install@xargo\n with:\n bin: xargo-check" >> action.yml
else
default=$tool
fi
sed -i "/required: false/{N;s/\n$/\n default: $default\n/}" action.yml sed -i "/required: false/{N;s/\n$/\n default: $default\n/}" action.yml
git add action.yml git add action.yml
git commit --quiet --message "components: $tool" git commit --quiet --message "components: $tool"