ci: add job to check no-std build (#1851)

Uses x86_64-unknown-none as an arbitrary target that does not support
the std library

Resolves: https://github.com/ratatui/ratatui/issues/1843
This commit is contained in:
Josh McKinney 2025-05-13 12:43:10 -07:00 committed by GitHub
parent 4fcd238e1e
commit a0746bad7e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -132,6 +132,23 @@ jobs:
- uses: Swatinem/rust-cache@v2
- run: cargo xtask check --all-features
build-no-std:
name: Build No-Std
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
targets: x86_64-unknown-none
- uses: Swatinem/rust-cache@v2
# This makes it easier to debug the exact versions of the dependencies
- run: cargo tree --target x86_64-unknown-none -p ratatui-core
- run: cargo tree --target x86_64-unknown-none -p ratatui-widgets
- run: cargo tree --target x86_64-unknown-none -p ratatui --no-default-features
- run: cargo build --target x86_64-unknown-none -p ratatui-core
- run: cargo build --target x86_64-unknown-none -p ratatui-widgets
- run: cargo build --target x86_64-unknown-none -p ratatui --no-default-features
# Check if README.md is up-to-date with the crate's documentation.
check-readme:
name: Check README