mirror of
https://github.com/librespot-org/librespot.git
synced 2025-10-03 01:39:28 +02:00

Add support for choosing between native-tls and rustls-tls backends through feature flags, with native-tls as the default for maximum platform compatibility. Key changes: - Add mutually exclusive native-tls and rustls-tls feature flags - Use conditional compilation to select TLS implementation - Configure rustls-tls with platform certificate verifier - Refactor to workspace-based dependency management - Update CI workflows with improved cross-compilation support - Add comprehensive TLS backend documentation The native-tls backend uses system TLS libraries (OpenSSL on Linux, Secure Transport on macOS, SChannel on Windows) while rustls-tls provides a pure Rust implementation with platform certificate stores.
79 lines
1.9 KiB
YAML
79 lines
1.9 KiB
YAML
---
|
|
name: code-quality
|
|
|
|
"on":
|
|
push:
|
|
branches: [dev, master]
|
|
paths-ignore:
|
|
- "**.md"
|
|
- "docs/**"
|
|
- "contrib/**"
|
|
- "LICENSE"
|
|
- "*.sh"
|
|
- "**/Dockerfile*"
|
|
pull_request:
|
|
paths-ignore:
|
|
- "**.md"
|
|
- "docs/**"
|
|
- "contrib/**"
|
|
- "LICENSE"
|
|
- "*.sh"
|
|
- "**/Dockerfile*"
|
|
schedule:
|
|
# Run CI every week
|
|
- cron: "00 01 * * 0"
|
|
|
|
env:
|
|
RUST_BACKTRACE: 1
|
|
RUSTFLAGS: -D warnings
|
|
|
|
jobs:
|
|
fmt:
|
|
name: cargo fmt
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v5
|
|
|
|
- name: Install Rust toolchain
|
|
uses: dtolnay/rust-toolchain@stable
|
|
|
|
- name: Check formatting
|
|
run: cargo fmt --all -- --check
|
|
|
|
clippy:
|
|
needs: fmt
|
|
name: cargo clippy
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v5
|
|
|
|
- name: Install Rust toolchain
|
|
uses: dtolnay/rust-toolchain@stable
|
|
|
|
- name: Cache Rust dependencies
|
|
uses: Swatinem/rust-cache@v2
|
|
|
|
- name: Install developer package dependencies
|
|
run: >
|
|
sudo apt-get update && sudo apt-get install -y
|
|
libpulse-dev portaudio19-dev libasound2-dev libsdl2-dev
|
|
gstreamer1.0-dev libgstreamer-plugins-base1.0-dev
|
|
libavahi-compat-libdnssd-dev
|
|
|
|
- name: Install cargo-hack
|
|
uses: taiki-e/install-action@cargo-hack
|
|
|
|
- name: Run clippy on packages without TLS requirements
|
|
run: cargo hack clippy -p librespot-protocol --each-feature
|
|
|
|
- name: Run clippy with native-tls
|
|
run: >
|
|
cargo hack clippy -p librespot --each-feature --exclude-all-features
|
|
--include-features native-tls --exclude-features rustls-tls
|
|
|
|
- name: Run clippy with rustls-tls
|
|
run: >
|
|
cargo hack clippy -p librespot --each-feature --exclude-all-features
|
|
--include-features rustls-tls --exclude-features native-tls
|