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.
78 lines
2.1 KiB
YAML
78 lines
2.1 KiB
YAML
---
|
|
name: cross-compile
|
|
|
|
"on":
|
|
push:
|
|
branches: [dev, master]
|
|
paths-ignore:
|
|
- "**.md"
|
|
- "docs/**"
|
|
- "contrib/**"
|
|
- "LICENSE"
|
|
- "*.sh"
|
|
- "**/Dockerfile*"
|
|
pull_request:
|
|
paths-ignore:
|
|
- "**.md"
|
|
- "docs/**"
|
|
- "contrib/**"
|
|
- "LICENSE"
|
|
- "*.sh"
|
|
- "**/Dockerfile*"
|
|
|
|
env:
|
|
RUST_BACKTRACE: 1
|
|
RUSTFLAGS: -D warnings
|
|
|
|
jobs:
|
|
cross-compile:
|
|
name: cross +${{ matrix.toolchain }} build ${{ matrix.platform.target }}
|
|
runs-on: ${{ matrix.platform.runs-on }}
|
|
continue-on-error: false
|
|
strategy:
|
|
matrix:
|
|
platform:
|
|
- arch: armv7
|
|
runs-on: ubuntu-latest
|
|
target: armv7-unknown-linux-gnueabihf
|
|
|
|
- arch: aarch64
|
|
runs-on: ubuntu-latest
|
|
target: aarch64-unknown-linux-gnu
|
|
|
|
- arch: riscv64gc
|
|
runs-on: ubuntu-latest
|
|
target: riscv64gc-unknown-linux-gnu
|
|
|
|
toolchain:
|
|
- "1.85" # MSRV (Minimum Supported Rust Version)
|
|
- stable
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v5
|
|
|
|
- name: Build binary with default features
|
|
if: matrix.platform.target != 'riscv64gc-unknown-linux-gnu'
|
|
uses: houseabsolute/actions-rust-cross@v1
|
|
with:
|
|
command: build
|
|
target: ${{ matrix.platform.target }}
|
|
toolchain: ${{ matrix.toolchain }}
|
|
args: --locked --verbose
|
|
|
|
- name: Build binary with rustls-tls and no default features
|
|
if: matrix.platform.target == 'riscv64gc-unknown-linux-gnu'
|
|
uses: houseabsolute/actions-rust-cross@v1
|
|
with:
|
|
command: build
|
|
target: ${{ matrix.platform.target }}
|
|
toolchain: ${{ matrix.toolchain }}
|
|
args: --locked --verbose --no-default-features --features rustls-tls
|
|
|
|
- name: Upload debug artifacts
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: librespot-${{ matrix.platform.runs-on }}-${{ matrix.platform.arch }}-${{ matrix.toolchain }} # yamllint disable-line rule:line-length
|
|
path: target/${{ matrix.platform.target }}/debug/librespot
|
|
if-no-files-found: error
|