-
Notifications
You must be signed in to change notification settings - Fork 394
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 rzup
installation script
#1774
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
} | ||
|
||
install_cargo_binstall() { | ||
execute_with_feedback "cargo install cargo-binstall --quiet" "Installing cargo-binstall" |
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.
Small note that this will build cargo-binstall from scratch if you have an older version, but this shouldn't be necessary to have the most up to date version. Feel free to ignore this comment, just figure I'd mention!
Would it be possible to test this in CI? |
I should note that windows isn't a supported platform right now (unless you consider WSL/WSL2, but that's not really windows). |
I am not very familiar with our CI workflow, but messing around locally with a new job in similar fashion to the others, I think it is possible. My local workflow testing with the diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index ebdc9e20..988984dd 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -38,6 +38,7 @@ jobs:
examples: ${{ steps.filter.outputs.examples }}
test: ${{ steps.filter.outputs.test }}
web: ${{ steps.filter.outputs.web }}
+ rzup: ${{ steps.filter.outputs.rzup }}
steps:
- uses: actions/checkout@v4
- uses: risc0/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36
@@ -83,6 +84,9 @@ jobs:
- examples/browser-verify/**
- risc0/**
- xtask/**
+ rzup:
+ - *base
+ - rzup/**
# see: https://github.com/orgs/community/discussions/26822
main-status-check:
@@ -431,3 +435,28 @@ jobs:
env:
RISC0_USE_DOCKER: "1"
- run: sccache --show-stats
+
+ rzup:
+ if: needs.changes.outputs.rzup == 'true'
+ needs: changes
+ runs-on: [self-hosted, prod, "${{ matrix.os }}", cpu]
+ strategy:
+ fail-fast: false
+ matrix:
+ os: [Linux, macOS]
+ steps:
+ - uses: actions/checkout@v4
+ - uses: ./.github/actions/rustup
+ - uses: ./.github/actions/sccache
+ with:
+ key: ${{ matrix.os }}-default
+ - name: Install rzup
+ run: |
+ chmod +x rzup/install
+ rzup/install
+ source ~/.bashrc
+ - name: Run rzup
+ run: |
+ chmod +x rzup/rzup
+ rzup/rzup --verbose
+ - run: sccache --show-stats |
This introduces two shell scripts for easy installation and version management of the r0 toolchain with
rzup
.To install
rzup
, download and execute the install script with this one-liner:curl -L https://risc0-artifacts.s3.us-west-2.amazonaws.com/rzup/install | bash
This automates the installation by downloading the
rzup
and adding it to the user'sPATH
.Once installed, use
rzup
:Running
rzup
automates the installation ofcargo-binstall
,cargo-risczero
, and the toolchain, making it very easy for users get started.We should consider setting up a redirect to a more user-friendly URL, such as:
Prior to merging, we should edit the url paths to main, rather than the installer branch.
https://github.com/risc0/risc0/blob/hmrtn/rzup-installer/rzup/install#L14
https://github.com/risc0/risc0/blob/hmrtn/rzup-installer/rzup/README.md?plain=1#L9
I have tested this on MacOS and Linux. It would be great to have a windows user test it.