From 0d263d75b1c7a659d0761ac94e7689cea2c60489 Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Sat, 24 Jun 2023 16:26:12 -0700 Subject: [PATCH 01/18] Omit CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse on rustc 1.70+ --- action.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/action.yml b/action.yml index 68bd1d6..09df7ac 100644 --- a/action.yml +++ b/action.yml @@ -99,12 +99,13 @@ runs: - run: | : enable Cargo sparse registry - # except on 1.66 and 1.67, on which it is unstable + # 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 - touch "${{runner.temp}}"/.implicit_cargo_registries_crates_io_protocol || true - if rustc +${{steps.parse.outputs.toolchain}} --version --verbose | (! grep -q '^release: 1\.6[67]\.'); then + if rustc +${{steps.parse.outputs.toolchain}} --version --verbose | grep -q '^release: 1\.6[89]\.'; then + touch "${{runner.temp}}"/.implicit_cargo_registries_crates_io_protocol || true echo CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse >> $GITHUB_ENV - else + elif rustc +${{steps.parse.outputs.toolchain}} --version --verbose | grep -q '^release: 1\.6[67]\.'; then + touch "${{runner.temp}}"/.implicit_cargo_registries_crates_io_protocol || true echo CARGO_REGISTRIES_CRATES_IO_PROTOCOL=git >> $GITHUB_ENV fi fi From f361669954a8ecfc00a3443f35f9ac8e610ffc06 Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Thu, 3 Aug 2023 16:14:37 -0700 Subject: [PATCH 02/18] Add 1.71.1 patch release https://blog.rust-lang.org/2023/08/03/Rust-1.71.1.html --- scripts/update-revs.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/update-revs.sh b/scripts/update-revs.sh index 843caa5..897e051 100755 --- a/scripts/update-revs.sh +++ b/scripts/update-revs.sh @@ -10,7 +10,7 @@ fi 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.62.1 1.66.1 1.67.1 1.68.1 1.68.2 1.71.1 ) releases() { From 7a26acb92768ab3675ddfe846a5b2f438c85f215 Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Mon, 4 Sep 2023 22:35:00 -0700 Subject: [PATCH 03/18] Update actions/checkout@v3 -> v4 --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 044c008..39b7cef 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,7 +24,7 @@ jobs: rust: 1.0.0 timeout-minutes: 45 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: ./ name: Run dtolnay/rust-toolchain${{contains(matrix.rust, ' ') && ' for ' || '@'}}${{matrix.rust}} id: toolchain From 6f2eb0d01b1f33e59305ffec1af29a3b1e88285b Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Thu, 7 Sep 2023 13:19:27 -0700 Subject: [PATCH 04/18] Work around spurious network errors in curl 8.0 --- action.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/action.yml b/action.yml index 09df7ac..03aef0d 100644 --- a/action.yml +++ b/action.yml @@ -111,5 +111,13 @@ runs: fi shell: bash + - run: | + : work around spurious network errors in curl 8.0 + # 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 + echo CARGO_HTTP_MULTIPLEXING=false >> $GITHUB_ENV + fi + shell: bash + - run: rustc +${{steps.parse.outputs.toolchain}} --version --verbose shell: bash From 07e430b4aa2846d5b8fc6b7ef8db8d0a19266ec4 Mon Sep 17 00:00:00 2001 From: Monius Date: Mon, 18 Sep 2023 02:00:52 +0800 Subject: [PATCH 05/18] Update doc actions/checkout@v3 -> v4 --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 86f4262..2ea5437 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ jobs: name: cargo test runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@stable - run: cargo test --all-features ``` From 439cf607258077187679211f12aa6f19af4a0af7 Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Tue, 19 Sep 2023 08:31:34 -0700 Subject: [PATCH 06/18] Add 1.72.1 patch release --- scripts/update-revs.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/update-revs.sh b/scripts/update-revs.sh index 897e051..4cd3ae5 100755 --- a/scripts/update-revs.sh +++ b/scripts/update-revs.sh @@ -10,7 +10,7 @@ fi 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.62.1 1.66.1 1.67.1 1.68.1 1.68.2 1.71.1 1.72.1 ) releases() { From be73d7920c329f220ce78e0234b8f96b7ae60248 Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Thu, 7 Dec 2023 13:22:16 -0800 Subject: [PATCH 07/18] Add 1.74.1 patch release https://blog.rust-lang.org/2023/12/07/Rust-1.74.1.html --- scripts/update-revs.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/update-revs.sh b/scripts/update-revs.sh index 4cd3ae5..ac8b08c 100755 --- a/scripts/update-revs.sh +++ b/scripts/update-revs.sh @@ -10,7 +10,7 @@ fi 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.62.1 1.66.1 1.67.1 1.68.1 1.68.2 1.71.1 1.72.1 1.74.1 ) releases() { From fdb24fea1ee63747b907b1c2b4763fc6f487b8ce Mon Sep 17 00:00:00 2001 From: Natsuki Ikeguchi Date: Sun, 31 Mar 2024 16:01:42 +0900 Subject: [PATCH 08/18] feat: Add 1.77.1 patch release Signed-off-by: Natsuki Ikeguchi --- scripts/update-revs.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/update-revs.sh b/scripts/update-revs.sh index ac8b08c..4ead809 100755 --- a/scripts/update-revs.sh +++ b/scripts/update-revs.sh @@ -10,7 +10,7 @@ fi 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.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 ) releases() { From 201ca1e35baef238da7000d1c8c9a4f06282f487 Mon Sep 17 00:00:00 2001 From: Pierre-Henri Symoneaux Date: Wed, 10 Apr 2024 14:50:27 +0200 Subject: [PATCH 09/18] Add 1.77.2 rust release --- scripts/update-revs.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/update-revs.sh b/scripts/update-revs.sh index 4ead809..c24b396 100755 --- a/scripts/update-revs.sh +++ b/scripts/update-revs.sh @@ -10,7 +10,7 @@ fi 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.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() { From c24b276127288eaf2115c7a85267e0c09a3896e4 Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Sun, 14 Apr 2024 10:48:41 -0700 Subject: [PATCH 10/18] Skip xargo installation for miri toolchain --- scripts/update-revs.sh | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/scripts/update-revs.sh b/scripts/update-revs.sh index c24b396..c251278 100755 --- a/scripts/update-revs.sh +++ b/scripts/update-revs.sh @@ -43,12 +43,8 @@ for tool in clippy miri; do echo "Updating $tool branch" git checkout --quiet --detach nightly git branch --quiet --delete --force $tool &>/dev/null || true - if [ $tool == miri ]; then - default="miri, rust-src" - echo -e " - uses: dtolnay/install@xargo\n with:\n bin: xargo-check" >> action.yml - else - default=$tool - fi + default=$tool + if [ $tool == miri ]; then default+=,\ rust-src; fi sed -i "/required: false/{N;s/\n$/\n default: $default\n/}" action.yml git add action.yml git commit --quiet --message "components: $tool" From 56909e663349f5c2547884eef716020777308425 Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Sun, 14 Apr 2024 11:33:35 -0700 Subject: [PATCH 11/18] Centralize references to inputs.toolchain to a single spot --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 03aef0d..18a2336 100644 --- a/action.yml +++ b/action.yml @@ -53,7 +53,7 @@ runs: : construct rustup command line 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 "downgrade=${{inputs.toolchain == 'nightly' && inputs.components && ' --allow-downgrade' || ''}}" >> $GITHUB_OUTPUT + echo "downgrade=${{steps.parse.outputs.toolchain == 'nightly' && inputs.components && ' --allow-downgrade' || ''}}" >> $GITHUB_OUTPUT env: targets: ${{inputs.targets || inputs.target || ''}} components: ${{inputs.components}} From bb45937a053e097f8591208d8e74c90db1873d07 Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Sun, 14 Apr 2024 12:01:00 -0700 Subject: [PATCH 12/18] Remove toolchain input when toolchain is specified in action rev --- scripts/update-revs.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/update-revs.sh b/scripts/update-revs.sh index c251278..0fbc0cf 100755 --- a/scripts/update-revs.sh +++ b/scripts/update-revs.sh @@ -29,7 +29,11 @@ for rev in `releases` stable beta nightly; do echo "Updating $rev branch" git checkout --quiet "$base" 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 commit --quiet --message "toolchain: $rev" git checkout --quiet -b $rev From 18c33afdda3f4cf7a99f3b733af3df530f90c048 Mon Sep 17 00:00:00 2001 From: Dario Curreri Date: Tue, 30 Apr 2024 10:58:18 +0200 Subject: [PATCH 13/18] Add `CARGO_HOME` to `GITHUB_ENV` --- action.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/action.yml b/action.yml index 18a2336..c63c8f0 100644 --- a/action.yml +++ b/action.yml @@ -68,6 +68,14 @@ runs: if: runner.os != 'Windows' shell: bash + - run: echo CARGO_HOME=${CARGO_HOME:-$HOME/.cargo} >> $GITHUB_ENV + if: runner.os != 'Windows' + shell: bash + + - run: echo CARGO_HOME=${CARGO_HOME:-$USERPROFILE/.cargo} >> $GITHUB_ENV + if: runner.os == 'Windows' + shell: bash + - 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 shell: bash From e4e1c59547d4ffb8ffb683416085dde74fde2e2e Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Wed, 1 May 2024 09:06:11 -0700 Subject: [PATCH 14/18] Combine CARGO_HOME choice into a single step --- action.yml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/action.yml b/action.yml index c63c8f0..b2b70d1 100644 --- a/action.yml +++ b/action.yml @@ -68,12 +68,7 @@ runs: if: runner.os != 'Windows' shell: bash - - run: echo CARGO_HOME=${CARGO_HOME:-$HOME/.cargo} >> $GITHUB_ENV - if: runner.os != 'Windows' - shell: bash - - - run: echo CARGO_HOME=${CARGO_HOME:-$USERPROFILE/.cargo} >> $GITHUB_ENV - if: runner.os == 'Windows' + - run: echo CARGO_HOME=${CARGO_HOME:-${{runner.os == 'Windows' && '$USERPROFILE' || '$HOME'}}/.cargo} >> $GITHUB_ENV shell: bash - name: rustup toolchain install ${{steps.parse.outputs.toolchain}} From 22eb75fbe04ff33393ccbf79244bf521c2f0c6bb Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Wed, 1 May 2024 09:09:04 -0700 Subject: [PATCH 15/18] Add description for CARGO_HOME step --- action.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/action.yml b/action.yml index b2b70d1..9fb35f3 100644 --- a/action.yml +++ b/action.yml @@ -68,7 +68,9 @@ runs: if: runner.os != 'Windows' shell: bash - - run: echo CARGO_HOME=${CARGO_HOME:-${{runner.os == 'Windows' && '$USERPROFILE' || '$HOME'}}/.cargo} >> $GITHUB_ENV + - run: | + : set $CARGO_HOME + echo CARGO_HOME=${CARGO_HOME:-${{runner.os == 'Windows' && '$USERPROFILE' || '$HOME'}}/.cargo} >> $GITHUB_ENV shell: bash - name: rustup toolchain install ${{steps.parse.outputs.toolchain}} From d8352f6b1d2e870bc5716e7a6d9b65c4cc244a1a Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Wed, 1 May 2024 09:11:35 -0700 Subject: [PATCH 16/18] Move CARGO_HOME step in front of rustup install --- action.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/action.yml b/action.yml index 9fb35f3..23c6000 100644 --- a/action.yml +++ b/action.yml @@ -60,17 +60,17 @@ runs: shell: bash - run: | - : install rustup if needed - 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 - echo "${CARGO_HOME:-$HOME/.cargo}/bin" >> $GITHUB_PATH - fi - if: runner.os != 'Windows' + : set $CARGO_HOME + echo CARGO_HOME=${CARGO_HOME:-${{runner.os == 'Windows' && '$USERPROFILE' || '$HOME'}}/.cargo} >> $GITHUB_ENV shell: bash - run: | - : set $CARGO_HOME - echo CARGO_HOME=${CARGO_HOME:-${{runner.os == 'Windows' && '$USERPROFILE' || '$HOME'}}/.cargo} >> $GITHUB_ENV + : install rustup if needed + 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 + echo "$CARGO_HOME/bin" >> $GITHUB_PATH + fi + if: runner.os != 'Windows' shell: bash - name: rustup toolchain install ${{steps.parse.outputs.toolchain}} From 21dc36fb71dd22e3317045c0c31a3f4249868b17 Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Thu, 13 Jun 2024 09:20:43 -0700 Subject: [PATCH 17/18] Predefine branches up to 1.90 --- scripts/update-revs.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/update-revs.sh b/scripts/update-revs.sh index 0fbc0cf..c5c7841 100755 --- a/scripts/update-revs.sh +++ b/scripts/update-revs.sh @@ -14,7 +14,7 @@ patch_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) From 50fcf2cef96f604a0c13f89abaac637db619dcb5 Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Thu, 13 Jun 2024 09:21:22 -0700 Subject: [PATCH 18/18] toolchain: 1.90.0 --- action.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/action.yml b/action.yml index 23c6000..3e127bb 100644 --- a/action.yml +++ b/action.yml @@ -6,9 +6,6 @@ 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 @@ -45,7 +42,7 @@ runs: echo "toolchain=$toolchain" >> $GITHUB_OUTPUT fi env: - toolchain: ${{inputs.toolchain}} + toolchain: 1.90.0 shell: bash - id: flags