-
Notifications
You must be signed in to change notification settings - Fork 60.6k
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
Add instructions for building and testing with Rust #35725
base: main
Are you sure you want to change the base?
Conversation
@foursixnine Thanks so much for opening a PR! I'll get this triaged for review ✨Just a quick tip - we'd recommend opening an issue before raising a PR, especially for larger scale changes such as this one 💛 This will let our team determine how best to proceed with the concern / issue you are raising, thank you! |
absolutely! I'm behind on creating the issue, was getting: https://github.com/foursixnine/cndk8/actions/runs/12436473960 in shape before, so I'll get back to creating the issue over the weekend :) to not lose momentum!
awesome! I might need guidance, as I'm only looking at only gh community |
@foursixnine Ah gotcha, thank you! ✨ Well I hope you get to have a restful and wonderful weekend 💛 |
@nguyenalex836 : A lot of rest is being achieved :D - created #35747 as the issue for this and following Pull requests (if any) related to this. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's referred as WIP/PoC in a few places (although not marked as "Draft" so it appears as ready for review…) therefore this may be preliminary, but to make sure it's tracked in case:
content/actions/use-cases-and-examples/building-and-testing/building-and-testing-rust.md
Outdated
Show resolved
Hide resolved
|
||
This guide shows you how to build, test, and publish a Rust package. | ||
|
||
{% data variables.product.prodname_dotcom %}-hosted runners have a tools cache with preinstalled software, which includes the dependencies for Go. For a full list of up-to-date software and the preinstalled versions of Go, see [AUTOTITLE](/actions/using-github-hosted-runners/about-github-hosted-runners#preinstalled-software). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the Go toolchain mention intentional?
fpt: '*' | ||
ghes: '*' | ||
ghec: '*' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI the tracking issue mentions:
"… so It can be reused further by at least community GH (i.e no self hosted runners for now or enterprise features)"
I'm not sure there would be any difference if provisioning the same runners, just felt it's worth noting it's applied to all versions here, while the PR is actually marked as a PoC mentioning only being verified for dotcom and standard runners.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what would be the correct options then? I don't know ftp, ghes or ghec... what would you suggest?
content/actions/use-cases-and-examples/building-and-testing/building-and-testing-rust.md
Outdated
Show resolved
Hide resolved
content/actions/use-cases-and-examples/building-and-testing/building-and-testing-rust.md
Outdated
Show resolved
Hide resolved
content/actions/use-cases-and-examples/building-and-testing/building-and-testing-rust.md
Outdated
Show resolved
Hide resolved
content/actions/use-cases-and-examples/building-and-testing/building-and-testing-rust.md
Show resolved
Hide resolved
content/actions/use-cases-and-examples/building-and-testing/building-and-testing-rust.md
Outdated
Show resolved
Hide resolved
content/actions/use-cases-and-examples/building-and-testing/building-and-testing-rust.md
Show resolved
Hide resolved
content/actions/use-cases-and-examples/building-and-testing/building-and-testing-rust.md
Outdated
Show resolved
Hide resolved
Thanks for the review, marked as draft for now - will re-request reviews once final draft ins ready (I started with a copy of the golang one, so that's why go is all over the place :P; that said thanks for the review, some questions I had you're already pointing out missing pieces. |
Ok, https://crates.io/crates/cndk8/0.1.0 has been published using only github, now docfest starts :D https://github.com/foursixnine/cndk8/actions/runs/12544879009/job/34978215202 |
a50239a
to
7a2354f
Compare
115b616
to
f608e8b
Compare
content/actions/use-cases-and-examples/building-and-testing/building-and-testing-rust.md
Outdated
Show resolved
Hide resolved
Thanks for opening a pull request! We've triaged this issue for technical review by a subject matter expert 👀 |
- name: Publish hello app to GitHub Packages | ||
run: | | ||
curl -u "${{ github.actor }}:${{ secrets.GH_TOKEN }}" \ | ||
-X POST "https://uploads.github.com/repos/${{ github.repository }}/releases/assets?name=cndk8-hello.tar.gz" \ | ||
--header "Content-Type: application/gzip" \ | ||
--data-binary @./cndk8-hello/cndk8 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if this is wanted/desired or if gh has plans to offer a rust registry
content/actions/use-cases-and-examples/building-and-testing/building-and-testing-rust.md
Outdated
Show resolved
Hide resolved
content/actions/use-cases-and-examples/building-and-testing/building-and-testing-rust.md
Outdated
Show resolved
Hide resolved
…ng/building-and-testing-rust.md Co-authored-by: Matt Rogers <[email protected]>
…ing-and-testing/building-and-testing-rust.md Co-authored-by: Matt Rogers <[email protected]>
@mattr- Just requested re-review, let me know if anything else is needed, and if I should do squash of some of the commits TIA! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for making those updates! I found one other thing that I noticed the first read through but failed to write a comment on. Other than that one thing, this is ready to go.
run: | | ||
curl -u "${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}" \ | ||
-X POST "https://uploads.github.com/repos/${{ github.repository }}/releases/assets?name=cndk8-hello.tar.gz" \ | ||
--header "Content-Type: application/gzip" \ | ||
--data-binary @./cndk8-hello/cndk8 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I missed commenting on this the first time through. I haven't been able to find documentation about uploads.github.com
anywhere other than some stuff for GitHub Connect, which I don't think would be applicable for this guide. What do you think about switching this to use something like gh release upload
instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you think about switching this to use something like gh release upload instead?
@mattr- I feel we could remove this all together; adding a step that does gh release upload
, goes more into the question I had already in this comment of whether there would/could be a github registry for rust packages or if this is needed at all, in the context of the guide...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it was actually easier than I thought: https://github.com/foursixnine/hetzner-robot-rs/releases/tag/v0.1.0 was published using the new steps described in this guide: https://github.com/foursixnine/hetzner-robot-rs/actions/runs/12828374178/job/35772361174#step:4:4
7864e26
to
6150931
Compare
Just addressed it, ended up being easier than I thought :D
🚀🚀🚀 happy to read that, lmk if anything else is needed. |
Right now, it's a manual search and replace, I would like to build the docs as I find myself the answers to enable my own rust workflows beyond what https://github.com/foursixnine/cndk8/blob/main/.github/workflows/rust.yml is already doing.
was initially: #35721 but panik.
PoC: Add documentation for rust workflows
Why:
Because there's no documentation on how to properly handle rust stuff on github
would take a look later at github/docs/issues/23181 and see what else fails
What's being changed (if available, include any code snippets, screenshots, or gifs):
So far adding documentation based off the Golang one, and my own journey through https://github.com/foursixnine/cndk8/ and isototest-ng
Commits, PR's will be listed
Check off the following: