actions-rs / toolchain

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

Project unmaintained #216

Open pickfire opened 2 years ago

pickfire commented 2 years ago

@svartalf I believe the project needs another maintainer since the issues and pull requests have no one to tend to them. Probably would be good if there are other people to help maintain actions-rs, like outdated template (v2 instead of v3).

Not sure if author will reply here, so I will email him.

smallstepman commented 2 years ago

I tried contacting @svartalf via email from his GH profile on June 16th, however, haven't heard from him back.

Given his last contribution to actions-rs was in Nov 2020, I think the best course of action would be to fork the entire organization.

Personally, I'd love to see this go under the https://github.com/rust-unofficial umbrella since such a move makes it less likely for the project to go stale again, or even (ideally) https://github.com/orgs/rust-lang/repositories?q=action ... Perhaps we could try to ping someone from rust-lang, I saw @steveklabnik showing interest in one of the PRs here some time ago - maybe you could help us get the ball rolling? Having GHActions run officially by the organization mitigates a bunch of security risks...

Otherwise, we can create a new organization. Not gonna lie, actions-rs is I think a fantastic name, but maybe we can come up with something as good.

pickfire commented 2 years ago

If any, I think https://github.com/actions/setup-rust is the best since most other popular languages are there.

smallstepman commented 2 years ago

that would also be fantastic! do you know how to get in?

pickfire commented 2 years ago

Not sure, but seemed like they stopped accepting new workflows. https://github.com/actions/starter-workflows/issues/631

steveklabnik commented 2 years ago

I am no longer affiliated with the Rust Project, so if you're looking for an official fork, I can't be of help, sadly.

If any, I think https://github.com/actions/setup-rust is the best since most other popular languages are there.

By the way, this 404s for me...

pickfire commented 2 years ago

By the way, this 404s for me...

Yes, it's 404. I suggested that but don't have access to actions organization.

smallstepman commented 2 years ago

Fork? Or we try other ideas?

dralley commented 2 years ago

Let's not fork until we have an idea of where it would go at the very least. Meaning an official organization if at all possible.

It is also possible that @svartalf may eventually respond and be willing to add new maintainers to the existing organization.

dralley commented 2 years ago

It is also possible that @svartalf may eventually respond and be willing to add new maintainers to the existing organization.

Such as perhaps @dtolnay? https://github.com/dtolnay/rust-toolchain

sondr3 commented 2 years ago

From the reddit thread and here it looks to me like the most likely way forward is either to essentially fork the entire organization or start anew but make sure that the bus factor is greater than one. Would it be possible to perhaps create an action in rust-lang-nursery with the possibility of moving it to the rust-lang repo proper like haskell/actions / deno-land/setup-deno? I realize that this requires a fair amount of trust, but it is in my opinion the best option.

As an aside, something I really like with for example setup-node is that it has built-in caching so no messing about with action/cache, so maybe include @Swatinem in the conversation since he has written a great Rust caching action.

Swatinem commented 2 years ago

To be fair, I think just run: rustup install stable and variations of that one, and similarly run: cargo test is way simpler than something based on an action.

I believe for the toolchain, dtolnay/rust-toolchain may do better caching for toolchains that are not directly installed on the runners, though I haven’t used that myself so far.

Also, thanks for your kind words ;-)

smallstepman commented 2 years ago

@Swatinem do you know a way to install rust_version & components & targets comming fom rust-toolchain.tom in one command? Not sure if rustup show doesn't do that... (which is quite bizzare given the name of the command - https://github.com/rust-lang/rustup/issues/1397)

For my usecase, this whole Action would no longer had any use if this would land:

Swatinem commented 2 years ago

I’m not really familiar with rust-toolchain.toml and how to best use that. For the projects I help maintain, we test against our MSRV, stable and beta, and have no requirements for more specific versions.

I would imagine just updating your rustup invocation for your CI job alongside rust-toolchain.toml updates would suffice, but like I said I’m not really familiar with any of this.

jonasbb commented 2 years ago

The dtolnay/rust-toolchain action felt a bit too bare bones to me, so I created https://github.com/actions-rust-lang/setup-rust-toolchain based on it. It does some extra steps on top like disabling incremental compilation for faster building from scratch (CARGO_INCREMENTAL=0) and sets up problem matchers for cargo and rustfmt.

pickfire commented 2 years ago

@jonasbb instead of doing that, why not just send a pull request to dtolnay repository? Also, it seemed to use CARGO_INCREMENTAL=0 after https://github.com/dtolnay/rust-toolchain/pull/27

jonasbb commented 2 years ago

@pickfire There are some maintenance concerns which make me convinced a separate project is more beneficial. However, this issue is not the place to discuss these concerns.

Bromeon commented 1 year ago

If you don't need lots of customizability, this works quite well for installation and caching of dependencies:

# File .github/composite/rust/action.yml

name: rust
description: "Install Rust toolchain, with caching"

inputs:
  rust:
    required: false
    description: "Rust toolchain, e.g. 'stable' or 'nightly'"
    default: stable
  cache-key:
    required: false
    description: "Extra key to resolve cache"
    default: ''

runs:
  using: "composite"
  steps:
    - name: "Install Rust"
      run: |
        rustup toolchain install ${{ inputs.rust }} --profile minimal --no-self-update
        rustup default ${{ inputs.rust }}
      shell: bash

    - uses: Swatinem/rust-cache@v2
      with:
        shared-key: ${{ inputs.cache-key }}

    - name: "Set environment variables used by toolchain"
      run: |
        echo CARGO_TERM_COLOR=always >> $GITHUB_ENV
        echo CARGO_INCREMENTAL=0 >> $GITHUB_ENV
        echo RUST_BACKTRACE=1 >> $GITHUB_ENV

        rustc --version --verbose
      shell: bash
bitdivine commented 1 year ago

I am interested in maintaining open source software though DAOs. Basically, users get a say in how a project develops but maintainers also get paid.

https://www.youtube.com/watch?v=9VXWcLOsdBM

Note: I don't work for codebase and their solution is still in early stages but something like their governance system would help situations where a maintainer gets busy with other things. I would start by helping codebase get a fully working system but it would help to have a few open source projects to understand what works for people. No idea whether the codebase devs would have me but I think we need a solution like this and would help to make it happen.

FrancisRussell commented 1 year ago

I was also irritated by the loss of actions-rs, so I created this somewhat experimental replacement to use with one of my Rust projects.

I absolutely would not recommend for production use-cases, but for hobbyist-sized projects I think it might be useful. Currently it supports toolchain installation, caching of Cargo home items, caching of cargo install intermediate build artifacts and generation of GitHub annotations.

skeet70 commented 1 year ago

We switched to dtolnay/rust-toolchain but needed rust-toolchain.toml file support that isn't desired by the author. We're maintaining a fork https://github.com/IronCoreLabs/rust-toolchain that adds it.

milesj commented 1 year ago

For anyone visiting this thread, I've created a new action: https://github.com/moonrepo/setup-rust

This supports installing the toolchain, as well as caching ~/.cargo and target, and installing binaries.

huntc commented 1 year ago

After spending a day on fixing up our CI using GitHub Actions, turns out that their Linux, Mac, and Windows images all include Rust along with clippy and rustfmt. Therefore, for most GH Actions scenarios, you just need:

    - name: Update Rust
      run: rustup update
dannywillems commented 1 year ago

I also contacted the maintainer by email today. I let you know if I receive an answer.