Skip to content

chore: pin Rust toolchain #1355

chore: pin Rust toolchain

chore: pin Rust toolchain #1355

Workflow file for this run

---
name: CI
# yamllint disable-line rule:truthy
on:
merge_group:
pull_request:
push:
branches:
- main
tags:
- v*
jobs:
check:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 1
- name: Fetch main branch
run: git fetch --depth=1 origin main
- name: Free disk space
uses: ./.github/actions/free-disk-space
- name: Install `uv`
uses: astral-sh/setup-uv@eac588ad8def6316056a12d4907a9d4d84ff7a3b # v7
with:
version-file: "python-tooling/pyproject.toml"
- name: Install `python`
shell: bash
run: |
uv --directory=python-tooling python install --default
path_exe="$(uv --directory=python-tooling python find)"
path_bin="$(dirname "$path_exe")"
echo "PYO3_CROSS_LIB_DIR=${path_bin}/../lib" >> "$GITHUB_ENV"
echo "LD_LIBRARY_PATH=${path_bin}/../lib" >> "$GITHUB_ENV"
- name: Install `cargo-deny` & `just` & `tombi` & 'typos'
uses: taiki-e/install-action@1e67dedb5e3c590e1c9d9272ace46ef689da250d # v2
with:
tool: cargo-deny,just,tombi,typos
- name: Install Rust toolchain
run: rustup toolchain install
- name: Rust Cache
uses: Swatinem/rust-cache@779680da715d629ac1d338a641029a2f4372abb5 # v2.8.2
# Swatinem/rust-cache does NOT cache docs, see
# https://github.com/Swatinem/rust-cache/issues/208
- name: Rustdoc Cache
uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v4
with:
path: target/doc
key: v0-${{ runner.os }}-rustdoc-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
v0-${{ runner.os }}-rustdoc-${{ hashFiles('**/Cargo.lock') }}
v0-${{ runner.os }}-rustdoc-
- name: just check
run: just check
env:
# Disable incremental compilation to avoid overhead.
CARGO_INCREMENTAL: "0"
# Disable full debug symbol generation to speed up CI build
# "1" means line tables only, which is useful for panic tracebacks.
CARGO_PROFILE_DEV_DEBUG: "1"
- name: Check Cargo.lock
shell: bash
run: |
if ! git diff --exit-code -- Cargo.lock; then
echo "::error::Cargo.lock changed, please commit your local changes!"
exit 1
else
echo "Good. Cargo.lock is up to date"
fi
- name: upload docs
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
with:
name: docs
path: target/doc
if-no-files-found: error