actions-rs / toolchain

🛠️ GitHub Action for `rustup` commands
https://github.com/marketplace/actions/rust-toolchain
MIT License
585 stars 86 forks source link

Node.JS 12 deprecation on GitHub Actions #219

Open caizixian opened 1 year ago

caizixian commented 1 year ago

Do the checklist before filing an issue:

Description

GitHub Action hosted runner is reporting the following warning.

Node.js 12 actions are deprecated. For more information see: https://github.blog/changelog/2022-09-22-github-actions-all-actions-will-begin-running-on-node16-instead-of-node12/. Please update the following actions to use Node.js 16: actions-rs/toolchain

Workflow code

      - name: Install latest stable Rust toolchain
        uses: actions-rs/toolchain@v1
        with:
          profile: minimal
          toolchain: stable

Action output

See above.

Expected behavior

Migrate actions-rs/toolchain to Node.JS 16.

Additional context

N/A.

Bromeon commented 1 year ago

We might wait a long time here, given that this project has been unmaintained for almost 2 years: #216

elibroftw commented 1 year ago

Non interactive install for anyone who only needs stable rust.

      - name: Install Rust (Stable)
        run:
          curl https://sh.rustup.rs -sSf | sh -s -- -y
dallin-ukralabs commented 1 year ago

Unfortunate the project seems abandoned, was using it daily.

Finomnis commented 1 year ago

As it's rude to make requests without giving back, I tipped a little to encourage the change :) https://www.buymeacoffee.com/svartalf/c/4561094 Other people, feel free to join if you benefit from this tool.

mondeja commented 1 year ago

In most cases you don't need this action at all:

test:
  strategy:
    matrix:
      rust-toolchain:
        - stable
        - nightly
  steps:
    - name: Setup Rust
      run: |
        curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
        rustup default ${{ matrix.rust-toolchain }}
a1ecbr0wn commented 1 year ago

Do you think this guy is dead? Is there a way to add other people to the project to maintain it without him given that he has been MIA for 2+ years? This action will cease to work in a couple of months and that would be a real shame given it's wide use.

Ujang360 commented 1 year ago

@svartalf are you OK?

milesj commented 1 year ago

Now that Node 12 is going to start breaking, and this action is dead, I've created a new one: https://github.com/moonrepo/setup-rust

mgeisler commented 1 year ago

Now that Node 12 is going to start breaking, and this action is dead, I've created a new one: https://github.com/moonrepo/setup-rust

May I ask what this action (and your new action) is for when the GitHub runners already include rustup?

milesj commented 1 year ago

@mgeisler Just look at the readme.

mgeisler commented 1 year ago

@mgeisler Just look at the readme.

Thanks, I was expecting it to simply replace this action, but I see now that it also includes support for caching and installing binaries. That will allow me to further simplify my jobs, thanks.

istellino-chub commented 1 year ago

How can I replace this one?

        name: Install Rust
        uses: actions-rs/toolchain@v1
        with:
          toolchain: stable
          target: x86_64-unknown-linux-musl
          default: true
Finomnis commented 1 year ago

How can I replace this one?

        name: Install Rust
        uses: actions-rs/toolchain@v1
        with:
          toolchain: stable
          target: x86_64-unknown-linux-musl
          default: true

@istellino-chub

         name: Install Rust
         uses: dtolnay/rust-toolchain@stable
         with:
           targets: x86_64-unknown-linux-musl

More info here.

istellino-chub commented 1 year ago

thanks @Finomnis does that install rust? I though that it install the toolchain

Finomnis commented 1 year ago

@istellino-chub What's the difference between 'Rust' and the 'Rust toolchain'?

What dtolnay/rust-toolchain installs is rustc, cargo, and so on. Exactly what actions-rs/toolchain did as well.

istellino-chub commented 1 year ago

@istellino-chub What's the difference between 'Rust' and the 'Rust toolchain'?

What dtolnay/rust-toolchain installs is rustc, cargo, and so on. Exactly what actions-rs/toolchain did as well.

@Finomnis And what about the profile and override option

        name: Install Rust
        uses: actions-rs/toolchain@v1
        with:
          profile: minimal
          toolchain: nightly
          override: true
Finomnis commented 1 year ago

@istellino-chub What's the difference between 'Rust' and the 'Rust toolchain'? What dtolnay/rust-toolchain installs is rustc, cargo, and so on. Exactly what actions-rs/toolchain did as well.

And what about the profile and override option

        name: Install Rust
        uses: actions-rs/toolchain@v1
        with:
          profile: minimal
          toolchain: nightly
          override: true

I'm not even sure what override did in actions-rs/toolchain. Same for profile. dtolnay says his tool has sane defaults; for the other settings it has, I'd forward you to its official documentation.