orhun / rustypaste-cli

A CLI tool for rustypaste
https://github.com/orhun/rustypaste
MIT License
56 stars 8 forks source link

refactor(ci): split workflow into stable and beta/nightly #99

Closed tessus closed 6 months ago

tessus commented 6 months ago

This change splits the workflow into 2 parts:

The build job should be added to the branch protection rule of the master branch. But I cannot do that. orhun, you will have to set that up.

tessus commented 6 months ago

There are a bunch of actions that are deprecated and archived. So I think I will have to look into these. The action-rs actions are all dead. So we have to move away from them. Not sure what to do about the audit check though. I have to do some research what this is and whether there are any alternatives.

orhun commented 6 months ago

There are a bunch of actions that are deprecated and archived. So I think I will have to look into these. The action-rs actions are all dead. So we have to move away from them. Not sure what to do about the audit check though. I have to do some research what this is and whether there are any alternatives.

We can install the Rust toolchain using https://github.com/dtolnay/rust-toolchain and use plain cargo commands (with run: directive) to clean things up a bit. With cargo-audit, it is installable via https://github.com/taiki-e/install-action instead.

I can take a look if you want, let me know!

tessus commented 6 months ago

We can install the Rust toolchain using https://github.com/dtolnay/rust-toolchain and use plain cargo commands (with run: directive) to clean things up a bit.

I remeber that I did that in the rustypaste repo. I am just not sure how to work a matrix with dtolnay/rust-toolchain - at least not when it comes to the target. I found 2 examples, but I think I will still have to adjust them properly:

https://github.com/dtolnay/rust-toolchain/blob/master/.github/workflows/ci.yml https://git.srht.taylor.fish/~taylor/crossbeam/tree/f7ba2d29942b12ed50908c60f28accf8b60fe126/.github/workflows/ci.yml

With cargo-audit, it is installable via https://github.com/taiki-e/install-action instead.

Actually, there seems to be a drop in replacement: rustsec/audit-check

I've just pushed an update. Let's see if that works.

tessus commented 6 months ago

Hmm, the cross compiling does not seem to work. If you have any idea, I am more than happy for any help. As soon as the ci.yml works we can adjust the other one accordingly.

tessus commented 6 months ago

@orhun, any idea what the issue could be? I've never done cross-compiling with Rust thus I am also a bit lost when it comes to making this work.

P.S.: It also seems that the BUILD_ARGS are ignored.

tessus commented 6 months ago

@orhun in case you missed my last few comments... ^^^

tessus commented 6 months ago

Awesome. I thought that cross would hook into cargo build. Hmm, I guess not. 🤔 That explains a lot. Haha.