Compare commits

..

1 Commits

Author SHA1 Message Date
David Tolnay
e763ec4895 Restore comment as not a comment 2025-08-22 17:57:51 -07:00
4 changed files with 10 additions and 9 deletions

View File

@@ -17,14 +17,14 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest, windows-11-arm, ubuntu-24.04-arm]
os: [ubuntu-latest, macos-latest, windows-latest, windows-11-arm, ubuntu-22.04-arm]
rust: [nightly, beta, stable, 1.62.0, stable 18 months ago, stable minus 8 releases]
include:
- os: ubuntu-latest
rust: 1.0.0
timeout-minutes: 45
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v4
- uses: ./
name: Run dtolnay/rust-toolchain${{contains(matrix.rust, ' ') && ' for ' || '@'}}${{matrix.rust}}
id: toolchain

View File

@@ -16,7 +16,7 @@ jobs:
name: cargo test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- run: cargo test --all-features
```

View File

@@ -6,6 +6,9 @@ branding:
color: purple
inputs:
toolchain:
description: Rust toolchain specification -- see https://rust-lang.github.io/rustup/concepts/toolchains.html#toolchain-specification
required: true
targets:
description: Comma-separated list of target triples to install for this toolchain
required: false
@@ -31,7 +34,7 @@ runs:
run: |
: parse toolchain version
if [[ -z $toolchain ]]; then
# GitHub does not enforce `required: true` inputs itself. https://github.com/actions/runner/issues/1070
: GitHub does not enforce 'required: true' inputs itself. https://github.com/actions/runner/issues/1070
echo "'toolchain' is a required input" >&2
exit 1
elif [[ $toolchain =~ ^stable' '[0-9]+' '(year|month|week|day)s?' 'ago$ ]]; then
@@ -48,7 +51,7 @@ runs:
echo "toolchain=$toolchain" >> $GITHUB_OUTPUT
fi
env:
toolchain: 1.5.0
toolchain: ${{inputs.toolchain}}
shell: bash
- id: flags
@@ -88,8 +91,6 @@ runs:
- name: rustup toolchain install ${{steps.parse.outputs.toolchain}}
run: rustup toolchain install ${{steps.parse.outputs.toolchain}}${{steps.flags.outputs.targets}}${{steps.flags.outputs.components}} --profile minimal${{steps.flags.outputs.downgrade}} --no-self-update
env:
RUSTUP_PERMIT_COPY_RENAME: 1
shell: bash
- run: rustup default ${{steps.parse.outputs.toolchain}}

View File

@@ -11,7 +11,7 @@ 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.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.74.1 1.77.1 1.77.2 1.80.1
1.84.1 1.85.1 1.91.1 1.93.1 1.94.1
1.84.1 1.85.1
)
releases() {
@@ -33,7 +33,7 @@ for rev in `releases` stable beta nightly; do
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
sed -i "s/required: true/required: false\n default: $rev/" action.yml
fi
git add action.yml
git commit --quiet --message "toolchain: $rev"