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

release using cargo-dist #480

Merged
merged 2 commits into from
Jul 3, 2024
Merged

release using cargo-dist #480

merged 2 commits into from
Jul 3, 2024

Conversation

kranurag7
Copy link
Contributor

Fixes: #263

As of now, musl and windows based build are disabled because they were breaking, I can take a look at fixing those later.

I created a release on my fork here: https://github.com/kranurag7/mistral.rs/releases/tag/v0.1.24

Signed-off-by: kranurag7 <81210977+kranurag7@users.noreply.github.com>
@kranurag7 kranurag7 changed the title 🌱 release using cargo-dist release using cargo-dist Jun 25, 2024
Copy link

Code Metrics Report
  ===============================================================================
 Language            Files        Lines         Code     Comments       Blanks
===============================================================================
 Dockerfile              1           34           25            0            9
 Happy                   1          442          369            0           73
 JSON                    9           21           21            0            0
 Python                 32         1256         1075           37          144
 TOML                   16          444          403            1           40
-------------------------------------------------------------------------------
 Jupyter Notebooks       1            0            0            0            0
 |- Markdown             1           60           30           22            8
 |- Python               1           96           87            1            8
 (Total)                            156          117           23           16
-------------------------------------------------------------------------------
 Markdown               18         1321            0          982          339
 |- BASH                 5          100           97            0            3
 |- Python               6          122          110            0           12
 |- Rust                 3          151          135            6           10
 (Total)                           1694          342          988          364
-------------------------------------------------------------------------------
 Rust                  119        36409        32892          648         2869
 |- Markdown            59          663           13          613           37
 (Total)                          37072        32905         1261         2906
===============================================================================
 Total                 198        39927        34785         1668         3474
===============================================================================
  

Signed-off-by: kranurag7 <81210977+kranurag7@users.noreply.github.com>
@EricLBuehler EricLBuehler added the new feature New feature or request label Jun 25, 2024
@EricLBuehler
Copy link
Owner

Hi @kranurag7! Thanks for adding this. I noticed you added a few new CI steps: build-global-artifacts, host, announce. I was wondering if you could give a quick overview of what you added and generally how it works? In particular, we already use GH releases to create tags and track releases, so I'm not sure if that would be affected by the new announce step?

As of now, musl and windows based build are disabled because they were breaking, I can take a look at fixing those later.

Sounds good.

@kranurag7
Copy link
Contributor Author

The build jobs builds the artifacts and then we create a release in GitHub. This means you'll get your release assets uploaded and a table which will ease the downloading of tarballs for users.

See https://github.com/kranurag7/mistral.rs/releases/tag/v0.1.24

This is what is done in the last announce step. It as the last stage which gets executed after the build is finished.

From what I see, you push a tag to build the image via two workflow.

This workflow extends that, now when you push the tag, you'll have your binaries present as well on the releases.

Copy link
Owner

@EricLBuehler EricLBuehler left a comment

Choose a reason for hiding this comment

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

Thank you!

@EricLBuehler EricLBuehler merged commit ce8a4a5 into EricLBuehler:master Jul 3, 2024
15 checks passed
@kranurag7 kranurag7 deleted the kr/cargo-dist branch July 3, 2024 13:18
@ashleygwilliams
Copy link

so glad to see this! sorry i dropped the ball on actually making the PR.

in case it's not clear, the tool cargo-dist fully generates the workflow. to update the workflow, you'll use the cargo-dist tool and edit config in your Cargo.toml. to update- you can run cargo dist selfupdate which will fetch the new version of cargo-dist and also run cargo dist init which will ask you some questions and re-gen your workflows. we do not recommend you hand edit the workflow and cargo-dist will complain if you do (you can tell it to stop, but again, we don't recommend that). feel free to ask me if you have any questions or hop in our discord, https://discord.gg/qzzYcWPh

# CI backends to support
ci = "github"
# The installers to generate for each app
installers = []

Choose a reason for hiding this comment

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

for ease of installing, you may want to add some installers :) this will let people install the pre-built binaries instead of having to compile on their machine with cargo install

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

Successfully merging this pull request may close these issues.

distribute with cargo dist?
3 participants