toolchain icon indicating copy to clipboard operation
toolchain copied to clipboard

Node.JS 12 deprecation on GitHub Actions

Open caizixian opened this issue 3 years ago • 17 comments

Do the checklist before filing an issue:

  • [x] Is this related to the actions-rs Actions? If you think it's a problem related to Github Actions in general, use GitHub Community forum instead: https://github.community
  • [x] You've read the Contributing section about bugs reporting: https://github.com/actions-rs/.github/blob/master/CONTRIBUTING.md#reporting-bugs
  • [x] Is this something you can debug and fix? Send a pull request! Bug fixes and documentation fixes are welcome.

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.

caizixian avatar Oct 08 '22 05:10 caizixian

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

Bromeon avatar Oct 25 '22 22:10 Bromeon

Non interactive install for anyone who only needs stable rust.

      - name: Install Rust (Stable)
        run:
          curl https://sh.rustup.rs -sSf | sh -s -- -y

elibroftw avatar Nov 07 '22 06:11 elibroftw

Unfortunate the project seems abandoned, was using it daily.

dallin-ukralabs avatar Dec 06 '22 09:12 dallin-ukralabs

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.

Finomnis avatar Dec 18 '22 12:12 Finomnis

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 }}

mondeja avatar Feb 13 '23 16:02 mondeja

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.

a1ecbr0wn avatar Apr 17 '23 15:04 a1ecbr0wn

@svartalf are you OK?

Ujang360 avatar Apr 17 '23 20:04 Ujang360

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

milesj avatar May 05 '23 04:05 milesj

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?

mgeisler avatar May 08 '23 09:05 mgeisler

@mgeisler Just look at the readme.

milesj avatar May 08 '23 16:05 milesj

@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.

mgeisler avatar May 09 '23 08:05 mgeisler

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 avatar Aug 30 '23 10:08 istellino-chub

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.

Finomnis avatar Aug 30 '23 11:08 Finomnis

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

istellino-chub avatar Aug 30 '23 11:08 istellino-chub

@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 avatar Aug 30 '23 11:08 Finomnis

@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

istellino-chub avatar Aug 30 '23 12:08 istellino-chub

@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.

Finomnis avatar Aug 30 '23 13:08 Finomnis