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

Add instructions for building and testing with Rust #35725

Merged
merged 20 commits into from
Feb 3, 2025

Conversation

foursixnine
Copy link
Contributor

@foursixnine foursixnine commented Dec 19, 2024

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:

  • Update filename
  • A subject matter expert (SME) has reviewed the technical accuracy of the content in this PR.
  • Review by SME from Github - In most cases, the author can be the SME. Open source contributions may require a SME review from GitHub staff.
  • The changes in this PR meet the docs fundamentals that are required for all content.
  • All CI checks are passing.

@github-actions github-actions bot added the triage Do not begin working on this issue until triaged by the team label Dec 19, 2024
@foursixnine foursixnine changed the title Oxidizegithub Add instructiuons for building and testing rust Dec 19, 2024
@foursixnine foursixnine changed the title Add instructiuons for building and testing rust Add instructions for building and testing with Rust Dec 20, 2024
@nguyenalex836
Copy link
Contributor

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

@nguyenalex836 nguyenalex836 added content This issue or pull request belongs to the Docs Content team actions This issue or pull request should be reviewed by the docs actions team waiting for review Issue/PR is waiting for a writer's review and removed triage Do not begin working on this issue until triaged by the team labels Dec 20, 2024
@foursixnine
Copy link
Contributor Author

@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

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!

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!

awesome! I might need guidance, as I'm only looking at only gh community

@nguyenalex836
Copy link
Contributor

@foursixnine Ah gotcha, thank you! ✨ Well I hope you get to have a restful and wonderful weekend 💛

@foursixnine
Copy link
Contributor Author

foursixnine commented Dec 22, 2024

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

@nguyenalex836 nguyenalex836 linked an issue Dec 23, 2024 that may be closed by this pull request
5 tasks
Copy link
Contributor

@janbrasna janbrasna left a 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:


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).
Copy link
Contributor

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?

Comment on lines 5 to 7
fpt: '*'
ghes: '*'
ghec: '*'
Copy link
Contributor

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.

Copy link
Contributor Author

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?

@foursixnine foursixnine marked this pull request as draft December 27, 2024 09:01
@foursixnine
Copy link
Contributor Author

foursixnine commented Dec 27, 2024

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:

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.

@foursixnine
Copy link
Contributor Author

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

@felicitymay felicitymay reopened this Feb 3, 2025
@felicitymay felicitymay removed the stale There is no recent activity on this issue or pull request label Feb 3, 2025
@github-actions github-actions bot added the triage Do not begin working on this issue until triaged by the team label Feb 3, 2025
@felicitymay felicitymay removed the triage Do not begin working on this issue until triaged by the team label Feb 3, 2025
@foursixnine
Copy link
Contributor Author

@foursixnine - my apologies for the slow review on your contribution. I think that we're waiting on an internal reviewer still. I'll check into this 👀

No worries, was just about to ask (literally now) if there was something else needed :) good to see its mostly waiting for internal review, will keep my eye open

@felicitymay
Copy link
Contributor

It seems as if I missed the notification that the internal review was complete, so didn't come back to check the style guide details. I'll make this a priority today and we should be able to get your new article published today 🤞🏻

Copy link
Contributor

@felicitymay felicitymay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few comments in response to @janbrasna, I don't seem to be able to see a preview for this PR, so am going to look more closely locally.

This is likely to be because we've moved to a new preview process since this PR was opened.

@felicitymay
Copy link
Contributor

The comment with the links to the preview is now hidden by default, but the preview is available here: Building and testing Rust - GitHub Docs

Copy link
Contributor

@felicitymay felicitymay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@foursixnine - I've just pushed a commit that aims to address the remainder of @janbrasna's points, and to bring the content into line with our style guide.

When the preview's been rebuilt, it would be great if you could check that I've not added any errors.

I might also have a few more questions, but I think that we're nearly there.


The `release` keyword used in this example corresponds to a cargo profile. You can use any [profile](https://doc.rust-lang.org/cargo/reference/profiles.html) you have defined in your `Cargo.toml` file.

## Publishing your package or library to crates.io
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm assuming that this is the most common use case, so I moved it so that it was before the section on uploading artifacts to GitHub.

@@ -38,6 +39,37 @@ We recommend that you have a basic understanding of the Rust language. For more
1. On the "Rust - by {% data variables.product.prodname_actions %}" workflow, click **Configure**.

![Screenshot of the "Choose a workflow" page. The "Configure" button on the "Rust" workflow is highlighted with an orange outline.](/assets/images/help/actions/starter-workflow-rust.png)

{%- ifversion ghes %}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This section is for GitHub Enterprise Server users who may not have access to GitHub Marketplace.

Copy link
Contributor

@janbrasna janbrasna left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great edits, looks better now!

I'd suggest removing some of the placeholders (that consumers should populate with their own content) that only serve "cosmetic" purposes, to simplify a bit (and put the stress on the important parts, where that is a part of the code actually run):

Copy link
Contributor

@felicitymay felicitymay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A couple more minor tweaks.

felicitymay
felicitymay previously approved these changes Feb 3, 2025
Copy link
Contributor

@felicitymay felicitymay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@foursixnine - many thanks for your patience with this pull request 💖

@mattr- and @janbrasna - many thanks for your reviews 💖

I'm happy to approve this from the Docs team point of view. We can always make further updates if we think of any improvements.

You should be able to see the preview here: https://os-docs-review.github.com/actions/use-cases-and-examples/building-and-testing/building-and-testing-rust?review-server-repository=foursixnine%2Fdocs&review-server-branch=oxidizegithub. If you don't see the latest changes, go to https://os-docs-review.github.com/refresh and then do a hard refresh of the page.

Copy link
Contributor

@felicitymay felicitymay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the extra look @mattr- 🚀

@felicitymay felicitymay added this pull request to the merge queue Feb 3, 2025
Merged via the queue into github:main with commit f07c33d Feb 3, 2025
47 checks passed
Copy link
Contributor

github-actions bot commented Feb 3, 2025

Thanks very much for contributing! Your pull request has been merged 🎉 You should see your changes appear on the site in approximately 24 hours. If you're looking for your next contribution, check out our help wanted issues

@foursixnine foursixnine deleted the oxidizegithub branch February 4, 2025 08:18
@felicitymay
Copy link
Contributor

https://docs.github.com/en/actions/use-cases-and-examples/building-and-testing/building-and-testing-rust is live.

Thanks for your contribution and collaboration on this new article @foursixnine 💖

@foursixnine
Copy link
Contributor Author

Thanks a lot! happy to see the changes live already :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
actions This issue or pull request should be reviewed by the docs actions team content This issue or pull request belongs to the Docs Content team SME reviewed An SME has reviewed this issue/PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Rust: Add instructions for building and testing
5 participants