Compare commits

...
17 Commits
Author SHA1 Message Date
dtolnay 0b56206106 toolchain: 1.84.1 2026-08-04 21:31:10 -07:00
dtolnayandGitHub 6c977a6ca4 Merge pull request #182 from dtolnay/name
Render better step names
2026-08-04 21:30:51 -07:00
dtolnay f3510ffd6c Render better step names 2026-08-04 21:29:01 -07:00
dtolnay 2c7215f132 Add 1.97.1 patch release 2026-07-16 09:35:07 -07:00
dtolnay fa04a1451f Add 1.96.1 patch release 2026-06-30 08:43:18 -07:00
dtolnay 67ef31d5b9 Update actions/checkout@v6 -> v7 2026-06-20 15:19:44 -07:00
dtolnay 3c5f7ea28c Add 1.94.1 patch release 2026-03-27 08:55:47 -07:00
dtolnay efa25f7f19 Add 1.93.1 patch release 2026-02-12 18:46:30 -08:00
dtolnayandGitHub f7ccc83f9e Merge pull request #177 from dtolnay/permitcopyrename
Permit cross-device copy
2025-12-16 09:11:34 -08:00
dtolnay 1c0547fbe5 Permit cross-device copy 2025-12-16 09:04:42 -08:00
dtolnay 0b1efabc08 Update actions/checkout@v5 -> v6 2025-11-20 10:02:43 -08:00
dtolnay 0f44b27771 Add 1.91.1 patch release 2025-11-10 14:29:12 -08:00
dtolnayandGitHub 6d653acede Merge pull request #171 from dtolnay/up
Update Linux arm64 runner to Ubuntu 24.04
2025-09-16 11:37:40 -07:00
dtolnay 30dc51db75 Update Linux arm64 runner to Ubuntu 24.04 2025-09-16 11:34:54 -07:00
dtolnay e97e2d8cc3 Update actions/checkout@v4 -> v5 2025-08-22 18:20:49 -07:00
dtolnayandGitHub 3bd6ba104c Merge pull request #168 from dtolnay/sed
Fix update-revs.sh to recognize only the intended `required: true`
2025-08-22 18:08:04 -07:00
dtolnay 0185c06042 Fix update-revs.sh to recognize only the intended required: true 2025-08-22 18:03:43 -07:00
4 changed files with 30 additions and 29 deletions
+2 -2
View File
@@ -17,14 +17,14 @@ jobs:
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
os: [ubuntu-latest, macos-latest, windows-latest, windows-11-arm, ubuntu-22.04-arm] os: [ubuntu-latest, macos-latest, windows-latest, windows-11-arm, ubuntu-24.04-arm]
rust: [nightly, beta, stable, 1.62.0, stable 18 months ago, stable minus 8 releases] rust: [nightly, beta, stable, 1.62.0, stable 18 months ago, stable minus 8 releases]
include: include:
- os: ubuntu-latest - os: ubuntu-latest
rust: 1.0.0 rust: 1.0.0
timeout-minutes: 45 timeout-minutes: 45
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v7
- uses: ./ - uses: ./
name: Run dtolnay/rust-toolchain${{contains(matrix.rust, ' ') && ' for ' || '@'}}${{matrix.rust}} name: Run dtolnay/rust-toolchain${{contains(matrix.rust, ' ') && ' for ' || '@'}}${{matrix.rust}}
id: toolchain id: toolchain
+1 -1
View File
@@ -16,7 +16,7 @@ jobs:
name: cargo test name: cargo test
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v7
- uses: dtolnay/rust-toolchain@stable - uses: dtolnay/rust-toolchain@stable
- run: cargo test --all-features - run: cargo test --all-features
``` ```
+25 -24
View File
@@ -6,9 +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: true
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
@@ -31,9 +28,10 @@ runs:
using: composite using: composite
steps: steps:
- id: parse - id: parse
name: Parse toolchain version
run: | run: |
: parse toolchain version
if [[ -z $toolchain ]]; then if [[ -z $toolchain ]]; then
# GitHub does not enforce `required: true` inputs itself. https://github.com/actions/runner/issues/1070
echo "'toolchain' is a required input" >&2 echo "'toolchain' is a required input" >&2
exit 1 exit 1
elif [[ $toolchain =~ ^stable' '[0-9]+' '(year|month|week|day)s?' 'ago$ ]]; then elif [[ $toolchain =~ ^stable' '[0-9]+' '(year|month|week|day)s?' 'ago$ ]]; then
@@ -50,12 +48,12 @@ runs:
echo "toolchain=$toolchain" >> $GITHUB_OUTPUT echo "toolchain=$toolchain" >> $GITHUB_OUTPUT
fi fi
env: env:
toolchain: ${{inputs.toolchain}} toolchain: 1.84.1
shell: bash shell: bash
- id: flags - id: flags
name: Construct rustup command line
run: | run: |
: 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=${{steps.parse.outputs.toolchain == 'nightly' && inputs.components && ' --allow-downgrade' || ''}}" >> $GITHUB_OUTPUT echo "downgrade=${{steps.parse.outputs.toolchain == 'nightly' && inputs.components && ' --allow-downgrade' || ''}}" >> $GITHUB_OUTPUT
@@ -64,13 +62,12 @@ runs:
components: ${{inputs.components}} components: ${{inputs.components}}
shell: bash shell: bash
- run: | - name: Set $CARGO_HOME
: set $CARGO_HOME run: echo CARGO_HOME=${CARGO_HOME:-"${{runner.os == 'Windows' && '$USERPROFILE\.cargo' || '$HOME/.cargo'}}"} >> $GITHUB_ENV
echo CARGO_HOME=${CARGO_HOME:-"${{runner.os == 'Windows' && '$USERPROFILE\.cargo' || '$HOME/.cargo'}}"} >> $GITHUB_ENV
shell: bash shell: bash
- run: | - name: Install rustup if needed
: install rustup if needed run: |
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/bin" >> $GITHUB_PATH echo "$CARGO_HOME/bin" >> $GITHUB_PATH
@@ -78,8 +75,8 @@ runs:
if: runner.os != 'Windows' if: runner.os != 'Windows'
shell: bash shell: bash
- run: | - name: Install rustup if needed on windows
: install rustup if needed on windows run: |
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://win.rustup.rs/${{runner.arch == 'ARM64' && 'aarch64' || 'x86_64'}} --output '${{runner.temp}}\rustup-init.exe' curl --proto '=https' --tlsv1.2 --retry 10 --retry-connrefused --location --silent --show-error --fail https://win.rustup.rs/${{runner.arch == 'ARM64' && 'aarch64' || 'x86_64'}} --output '${{runner.temp}}\rustup-init.exe'
'${{runner.temp}}\rustup-init.exe' --default-toolchain none --no-modify-path -y '${{runner.temp}}\rustup-init.exe' --default-toolchain none --no-modify-path -y
@@ -90,36 +87,39 @@ runs:
- name: rustup toolchain install ${{steps.parse.outputs.toolchain}} - 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 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 shell: bash
- run: rustup default ${{steps.parse.outputs.toolchain}} - name: rustup default ${{steps.parse.outputs.toolchain}}
run: rustup default ${{steps.parse.outputs.toolchain}}
shell: bash shell: bash
continue-on-error: true # https://github.com/dtolnay/rust-toolchain/issues/127 continue-on-error: true # https://github.com/dtolnay/rust-toolchain/issues/127
- id: rustc-version - id: rustc-version
name: Create cachekey
run: | run: |
: create cachekey
DATE=$(rustc +${{steps.parse.outputs.toolchain}} --version --verbose | sed -ne 's/^commit-date: \(20[0-9][0-9]\)-\([01][0-9]\)-\([0-3][0-9]\)$/\1\2\3/p') DATE=$(rustc +${{steps.parse.outputs.toolchain}} --version --verbose | sed -ne 's/^commit-date: \(20[0-9][0-9]\)-\([01][0-9]\)-\([0-3][0-9]\)$/\1\2\3/p')
HASH=$(rustc +${{steps.parse.outputs.toolchain}} --version --verbose | sed -ne 's/^commit-hash: //p') HASH=$(rustc +${{steps.parse.outputs.toolchain}} --version --verbose | sed -ne 's/^commit-hash: //p')
echo "cachekey=$(echo $DATE$HASH | head -c12)" >> $GITHUB_OUTPUT echo "cachekey=$(echo $DATE$HASH | head -c12)" >> $GITHUB_OUTPUT
shell: bash shell: bash
- run: | - name: Disable incremental compilation
: disable incremental compilation run: |
if [ -z "${CARGO_INCREMENTAL+set}" ]; then if [ -z "${CARGO_INCREMENTAL+set}" ]; then
echo CARGO_INCREMENTAL=0 >> $GITHUB_ENV echo CARGO_INCREMENTAL=0 >> $GITHUB_ENV
fi fi
shell: bash shell: bash
- run: | - name: Enable colors in Cargo output
: enable colors in Cargo output run: |
if [ -z "${CARGO_TERM_COLOR+set}" ]; then if [ -z "${CARGO_TERM_COLOR+set}" ]; then
echo CARGO_TERM_COLOR=always >> $GITHUB_ENV echo CARGO_TERM_COLOR=always >> $GITHUB_ENV
fi fi
shell: bash shell: bash
- run: | - name: Enable Cargo sparse registry
: enable Cargo sparse registry run: |
# implemented in 1.66, stabilized in 1.68, made default in 1.70 # implemented in 1.66, stabilized in 1.68, made default in 1.70
if [ -z "${CARGO_REGISTRIES_CRATES_IO_PROTOCOL+set}" -o -f "${{runner.temp}}"/.implicit_cargo_registries_crates_io_protocol ]; then if [ -z "${CARGO_REGISTRIES_CRATES_IO_PROTOCOL+set}" -o -f "${{runner.temp}}"/.implicit_cargo_registries_crates_io_protocol ]; then
if rustc +${{steps.parse.outputs.toolchain}} --version --verbose | grep -q '^release: 1\.6[89]\.'; then if rustc +${{steps.parse.outputs.toolchain}} --version --verbose | grep -q '^release: 1\.6[89]\.'; then
@@ -132,13 +132,14 @@ runs:
fi fi
shell: bash shell: bash
- run: | - name: Work around spurious network errors in curl 8.0
: work around spurious network errors in curl 8.0 run: |
# https://rust-lang.zulipchat.com/#narrow/stream/246057-t-cargo/topic/timeout.20investigation # https://rust-lang.zulipchat.com/#narrow/stream/246057-t-cargo/topic/timeout.20investigation
if rustc +${{steps.parse.outputs.toolchain}} --version --verbose | grep -q '^release: 1\.7[01]\.'; then if rustc +${{steps.parse.outputs.toolchain}} --version --verbose | grep -q '^release: 1\.7[01]\.'; then
echo CARGO_HTTP_MULTIPLEXING=false >> $GITHUB_ENV echo CARGO_HTTP_MULTIPLEXING=false >> $GITHUB_ENV
fi fi
shell: bash shell: bash
- run: rustc +${{steps.parse.outputs.toolchain}} --version --verbose - name: rustc +${{steps.parse.outputs.toolchain}} --version --verbose
run: rustc +${{steps.parse.outputs.toolchain}} --version --verbose
shell: bash shell: bash
+2 -2
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.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.74.1 1.77.1 1.77.2 1.80.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.84.1 1.85.1 1.91.1 1.93.1 1.94.1 1.96.1 1.97.1
) )
releases() { releases() {
@@ -33,7 +33,7 @@ for rev in `releases` stable beta nightly; do
if [[ $rev == 1* ]]; then if [[ $rev == 1* ]]; then
sed -i "/^ toolchain:/,+2d; s/\${{inputs\.toolchain}}/$rev/" action.yml sed -i "/^ toolchain:/,+2d; s/\${{inputs\.toolchain}}/$rev/" action.yml
else 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 fi
git add action.yml git add action.yml
git commit --quiet --message "toolchain: $rev" git commit --quiet --message "toolchain: $rev"