Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

My first release, a help request #19

Open
stappersg opened this issue May 21, 2022 · 14 comments
Open

My first release, a help request #19

stappersg opened this issue May 21, 2022 · 14 comments

Comments

@stappersg
Copy link
Member

I'm new to the workflow of a release, I'm asking for help.

Goal is the actual switch from llvm_asm! to asm!.

actual switch and version bump have been done.

The failed CI run for Fix build: Use the new rust asm! available in rustc 1.63.0-nightly indicates something extra needs to be done. Maybe something like adding a git tag or sending some trigger signal.

What should I do next?

@stappersg
Copy link
Member Author

FYI

$ git push --tags
Total 0 (delta 0), reused 0 (delta 0), pack-reused 0
To github.com:avr-rust/delay.git
 * [new tag]         0.4.0 -> 0.4.0
$

@mbuesch
Copy link
Contributor

mbuesch commented May 21, 2022

The build bot says

error[E0472]: asm! is unsupported on this target

Is it using an older version of rustc? Only the very latest rust nightly has fixed AVR8 support plus all new features like asm! macro.

@mbuesch
Copy link
Contributor

mbuesch commented May 21, 2022

Step 6/11 : RUN wget -q https://sh.rustup.rs/ -O /tmp/rustup.sh && sh /tmp/rustup.sh -y --profile minimal --default-toolchain nightly-2021-01-05 -c rust-src --quiet

That's too old.

That was the last release before they broke AVR8 support. But it has been fixed now, so an upgrade of the compiler can (should) be done.

@stappersg
Copy link
Member Author

Yes, we could also be bitten by an old version. We will deal with it in another issue.

For releasing avr_delay I report:

$ cargo publish
    Updating crates.io index
error: no upload token found, please run `cargo login` or pass `--token`
$

AFAIK I have no cargo credentials, I will persuit them.

Those who are more comfortable with cargo publish:
Are cargo logins and crates coupled?
Incase of yes, they are: How to add an account to a crate?

@mbuesch
Copy link
Contributor

mbuesch commented May 21, 2022

The owner of a crate can add other owners to the crate in the crate's settings on crates.io (github login).

@stappersg
Copy link
Member Author

The owner of a crate can add other owners to the crate in the crate's settings on crates.io (github login).

Ah, thanks @mbuesch and high-lighting @dylanmckay for further awareness on the pending request.

afbeelding

stappersg added a commit to avr-rust/ruduino that referenced this issue Jun 8, 2022
Because my request for uploading Rust AVR crates is still pending.
( avr-rust/delay#19 )
stappersg added a commit to avr-rust/ruduino that referenced this issue Jun 8, 2022
Because my request for uploading Rust AVR crates is still pending.
( avr-rust/delay#19 )
@n8henrie
Copy link
Contributor

One common option here, especially since you're already using GitHub Actions for CI, would be to also leverage it to publish to crates.io upon pushing a new tag. You'd need to set up an API token as a shared secret (which can be either specific to this repo, or to the avr-rust org as a whole).

Something like this might work:

on:
  push:
    tags:
      - '*'
  name: Publish to Cargo
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: actions-rs/toolchain@v1
        with:
          toolchain: nightly
          profile: minimal
          override: true
          components: rust-src
      - uses: actions-rs/cargo@v1
        with:
          command: publish
          args: --token {{ "${{ secrets.CARGO_API_KEY " }}}}

If you're interested, I'd be happy to work on PRs to this effect, both for this repo as well as https://github.com/avr-rust/ruduino/

@n8henrie
Copy link
Contributor

@dylanmckay -- you're listed as the owner of https://crates.io/crates/avr_delay

Would it be possible for you to either provide @stappersg a crates.io API token for this project, or create one as a GitHub repository secret (which means it would be usable but not viewable by the other delay repo owners) so we can get the crates.io version updated from 0.3.2 -> 0.4?

This update is important because it includes the transition from llvm_asm -> asm macro, which allows compilation on a current nightly rust toolchain; this is a blocking issue for making the avr-rust/blink extremely easy for end users to build -- I think making that hello, world to Rust on AVR as easy as possible will open some doors for beginners!

@stappersg
Copy link
Member Author

FWIW I have seen the above two updates

@stappersg
Copy link
Member Author

stappers@myhost:~/src/rust/RustAVR/delay
$ cargo publish --no-verify
    Updating crates.io index
   Packaging avr_delay v0.4.2 (/home/stappers/src/rust/RustAVR/delay)
   Uploading avr_delay v0.4.2 (/home/stappers/src/rust/RustAVR/delay)
error: failed to publish to registry at https://crates.io

Caused by:
  the remote server responded with an error:
    this crate exists but you don't seem to be an owner.
    If you believe this is a mistake, perhaps you need to accept an invitation to be an owner before publishing.
stappers@myhost:~/src/rust/RustAVR/delay
$ cargo owner --list
    Updating crates.io index
dylanmckay (Dylan McKay)
stappers@myhost:~/src/rust/RustAVR/delay
$ 

Highlighting @dylanmckay for getting a release of avr_delay at crates.io that has asm!() support, that has llvm_asm!() removed.

Options that I see:

  • Dylan does the cargo publish --no-verify
  • Dylan does cargo owner --add stappersg and I, stappersg, check and accept invitation then cargo publish --no-verify
  • Dylan does cargo owner --add avr-rust and we gonna find out how that goes

The cargo owner --add avr-rust idea is based upon this partial output of cargo help owner:

       -a, --add login...
           Invite the given user or team as an owner.

and asuming that avr-rust is the supposed team.

@n8henrie
Copy link
Contributor

Options that I see:

Or as noted above, I'd be happy to help create a GitHub Actions script, especially since you're already using it, that would only depend on a "repository secret" of a crates.io token with access to the repo (ostensibly generated by the current crate owner). These repository secrets can be shared by all owners of a repo, and are not visible to anyone -- including the person that adds it -- after it is added (by going to Settings -> Secrets -> Actions if memory serves).

The advantage to taking this route is that new versions could be automatically published just by pushing a new git tag, which is handy.

@stappersg
Copy link
Member Author

From #19 (comment) is

That's too old.

Today fixed with avr-rust/blink@3ffb720, Revert "[CI] Pin nightly rust to 2021-01-05".

@stappersg
Copy link
Member Author

Hi @n8henrie,

Thanks for expressing that you want this crate published at crates.io.

Since avr-rust/ruduino@61a8e0d, documented in avr-rust/blink#44, is the urgency gone. That buys @dylanmckay more time to respond on #19 (comment). (This comment is some kind of "retransmit" ;-)

Regarding the "Or as noted above, I'd be happy to help" from #19 (comment) that should be, I think, "And as noted above, I'd be happy to help".

Regards
Geert Stappers

P.S.
Contacting me outside github.com, like emailing me, is fine.

@stappersg
Copy link
Member Author

Retransmitting the
Options that I see:

  • Dylan does the cargo publish
  • Dylan does cargo owner --add stappersg and I, stappersg, check and accept invitation then the cargo publish
  • Dylan does cargo owner --add avr-rust and we gonna find out how that goes

with the hope that it gets seen by @dylanmckay

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants