Skip to content
This repository has been archived by the owner on Oct 13, 2023. It is now read-only.

Node.JS 12 deprecation on GitHub Actions #219

Open
3 tasks done
caizixian opened this issue Oct 8, 2022 · 17 comments · May be fixed by #220 or #224
Open
3 tasks done

Node.JS 12 deprecation on GitHub Actions #219

caizixian opened this issue Oct 8, 2022 · 17 comments · May be fixed by #220 or #224
Labels
bug Something isn't working

Comments

@caizixian
Copy link

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
Copy link

Bromeon commented Oct 25, 2022

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

pyroraptor07 added a commit to pyroraptor07/interactsh-rs that referenced this issue Oct 30, 2022
This is to fix warnings that pop up in Github Actions due to
actions-rs/cargo and actions-rs/toolchain not being updated to the Node
16.

actions-rs/cargo - [Node.js 12 actions are deprecated. Please use
Node.js 16](actions-rs/cargo#216)
actions-rs/toolchain - [Node.JS 12 deprecation on GitHub
Actions](actions-rs/toolchain#219)
miles170 added a commit to miles170/fd that referenced this issue Nov 2, 2022
actions-rs is currently inactive and has an issue like actions-rs/toolchain#219
miles170 added a commit to miles170/fd that referenced this issue Nov 2, 2022
actions-rs is currently inactive and has an issue like actions-rs/toolchain#219
miles170 added a commit to miles170/fd that referenced this issue Nov 2, 2022
actions-rs is currently inactive and has an issue like actions-rs/toolchain#219
miles170 added a commit to miles170/fd that referenced this issue Nov 2, 2022
actions-rs is currently inactive and has an issue like actions-rs/toolchain#219
miles170 added a commit to miles170/fd that referenced this issue Nov 2, 2022
actions-rs is currently inactive and has an issue like actions-rs/toolchain#219
miles170 added a commit to miles170/fd that referenced this issue Nov 2, 2022
actions-rs is currently inactive and has an issue like actions-rs/toolchain#219
miles170 added a commit to miles170/fd that referenced this issue Nov 2, 2022
actions-rs is currently inactive and has an issue like actions-rs/toolchain#219
@ThexXTURBOXx ThexXTURBOXx linked a pull request Nov 5, 2022 that will close this issue
@elibroftw
Copy link

elibroftw commented Nov 7, 2022

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
Copy link

Unfortunate the project seems abandoned, was using it daily.

mizar added a commit to rust-lang-ja/ac-library-rs that referenced this issue Mar 26, 2023
* ci.yml to use Node16

* `actions/checkout@v3`
* `actions/setup-python@v4`
* `actions-rs` is unmaintained:
  * actions-rs/toolchain#219
  * actions-rs/cargo#222
* Library Checker: Rust 1.60
  * https://judge.yosupo.jp/help

* clippy allow renamed-and-removed-lints
  * https://doc.rust-lang.org/rustc/lints/listing/warn-by-default.html#renamed-and-removed-lints

* `cargo`, `rustup` execute from `$PATH`

* uses dtolnay/rust-toolchain@master
@a1ecbr0wn
Copy link

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
Copy link

@svartalf are you OK?

caolan added a commit to caolan/deno-argon2 that referenced this issue Apr 21, 2023
The previous step used actions-rs which relies upon deprecated Node.js 12 actions. See: actions-rs/toolchain#219
@milesj
Copy link

milesj commented May 5, 2023

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
Copy link

mgeisler commented May 8, 2023

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 added a commit to google/comprehensive-rust that referenced this issue May 8, 2023
The GitHub runners include rustup and a recent stable Rust. We only
need to add the necessary target and we’re good to go.

This removes a lot of warnings because the action used an outdated
GitHub API: actions-rs/toolchain#219
mgeisler added a commit to google/comprehensive-rust that referenced this issue May 8, 2023
* Remove unnecessary jobs names

They are inconsistent with the rest of the jobs and they overflow the
horizontal space in the GitHub UI.

* Remove unnecessary toolchain action

The GitHub runners include rustup and a recent stable Rust. We only
need to add the necessary target and we’re good to go.

This removes a lot of warnings because the action used an outdated
GitHub API: actions-rs/toolchain#219

* Simplify job name

The job is testing a single translation, so it should be singular.

* Test English source with translations

This simplifies the workflow a little and ensures that we get
artifacts uploaded of the English version for every PR.

* Avoid shell command chain

GitHub actions supports setting the working directory directly.

* Upload only the book artifact

Right now, the artifacts all contain the same two top-level folders:
html/ and exerciser/. The former is what we actually deploy, the
second is a side-effect of the exerciser plugin.

With this change, we only upload the HTML and we ensure the zip file
for the xx language has a top-level comprehensive-rust-xx/ folder.
This makes it much nicer to use the generated artifacts.
@milesj
Copy link

milesj commented May 8, 2023

@mgeisler Just look at the readme.

@mgeisler
Copy link

mgeisler commented May 9, 2023

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

bors bot added a commit to dada-lang/dada that referenced this issue May 14, 2023
226: Fix warnings in CI r=Aadamandersson a=Aadamandersson

This fixes the warnings in our CI.
We are currently using  [action-rs/toolchain](https://github.com/actions-rs/toolchain) to install the Rust toolchain in Github Actions. But as it seems to be unmaintained (see actions-rs/toolchain#216) and needs to be replaced to fix some of the warnings (see actions-rs/toolchain#219) I have replaced it with [dtolnay/rust-toolchain](https://github.com/dtolnay/rust-toolchain), which looks like a suitable replacement.

Co-authored-by: Adam Andersson <adam.m.andersson@gmail.com>
bors bot added a commit to dada-lang/dada that referenced this issue May 14, 2023
226: Fix warnings in CI r=Aadamandersson a=Aadamandersson

This fixes the warnings in our CI.
We are currently using  [action-rs/toolchain](https://github.com/actions-rs/toolchain) to install the Rust toolchain in Github Actions. But as it seems to be unmaintained (see actions-rs/toolchain#216) and needs to be replaced to fix some of the warnings (see actions-rs/toolchain#219) I have replaced it with [dtolnay/rust-toolchain](https://github.com/dtolnay/rust-toolchain), which looks like a suitable replacement.

Co-authored-by: Adam Andersson <adam.m.andersson@gmail.com>
bors bot added a commit to dada-lang/dada that referenced this issue May 16, 2023
226: Fix warnings in CI r=Aadamandersson a=Aadamandersson

This fixes the warnings in our CI.
We are currently using  [action-rs/toolchain](https://github.com/actions-rs/toolchain) to install the Rust toolchain in Github Actions. But as it seems to be unmaintained (see actions-rs/toolchain#216) and needs to be replaced to fix some of the warnings (see actions-rs/toolchain#219) I have replaced it with [dtolnay/rust-toolchain](https://github.com/dtolnay/rust-toolchain), which looks like a suitable replacement.

Co-authored-by: Adam Andersson <adam.m.andersson@gmail.com>
avelanarius added a commit to avelanarius/scylla-rust-driver that referenced this issue Jul 13, 2023
Before this change, GitHub Actions would warn that actions-rs/toolchain@v1
uses deprecated functionality:

  The following actions uses node12 which is deprecated and will be 
  forced to run on node16: actions-rs/toolchain@v1. For more info: 
  https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/

and:

  The `set-output` command is deprecated and will be disabled soon. 
  Please upgrade to using Environment Files. For more information see: 
  https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/

Unfortunately, the development of this action is abandoned (the repo
has not received any updates in the last 3 years and the author is
unresponsive: actions-rs/toolchain#219).

Fix the warning by manually invoking rustup commands since it turns
out that GitHub Actions now bundle it in their runners by default.
avelanarius added a commit to avelanarius/scylla-rust-driver that referenced this issue Jul 13, 2023
Before this change, GitHub Actions would warn that actions-rs/toolchain@v1
uses deprecated functionality:

  The following actions uses node12 which is deprecated and will be 
  forced to run on node16: actions-rs/toolchain@v1. For more info: 
  https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/

and:

  The `set-output` command is deprecated and will be disabled soon. 
  Please upgrade to using Environment Files. For more information see: 
  https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/

Unfortunately, the development of this action is abandoned (the repo
has not received any updates in the last 3 years and the author is
unresponsive: actions-rs/toolchain#219).

Fix the warning by manually invoking rustup commands since it turns
out that GitHub Actions now bundle it in their runners by default.
NoahDragon pushed a commit to wnghl/comprehensive-rust that referenced this issue Jul 19, 2023
* Remove unnecessary jobs names

They are inconsistent with the rest of the jobs and they overflow the
horizontal space in the GitHub UI.

* Remove unnecessary toolchain action

The GitHub runners include rustup and a recent stable Rust. We only
need to add the necessary target and we’re good to go.

This removes a lot of warnings because the action used an outdated
GitHub API: actions-rs/toolchain#219

* Simplify job name

The job is testing a single translation, so it should be singular.

* Test English source with translations

This simplifies the workflow a little and ensures that we get
artifacts uploaded of the English version for every PR.

* Avoid shell command chain

GitHub actions supports setting the working directory directly.

* Upload only the book artifact

Right now, the artifacts all contain the same two top-level folders:
html/ and exerciser/. The former is what we actually deploy, the
second is a side-effect of the exerciser plugin.

With this change, we only upload the HTML and we ensure the zip file
for the xx language has a top-level comprehensive-rust-xx/ folder.
This makes it much nicer to use the generated artifacts.
@istellino-chub
Copy link

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
Copy link

Finomnis commented Aug 30, 2023

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
Copy link

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

@Finomnis
Copy link

Finomnis commented Aug 30, 2023

@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
Copy link

istellino-chub commented Aug 30, 2023

@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
Copy link

Finomnis commented Aug 30, 2023

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

deep-soft added a commit to deep-soft/rust-toolchain-actions-rs that referenced this issue Oct 6, 2023
This PR supersedes actions-rs#220 and actions-rs#222 by applying both fixes at once
Fixes actions-rs#219
Fixes actions-rs#221

You can now use this action (and cargo) without deprecations by using a workflow similar to this:

on: [push]

name: build

jobs:
  check:
    name: Rust project
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - name: Install latest nightly
        uses: ThexXTURBOXx/toolchain@master
        with:
            toolchain: nightly
            override: true
            components: rustfmt, clippy

      # `cargo check` command here will use installed `nightly`
      # as it is set as an "override" for current directory

      - name: Run cargo check
        uses: richb-hanover/cargo@master
        with:
          command: check
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working