ci: install stable Rust toolchain before building the package

Co-authored-by: Codesmith <codesmith-bot@users.noreply.github.com>
This commit is contained in:
yuneng-berri 2026-07-30 17:41:40 +00:00 committed by Codesmith
parent 87cf837e13
commit 15526feb6a
No known key found for this signature in database
14 changed files with 60 additions and 0 deletions

View file

@ -0,0 +1,17 @@
name: "Set up Rust toolchain"
description: >-
Install the latest stable Rust toolchain and make it the default. Installing
the litellm package builds litellm-rust through maturin, and the crates
pinned in litellm-rust/Cargo.lock require a newer rustc than some runner
images ship by default, which fails the build with "rustc <version> is not
supported by the following packages". Pull stable explicitly instead of
relying on whatever rustc the image happens to default to.
runs:
using: composite
steps:
- name: Install stable Rust toolchain
shell: bash
run: |
rustup toolchain install stable --profile minimal
rustup default stable

View file

@ -62,6 +62,9 @@ jobs:
with:
python-version: "3.12"
- name: Set up Rust toolchain
uses: ./.github/actions/setup-rust-toolchain
- name: Set up uv
uses: ./.github/actions/setup-uv-with-retries
with:

View file

@ -17,6 +17,8 @@ jobs:
- uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
with:
persist-credentials: false
- name: Set up Rust toolchain
uses: ./.github/actions/setup-rust-toolchain
- name: Set up uv
uses: ./.github/actions/setup-uv-with-retries
with:

View file

@ -30,6 +30,9 @@ jobs:
with:
python-version: "3.12"
- name: Set up Rust toolchain
uses: ./.github/actions/setup-rust-toolchain
- name: Set up uv
uses: ./.github/actions/setup-uv-with-retries
with:

View file

@ -12,6 +12,7 @@ on:
- "uv.lock"
- ".github/workflows/codspeed.yml"
- ".github/actions/setup-uv-with-retries/**"
- ".github/actions/setup-rust-toolchain/**"
pull_request:
branches:
- main
@ -23,6 +24,7 @@ on:
- "uv.lock"
- ".github/workflows/codspeed.yml"
- ".github/actions/setup-uv-with-retries/**"
- ".github/actions/setup-rust-toolchain/**"
# Allow CodSpeed to trigger backtest performance analysis
# in order to generate initial data
workflow_dispatch:
@ -50,6 +52,9 @@ jobs:
with:
python-version: "3.12"
- name: Set up Rust toolchain
uses: ./.github/actions/setup-rust-toolchain
- name: Set up uv
uses: ./.github/actions/setup-uv-with-retries
with:

View file

@ -38,6 +38,9 @@ jobs:
with:
python-version: "3.12"
- name: Set up Rust toolchain
uses: ./.github/actions/setup-rust-toolchain
- name: Set up uv
uses: ./.github/actions/setup-uv-with-retries
with:

View file

@ -37,6 +37,9 @@ jobs:
with:
python-version: "3.12"
- name: Set up Rust toolchain
uses: ./.github/actions/setup-rust-toolchain
- name: Set up uv
uses: ./.github/actions/setup-uv-with-retries
with:

View file

@ -32,6 +32,9 @@ jobs:
with:
python-version: "3.12"
- name: Set up Rust toolchain
uses: ./.github/actions/setup-rust-toolchain
- name: Set up uv
uses: ./.github/actions/setup-uv-with-retries
with:
@ -172,6 +175,9 @@ jobs:
with:
python-version: "3.12"
- name: Set up Rust toolchain
uses: ./.github/actions/setup-rust-toolchain
- name: Set up uv
uses: ./.github/actions/setup-uv-with-retries
with:

View file

@ -31,6 +31,9 @@ jobs:
with:
python-version: "3.12"
- name: Set up Rust toolchain
uses: ./.github/actions/setup-rust-toolchain
- name: Set up uv
uses: ./.github/actions/setup-uv-with-retries
with:

View file

@ -23,6 +23,9 @@ jobs:
run: |
jq empty model_prices_and_context_window.json
- name: Set up Rust toolchain
uses: ./.github/actions/setup-rust-toolchain
- name: Set up uv
uses: ./.github/actions/setup-uv-with-retries
with:

View file

@ -73,6 +73,9 @@ jobs:
with:
python-version: "3.12"
- name: Set up Rust toolchain
uses: ./.github/actions/setup-rust-toolchain
- name: Set up uv
uses: ./.github/actions/setup-uv-with-retries
with:

View file

@ -41,6 +41,9 @@ jobs:
with:
python-version: "3.12"
- name: Set up Rust toolchain
uses: ./.github/actions/setup-rust-toolchain
- name: Set up uv
uses: ./.github/actions/setup-uv-with-retries
with:

View file

@ -58,6 +58,9 @@ jobs:
with:
python-version: "3.12"
- name: Set up Rust toolchain
uses: ./.github/actions/setup-rust-toolchain
- name: Set up uv
uses: ./.github/actions/setup-uv-with-retries
with:

View file

@ -42,6 +42,9 @@ jobs:
with:
python-version: "3.12"
- name: Set up Rust toolchain
uses: ./.github/actions/setup-rust-toolchain
- name: Set up uv
uses: ./.github/actions/setup-uv-with-retries
with: