Skip to content

Commit 6c79e70

Browse files
committed
Merge branch 'dev' into feat/transfer
# Conflicts: # connect/src/spirc.rs
2 parents c26a88b + df5f957 commit 6c79e70

File tree

116 files changed

+4456
-3371
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

116 files changed

+4456
-3371
lines changed

.devcontainer/Dockerfile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
# syntax=docker/dockerfile:1
22
ARG debian_version=slim-bookworm
3-
ARG rust_version=1.81.0
3+
ARG rust_version=1.85.0
44
FROM rust:${rust_version}-${debian_version}
55

66
ARG DEBIAN_FRONTEND=noninteractive
77
ENV CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
88
ENV RUST_BACKTRACE=1
99
ENV RUSTFLAGS="-D warnings"
1010

11-
1211
RUN apt-get update && \
1312
apt-get install -y --no-install-recommends \
1413
git \

.devcontainer/Dockerfile.alpine

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
# syntax=docker/dockerfile:1
22
ARG alpine_version=alpine3.19
3-
ARG rust_version=1.81.0
3+
ARG rust_version=1.85.0
44
FROM rust:${rust_version}-${alpine_version}
55

66
ENV CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
77
ENV RUST_BACKTRACE=1
88
ENV RUSTFLAGS="-D warnings -C target-feature=-crt-static"
99

10-
1110
RUN apk add --no-cache \
1211
git \
1312
nano\

.devcontainer/devcontainer.json

Lines changed: 15 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,20 @@
11
{
22
"name": "Librespot Devcontainer",
33
"dockerFile": "Dockerfile.alpine",
4-
// Use 'postCreateCommand' to run commands after the container is created.
5-
//"postCreateCommand": "",
6-
"customizations": {
7-
// Configure properties specific to VS Code.
8-
"vscode": {
9-
"settings": {
10-
"dev.containers.copyGitConfig": true
11-
},
12-
"extensions": [
13-
"eamodio.gitlens",
14-
"github.vscode-github-actions",
15-
"rust-lang.rust-analyzer"
16-
]
17-
}
18-
},
4+
"_postCreateCommand_comment": "Uncomment 'postCreateCommand' to run commands after the container is created.",
5+
"_postCreateCommand": "",
6+
"customizations": {
7+
"_comment": "Configure properties specific to VS Code.",
8+
"vscode": {
9+
"settings": {
10+
"dev.containers.copyGitConfig": true
11+
},
12+
"extensions": ["eamodio.gitlens", "github.vscode-github-actions", "rust-lang.rust-analyzer"]
13+
}
14+
},
1915
"containerEnv": {
2016
"GIT_EDITOR": "nano"
21-
}
22-
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
23-
// "remoteUser": "root"
24-
}
17+
},
18+
"_remoteUser_comment": "Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root",
19+
"_remoteUser": "root"
20+
}

.github/workflows/build.yml

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
---
2+
# Note, this is used in the badge URL!
3+
name: build
4+
5+
"on":
6+
push:
7+
branches: [dev, master]
8+
paths-ignore:
9+
- "**.md"
10+
- "docs/**"
11+
- "contrib/**"
12+
- "LICENSE"
13+
- "*.sh"
14+
- "**/Dockerfile*"
15+
- "publish.sh"
16+
- "test.sh"
17+
pull_request:
18+
paths-ignore:
19+
- "**.md"
20+
- "docs/**"
21+
- "contrib/**"
22+
- "LICENSE"
23+
- "*.sh"
24+
- "**/Dockerfile*"
25+
- "publish.sh"
26+
- "test.sh"
27+
schedule:
28+
# Run CI every week
29+
- cron: "00 01 * * 0"
30+
31+
env:
32+
RUST_BACKTRACE: 1
33+
RUSTFLAGS: -D warnings
34+
35+
jobs:
36+
test:
37+
name: cargo +${{ matrix.toolchain }} test (${{ matrix.os }})
38+
runs-on: ${{ matrix.os }}
39+
strategy:
40+
matrix:
41+
os: [ubuntu-latest, windows-latest]
42+
toolchain:
43+
- "1.85" # MSRV (Minimum supported rust version)
44+
- stable
45+
steps:
46+
- name: Checkout code
47+
uses: actions/checkout@v5
48+
49+
- name: Install Rust toolchain
50+
uses: dtolnay/rust-toolchain@master
51+
with:
52+
toolchain: ${{ matrix.toolchain }}
53+
54+
- name: Cache Rust dependencies
55+
uses: Swatinem/rust-cache@v2
56+
57+
- name: Install developer package dependencies (Linux)
58+
if: runner.os == 'Linux'
59+
run: >
60+
sudo apt-get update && sudo apt-get install -y
61+
libpulse-dev portaudio19-dev libasound2-dev libsdl2-dev
62+
gstreamer1.0-dev libgstreamer-plugins-base1.0-dev
63+
libavahi-compat-libdnssd-dev
64+
65+
- name: Fetch dependencies
66+
run: cargo fetch --locked
67+
68+
- name: Build workspace with examples
69+
run: cargo build --frozen --workspace --examples
70+
71+
- name: Run tests
72+
run: cargo test --workspace
73+
74+
- name: Install cargo-hack
75+
uses: taiki-e/install-action@cargo-hack
76+
77+
- name: Check packages without TLS requirements
78+
run: cargo hack check -p librespot-protocol --each-feature
79+
80+
- name: Check workspace with native-tls
81+
run: >
82+
cargo hack check -p librespot --each-feature --exclude-all-features
83+
--include-features native-tls
84+
--exclude-features rustls-tls-native-roots,rustls-tls-webpki-roots
85+
86+
- name: Check workspace with rustls-tls-native-roots
87+
run: >
88+
cargo hack check -p librespot --each-feature --exclude-all-features
89+
--include-features rustls-tls-native-roots
90+
--exclude-features native-tls,rustls-tls-webpki-roots
91+
92+
- name: Build binary with default features
93+
run: cargo build --frozen
94+
95+
- name: Upload debug artifacts
96+
uses: actions/upload-artifact@v4
97+
with:
98+
name: librespot-${{ matrix.os }}-${{ matrix.toolchain }}
99+
path: >
100+
target/debug/librespot${{ runner.os == 'Windows' && '.exe' || '' }}
101+
if-no-files-found: error
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
---
2+
name: cross-compile
3+
4+
"on":
5+
push:
6+
branches: [dev, master]
7+
paths-ignore:
8+
- "**.md"
9+
- "docs/**"
10+
- "contrib/**"
11+
- "LICENSE"
12+
- "*.sh"
13+
- "**/Dockerfile*"
14+
pull_request:
15+
paths-ignore:
16+
- "**.md"
17+
- "docs/**"
18+
- "contrib/**"
19+
- "LICENSE"
20+
- "*.sh"
21+
- "**/Dockerfile*"
22+
23+
env:
24+
RUST_BACKTRACE: 1
25+
RUSTFLAGS: -D warnings
26+
27+
jobs:
28+
cross-compile:
29+
name: cross +${{ matrix.toolchain }} build ${{ matrix.platform.target }}
30+
runs-on: ${{ matrix.platform.runs-on }}
31+
continue-on-error: false
32+
strategy:
33+
matrix:
34+
platform:
35+
- arch: armv7
36+
runs-on: ubuntu-latest
37+
target: armv7-unknown-linux-gnueabihf
38+
39+
- arch: aarch64
40+
runs-on: ubuntu-latest
41+
target: aarch64-unknown-linux-gnu
42+
43+
- arch: riscv64gc
44+
runs-on: ubuntu-latest
45+
target: riscv64gc-unknown-linux-gnu
46+
47+
toolchain:
48+
- "1.85" # MSRV (Minimum Supported Rust Version)
49+
- stable
50+
51+
steps:
52+
- name: Checkout code
53+
uses: actions/checkout@v5
54+
55+
- name: Build binary with default features
56+
if: matrix.platform.target != 'riscv64gc-unknown-linux-gnu'
57+
uses: houseabsolute/actions-rust-cross@v1
58+
with:
59+
command: build
60+
target: ${{ matrix.platform.target }}
61+
toolchain: ${{ matrix.toolchain }}
62+
args: --locked --verbose
63+
64+
- name: Build binary without system dependencies
65+
if: matrix.platform.target == 'riscv64gc-unknown-linux-gnu'
66+
uses: houseabsolute/actions-rust-cross@v1
67+
with:
68+
command: build
69+
target: ${{ matrix.platform.target }}
70+
toolchain: ${{ matrix.toolchain }}
71+
args: --locked --verbose --no-default-features --features rustls-tls-webpki-roots
72+
73+
- name: Upload debug artifacts
74+
uses: actions/upload-artifact@v4
75+
with:
76+
name: librespot-${{ matrix.platform.runs-on }}-${{ matrix.platform.arch }}-${{ matrix.toolchain }} # yamllint disable-line rule:line-length
77+
path: target/${{ matrix.platform.target }}/debug/librespot
78+
if-no-files-found: error

.github/workflows/quality.yml

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
---
2+
name: code-quality
3+
4+
"on":
5+
push:
6+
branches: [dev, master]
7+
paths-ignore:
8+
- "**.md"
9+
- "docs/**"
10+
- "contrib/**"
11+
- "LICENSE"
12+
- "*.sh"
13+
- "**/Dockerfile*"
14+
pull_request:
15+
paths-ignore:
16+
- "**.md"
17+
- "docs/**"
18+
- "contrib/**"
19+
- "LICENSE"
20+
- "*.sh"
21+
- "**/Dockerfile*"
22+
schedule:
23+
# Run CI every week
24+
- cron: "00 01 * * 0"
25+
26+
env:
27+
RUST_BACKTRACE: 1
28+
RUSTFLAGS: -D warnings
29+
30+
jobs:
31+
fmt:
32+
name: cargo fmt
33+
runs-on: ubuntu-latest
34+
steps:
35+
- name: Checkout code
36+
uses: actions/checkout@v5
37+
38+
- name: Install Rust toolchain
39+
uses: dtolnay/rust-toolchain@stable
40+
41+
- name: Check formatting
42+
run: cargo fmt --all -- --check
43+
44+
clippy:
45+
needs: fmt
46+
name: cargo clippy
47+
runs-on: ubuntu-latest
48+
steps:
49+
- name: Checkout code
50+
uses: actions/checkout@v5
51+
52+
- name: Install Rust toolchain
53+
uses: dtolnay/rust-toolchain@stable
54+
55+
- name: Cache Rust dependencies
56+
uses: Swatinem/rust-cache@v2
57+
58+
- name: Install developer package dependencies
59+
run: >
60+
sudo apt-get update && sudo apt-get install -y
61+
libpulse-dev portaudio19-dev libasound2-dev libsdl2-dev
62+
gstreamer1.0-dev libgstreamer-plugins-base1.0-dev
63+
libavahi-compat-libdnssd-dev
64+
65+
- name: Install cargo-hack
66+
uses: taiki-e/install-action@cargo-hack
67+
68+
- name: Run clippy on packages without TLS requirements
69+
run: cargo hack clippy -p librespot-protocol --each-feature
70+
71+
- name: Run clippy with native-tls
72+
run: >
73+
cargo hack clippy -p librespot --each-feature --exclude-all-features
74+
--include-features native-tls
75+
--exclude-features rustls-tls-native-roots,rustls-tls-webpki-roots
76+
77+
- name: Run clippy with rustls-tls-native-roots
78+
run: >
79+
cargo hack clippy -p librespot --each-feature --exclude-all-features
80+
--include-features rustls-tls-native-roots
81+
--exclude-features native-tls,rustls-tls-webpki-roots
82+
83+
- name: Run clippy with rustls-tls-webpki-roots
84+
run: >
85+
cargo hack clippy -p librespot --each-feature --exclude-all-features
86+
--include-features rustls-tls-webpki-roots
87+
--exclude-features native-tls,rustls-tls-native-roots

0 commit comments

Comments
 (0)