Skip to content

Commit

Permalink
host toolchain: update to 1.74 (risc0#1428)
Browse files Browse the repository at this point in the history
Update the host-side toolchain to 1.74, remove old doc tests, and add a
doc test for 0.20
  • Loading branch information
SchmErik authored Feb 14, 2024
1 parent 8267aed commit 658a56c
Show file tree
Hide file tree
Showing 13 changed files with 401 additions and 3,065 deletions.
1 change: 1 addition & 0 deletions .github/workflows/bonsai.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ jobs:
- .github/workflows/bonsai.yml
- bonsai/**
- risc0/**
- rust-toolchain.toml
bonsai:
if: needs.changes.outputs.bonsai == 'true'
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ jobs:
- .github/actions/**
- .github/workflows/main.yml
- Cargo.toml
- rust-toolchain.toml
check-benchmarks:
- *base
- benchmarks/**
Expand Down Expand Up @@ -116,7 +117,7 @@ jobs:
uses: risc0/cargo-install@b9307573043522ab0d3e3be64a51763b765b52a4
with:
crate: cargo-rdme
version: "0.7.2"
version: "1.4.2"
- uses: actions/setup-node@v3
with:
node-version: 18
Expand Down
64 changes: 12 additions & 52 deletions .github/workflows/website-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,40 +26,34 @@ jobs:
pull-requests: read
outputs:
main: ${{ steps.filter.outputs.main }}
version-0_18: ${{ steps.filter.outputs.version-0_18 }}
version-0_19: ${{ steps.filter.outputs.version-0_19 }}
version-0_20: ${{ steps.filter.outputs.version-0_20 }}
steps:
- uses: actions/checkout@v4
- uses: risc0/paths-filter@4067d885736b84de7c414f582ac45897079b0a78
id: filter
with:
filters: |
main:
- rust-toolchain.toml
- .github/actions/**
- .github/workflows/website-test.yml
- bonsai/**
- risc0/**
- website/api/**
- website/doc-test/main/**
- website/docs/**
version-0_18:
version-0_20:
- .github/actions/**
- .github/workflows/website-test.yml
- website/api_versioned_docs/version-0.18/**
- website/doc-test/version-0.18/**
version-0_19:
- .github/actions/**
- .github/workflows/website-test.yml
- website/api_versioned_docs/version-0.19/**
- website/doc-test/version-0.19/**
- website/api_versioned_docs/version-0.20/**
- website/doc-test/version-0.20/**
# see: https://github.com/orgs/community/discussions/26822
doc-test:
if: always()
needs:
- main
- version-0_18
- version-0_19
- version-0_20
runs-on: ubuntu-latest
steps:
- name: Check all job status
Expand Down Expand Up @@ -88,7 +82,7 @@ jobs:
with:
crate: cargo-binstall
version: "1.4"
- run: cargo binstall -y --force cargo-risczero@0.19
- run: cargo binstall -y --force cargo-risczero@0.20
- run: cargo risczero install --version $RISC0_TOOLCHAIN_VERSION
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -102,42 +96,8 @@ jobs:

- run: sccache --show-stats

version-0_18:
if: needs.changes.outputs.version-0_18 == 'true'
needs: changes
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
# Recursive checkout required to build Solidity contracts and bindings.
submodules: recursive
- uses: ./.github/actions/rustup
- uses: ./.github/actions/sccache
with:
key: Linux-default
- uses: risc0/foundry-toolchain@2fe7e70b520f62368a0e3c464f997df07ede420f
with:
version: nightly-09fe3e041369a816365a020f715ad6f94dbce9f2
- uses: risc0/cargo-install@b9307573043522ab0d3e3be64a51763b765b52a4
with:
crate: cargo-binstall
version: "1.4"
- run: cargo binstall -y --force [email protected]
- run: cargo risczero install --version $RISC0_TOOLCHAIN_VERSION
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: build
run: cargo test --release --no-run
working-directory: website/doc-test/version-0.18
- name: test
run: cargo test --release
working-directory: website/doc-test/version-0.18

- run: sccache --show-stats

version-0_19:
if: needs.changes.outputs.version-0_19 == 'true'
version-0_20:
if: needs.changes.outputs.version-0_20 == 'true'
needs: changes
runs-on: ubuntu-latest
steps:
Expand All @@ -156,16 +116,16 @@ jobs:
with:
crate: cargo-binstall
version: "1.4"
- run: cargo binstall -y --force cargo-risczero@0.19
- run: cargo binstall -y --force cargo-risczero@0.20
- run: cargo risczero install --version $RISC0_TOOLCHAIN_VERSION
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: build
run: cargo test --release --no-run
working-directory: website/doc-test/version-0.19
working-directory: website/doc-test/version-0.20
- name: test
run: cargo test --release
working-directory: website/doc-test/version-0.19
working-directory: website/doc-test/version-0.20

- run: sccache --show-stats
7 changes: 3 additions & 4 deletions risc0/zkvm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,9 @@ Note that in order to use `risc0-zkvm` in the guest, you must disable the
[`cargo risczero` tool]: https://crates.io/crates/cargo-risczero
[dev-docs]: https://dev.risczero.com
[examples]: https://dev.risczero.com/api/zkvm/examples
[receipt]: crate::host::receipt::Receipt
[receipt-verify]: crate::host::receipt::Receipt::verify
[rust guest workarounds]:
https://github.com/risc0/risc0/issues?q=is%3Aissue+is%3Aopen+label%3A%22rust+guest+workarounds%22
[receipt]: https://docs.rs/risc0-zkvm/latest/risc0_zkvm/host/receipt/struct.Receipt.html
[receipt-verify]: https://docs.rs/risc0-zkvm/latest/risc0_zkvm/host/receipt/struct.Receipt.html#method.verify
[rust guest workarounds]: https://github.com/risc0/risc0/issues?q=is%3Aissue+is%3Aopen+label%3A%22rust+guest+workarounds%22
[YouTube]: https://www.youtube.com/@risczero
[zero-knowledge proofs]: https://en.wikipedia.org/wiki/Zero-knowledge_proof
[zkHack]: https://youtu.be/cLqFvhmXiD0
Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[toolchain]
channel = "1.73"
channel = "1.74"
components = ["clippy", "rustfmt", "rust-src"]
targets = ["wasm32-unknown-unknown"]
profile = "minimal"
Loading

0 comments on commit 658a56c

Please sign in to comment.