Skip to content

Commit b4e1202

Browse files
authored
prepare release (#1332)
Prepares the project for the next release.
2 parents 67ac979 + 65e7b8b commit b4e1202

14 files changed

+727
-593
lines changed

.github/workflows/cd.yml

+91-135
Original file line numberDiff line numberDiff line change
@@ -2,170 +2,126 @@ name: Continuous Deployment
22

33
on:
44
push:
5+
branches:
6+
- master
57
tags:
68
- 'v*.*.*'
79

810
jobs:
9-
publish:
10-
name: Publishing ${{ matrix.build_target }}-${{ matrix.artifact_type }}
11-
runs-on: ${{ matrix.os }}
11+
build:
12+
name: Building ${{matrix.os}}-${{ matrix.arch }} (${{ matrix.artifact_type }})
13+
runs-on: ${{ matrix.runs_on }}
1214
strategy:
1315
matrix:
14-
build_target: [macos, linux, linux-armhf, linux-armv6]
16+
os: [macos, linux]
17+
arch: [x86_64, aarch64, armv7]
1518
rust: [stable]
1619
artifact_type: ['slim', 'default', 'full'] # The build strategy will build all types for each OS specified
1720
include:
18-
- artifact_type: 'slim' # Slim version has no features enabled by default.
19-
feature: ''
20-
- artifact_type: 'default'
21-
feature: 'dbus_mpris' # Default version has all extra features enabled
22-
- artifact_type: 'full'
23-
feature: 'dbus_mpris' # Full version has all extra features and audio backends enabled
24-
- build_target: macos
25-
os: macos-latest
26-
artifact_prefix: macos
27-
target: x86_64-apple-darwin
28-
- build_target: linux
29-
os: ubuntu-latest
30-
artifact_prefix: linux
31-
target: x86_64-unknown-linux-gnu
32-
- build_target: linux-armhf
33-
os: ubuntu-18.04
34-
artifact_prefix: linux-armhf
35-
target: arm-unknown-linux-gnueabihf
36-
- build_target: linux-armv6
37-
os: ubuntu-18.04
38-
artifact_prefix: linux-armv6
39-
target: arm-unknown-linux-gnueabihf
40-
- build_target: macos
21+
# Runner configuration
22+
- os: macos
23+
arch: x86_64
24+
runs_on: macos-13
25+
- os: macos
26+
arch: aarch64
27+
runs_on: macos-latest
28+
- os: linux
29+
runs_on: ubuntu-latest
30+
# DBus configuration
31+
- artifact_type: slim
32+
dbus: ''
33+
- artifact_type: default
34+
dbus: dbus_mpris
35+
- artifact_type: full
36+
dbus: dbus_mpris
37+
# Cross Compilation Targets
38+
- os: linux
39+
arch: aarch64
40+
target: aarch64-unknown-linux-gnu
41+
- os: linux
42+
arch: armv7
43+
target: armv7-unknown-linux-gnueabihf
44+
# Audio backend configuration: Linux
45+
- os: linux
4146
artifact_type: slim
42-
audio_backend: portaudio_backend
43-
- build_target: linux
44-
artifact_type: slim
45-
audio_backend: pulseaudio_backend
46-
- build_target: linux-armhf
47-
artifact_type: slim
48-
audio_backend: alsa_backend
49-
- build_target: linux-armv6
50-
artifact_type: slim
51-
audio_backend: alsa_backend
52-
- build_target: macos
53-
artifact_type: default
54-
audio_backend: portaudio_backend
55-
- build_target: linux
56-
artifact_type: default
57-
audio_backend: pulseaudio_backend
58-
- build_target: linux-armhf
47+
audio_backends: alsa_backend
48+
- os: linux
5949
artifact_type: default
60-
audio_backend: alsa_backend
61-
- build_target: linux
50+
audio_backends: alsa_backend,pulseaudio_backend,rodio_backend
51+
- os: linux
6252
artifact_type: full
63-
audio_backend: pulseaudio_backend,alsa_backend,rodio_backend
64-
- build_target: macos
65-
artifact_type: full
66-
audio_backend: portaudio_backend,rodio_backend
67-
- build_target: linux-armhf
68-
artifact_type: full
69-
audio_backend: alsa_backend
53+
audio_backends: alsa_backend,pulseaudio_backend,rodio_backend,rodiojack_backend
54+
# Audio backend configuration: macOS
55+
- os: macos
56+
audio_backends: portaudio_backend,rodio_backend
7057
exclude:
71-
- build_target: linux-armv6
72-
artifact_type: 'default' # Raspberry Pi toolchain is too old for dbus/systemd
73-
- build_target: linux-armv6
74-
artifact_type: 'full' # Raspberry Pi toolchain is too old for dbus/systemd
75-
58+
- os: macos
59+
artifact_type: 'full'
60+
- os: macos
61+
arch: armv7
7662
steps:
77-
- name: Installing Rust toolchain
78-
uses: actions-rs/toolchain@v1
79-
with:
80-
toolchain: ${{ matrix.rust }}
81-
target: ${{ matrix.target }}
82-
override: true
63+
- name: Checking out sources
64+
uses: actions/checkout@v4
8365
- name: Installing needed macOS dependencies
84-
if: matrix.os == 'macos-latest'
85-
run: brew install awk dbus pkg-config portaudio
66+
if: matrix.os == 'macos'
67+
run: brew install dbus portaudio
8668
- name: Installing needed Ubuntu dependencies
87-
if: matrix.os == 'ubuntu-latest' || matrix.os == 'ubuntu-18.04'
69+
if: startsWith(matrix.runs_on, 'ubuntu') && matrix.target == ''
8870
run: |
8971
sudo apt-get update
90-
sudo apt-get install -y -qq libasound2-dev libssl-dev libpulse-dev libdbus-1-dev
91-
- name: Installing needed Ubuntu armhf dependencies
92-
if: matrix.os == 'ubuntu-18.04' && matrix.build_target == 'linux-armhf'
72+
# alsa_backend,rodio_backend and base deps
73+
sudo apt-get install -y libasound2-dev libssl-dev libclang-dev clang
74+
# dbus_mpris
75+
sudo apt-get install -y libdbus-1-dev
76+
# pulseaudio_backend
77+
sudo apt-get install -y libpulse-dev
78+
# portaudio_backend
79+
sudo apt-get install -y portaudio19-dev
80+
- name: Determine cargo args
9381
run: |
94-
sudo mkdir -p /build/sysroot
95-
echo "deb [arch=armhf] http://ports.ubuntu.com/ubuntu-ports/ bionic main" | sudo tee -a /etc/apt/sources.list
96-
sudo apt-get update
97-
sudo apt-get install -y -qq gcc-arm-linux-gnueabihf libc6-armhf-cross libc6-dev-armhf-cross
98-
sudo apt-get download libasound2:armhf libasound2-dev:armhf libssl-dev:armhf libssl1.1:armhf
99-
sudo dpkg -x libasound2_*.deb /build/sysroot/
100-
sudo dpkg -x libssl-dev*.deb /build/sysroot/
101-
sudo dpkg -x libssl1.1*.deb /build/sysroot/
102-
sudo dpkg -x libasound2-dev*.deb /build/sysroot/
103-
echo "PKG_CONFIG_ALLOW_CROSS=1" >> $GITHUB_ENV
104-
echo "TEST=abc" >> $GITHUB_ENV
105-
echo "RUSTFLAGS=-C linker=arm-linux-gnueabihf-gcc -L/usr/arm-linux-gnueabihf/lib -L/build/sysroot/usr/lib/arm-linux-gnueabihf -L/build/sysroot/lib/arm-linux-gnueabihf" >> $GITHUB_ENV
106-
echo "C_INCLUDE_PATH=/build/sysroot/usr/include" >> $GITHUB_ENV
107-
echo "OPENSSL_LIB_DIR=/build/sysroot/usr/lib/arm-linux-gnueabihf" >> $GITHUB_ENV
108-
echo "OPENSSL_INCLUDE_DIR=/build/sysroot/usr/include/arm-linux-gnueabihf" >> $GITHUB_ENV
109-
- name: Installing needed Ubuntu armv6 dependencies
110-
if: matrix.os == 'ubuntu-18.04' && matrix.build_target == 'linux-armv6'
111-
run: |
112-
sudo mkdir -p /build/sysroot
113-
echo "deb [arch=armhf] http://ports.ubuntu.com/ubuntu-ports/ bionic main" | sudo tee -a /etc/apt/sources.list
114-
sudo apt-get update
115-
sudo apt-get install -y -qq git
116-
sudo git -C /build clone --depth=1 https://github.com/raspberrypi/tools.git
117-
sudo apt-get download libasound2:armhf libasound2-dev:armhf libssl-dev:armhf libssl1.1:armhf
118-
sudo dpkg -x libasound2_*.deb /build/sysroot/
119-
sudo dpkg -x libssl-dev*.deb /build/sysroot/
120-
sudo dpkg -x libssl1.1*.deb /build/sysroot/
121-
sudo dpkg -x libasound2-dev*.deb /build/sysroot/
122-
echo "/build/tools/arm-bcm2708/arm-linux-gnueabihf/bin" >> $GITHUB_PATH
123-
echo "PKG_CONFIG_ALLOW_CROSS=1" >> $GITHUB_ENV
124-
echo "TEST=abcd" >> $GITHUB_ENV
125-
echo "RUSTFLAGS=-C linker=/build/tools/arm-bcm2708/arm-linux-gnueabihf/bin/arm-linux-gnueabihf-gcc -L/build/tools/arm-bcm2708/arm-linux-gnueabihf/arm-linux-gnueabihf/sysroot/lib -L/build/tools/arm-bcm2708/arm-linux-gnueabihf/arm-linux-gnueabihf/sysroot/usr/lib -L/build/sysroot/usr/lib/arm-linux-gnueabihf -L/build/sysroot/lib/arm-linux-gnueabihf" >> $GITHUB_ENV
126-
echo "C_INCLUDE_PATH=/build/sysroot/usr/include" >> $GITHUB_ENV
127-
echo "OPENSSL_LIB_DIR=/build/sysroot/usr/lib/arm-linux-gnueabihf" >> $GITHUB_ENV
128-
echo "OPENSSL_INCLUDE_DIR=/build/sysroot/usr/include/arm-linux-gnueabihf" >> $GITHUB_ENV
129-
- name: Installing needed Ubuntu armhf dependencies (full)
130-
if: matrix.os == 'ubuntu-18.04' && matrix.build_target == 'linux-armhf' && matrix.artifact_type != 'slim'
82+
features="--no-default-features --features ${{ matrix.dbus }},${{ matrix.audio_backends }}"
83+
echo CARGO_ARGS="--locked --release $features" | tee -a "$GITHUB_ENV"
84+
- name: Build (using cargo)
85+
if: matrix.target == ''
13186
run: |
132-
# Make dbus-rs cross-compile, see https://github.com/diwic/dbus-rs/issues/184#issuecomment-520228758
133-
sudo apt-get download libdbus-1-dev:armhf libdbus-1-3:armhf libsystemd0:armhf libgcrypt20:armhf liblzma5:armhf liblz4-1:armhf libgpg-error0:armhf
134-
sudo dpkg -x libdbus-1-3*.deb /build/sysroot/
135-
sudo dpkg -x libdbus-1-dev*.deb /build/sysroot/
136-
sudo dpkg -x libsystemd0*.deb /build/sysroot/
137-
sudo dpkg -x libgcrypt20_*.deb /build/sysroot/
138-
sudo dpkg -x liblzma5_*.deb /build/sysroot/
139-
sudo dpkg -x liblz4-1_*.deb /build/sysroot/
140-
sudo dpkg -x libgpg-error0_*.deb /build/sysroot/
141-
sudo cp -r /build/sysroot/lib/* /build/sysroot/usr/lib/
142-
sudo ln -frs /build/sysroot/lib/arm-linux-gnueabihf/libdbus-1.so.3 /build/sysroot/lib/arm-linux-gnueabihf/libdbus-1.so
143-
sudo ln -rs /build/sysroot/lib/arm-linux-gnueabihf/libgcrypt.so.20 /build/sysroot/lib/arm-linux-gnueabihf/libgcrypt.so
144-
sudo ln -rs /build/sysroot/lib/arm-linux-gnueabihf/libgpg-error.so.0 /build/sysroot/lib/arm-linux-gnueabihf/libgpg-error.so
145-
sudo ln -rs /build/sysroot/lib/arm-linux-gnueabihf/liblzma.so.5 /build/sysroot/lib/arm-linux-gnueabihf/liblzma.so
146-
sudo ln -rs /build/sysroot/lib/arm-linux-gnueabihf/libsystemd.so.0 /build/sysroot/lib/arm-linux-gnueabihf/libsystemd.so
147-
sudo ln -rs /build/sysroot/usr/lib/arm-linux-gnueabihf/liblz4.so.1 /build/sysroot/usr/lib/arm-linux-gnueabihf/liblz4.so
148-
sudo mkdir -p /.cargo
149-
echo -e '[target.arm-unknown-linux-gnueabihf.dbus]\nrustc-link-lib = ["dbus-1", "gcrypt", "gpg-error", "lz4", "lzma", "systemd"]' | sudo tee -a /.cargo/config
150-
- name: Checking out sources
151-
uses: actions/checkout@v1
152-
- name: Running cargo build
153-
uses: actions-rs/cargo@v1
87+
cargo +${{ matrix.rust }} build $CARGO_ARGS
88+
- name: Build (using cross)
89+
if: matrix.target != ''
90+
uses: houseabsolute/actions-rust-cross@v1
15491
with:
92+
cross-version: 49338b1 # currently needed (check again if cross version > 0.2.5)
15593
command: build
15694
toolchain: ${{ matrix.rust }}
157-
args: --locked --release --target ${{ matrix.target }} --no-default-features --features "${{ matrix.feature }},${{ matrix.audio_backend }}"
95+
target: ${{ matrix.target }}
96+
args: $CARGO_ARGS
97+
- name: Uploading artifacts
98+
uses: actions/upload-artifact@v4
99+
with:
100+
name: spotifyd-${{ matrix.os }}-${{ matrix.arch }}-${{ matrix.artifact_type }}
101+
path: target/${{ matrix.target }}/release/spotifyd
102+
release: # only runs when a version tag is pushed
103+
if: startsWith(github.ref, 'refs/tags/v')
104+
needs: build
105+
runs-on: ubuntu-latest
106+
steps:
107+
- name: Downloading artifacts # download all binaries
108+
uses: actions/download-artifact@v4
158109
- name: Packaging final binary
159110
shell: bash
160111
run: |
161-
cd target/${{ matrix.target }}/release
162-
tar czvf spotifyd-${{ matrix.artifact_prefix }}-${{ matrix.artifact_type }}.tar.gz spotifyd
163-
shasum -a 512 spotifyd-${{ matrix.artifact_prefix }}-${{ matrix.artifact_type }}.tar.gz > spotifyd-${{ matrix.artifact_prefix }}-${{ matrix.artifact_type }}.sha512
112+
for artifact_dir in ./*/
113+
do
114+
pushd $artifact_dir
115+
artifact_name=$(basename $artifact_dir)
116+
tar czvf $artifact_name.tar.gz spotifyd
117+
shasum -a 512 $artifact_name.tar.gz > $artifact_name.sha512
118+
popd
119+
done
164120
- name: Releasing assets
165121
uses: softprops/action-gh-release@v1
166122
with:
167123
files: |
168-
target/${{ matrix.target }}/release/spotifyd-${{ matrix.artifact_prefix }}-${{ matrix.artifact_type }}.tar.gz
169-
target/${{ matrix.target }}/release/spotifyd-${{ matrix.artifact_prefix }}-${{ matrix.artifact_type }}.sha512
124+
**/*.tar.gz
125+
**/*.sha512
170126
env:
171127
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/ci.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ jobs:
5656
runs-on: ${{ matrix.os }}
5757
strategy:
5858
matrix:
59-
rust: [stable, 1.81]
59+
rust: [stable, 1.82]
6060
os: [macos-latest, ubuntu-latest]
6161
include:
6262
- os: macos-latest

CHANGELOG.md

+25
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,43 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
66

77
## [Unreleased]
88

9+
### Breaking
10+
- username and password authentaction have been removed and are replaced by OAuth ([#1321])
11+
Look at the [docs](https://docs.spotifyd.rs) for setup instructions.
12+
913
### Added
1014
- retry enabling discovery several times before exiting ([#1228])
15+
- development artifacts are now available ([#1332])
16+
- prebuilt binaries are available for `aarch64` (both Linux and macOS) ([#1332])
17+
- Windows and Android are now supported ([#1219], [#1314])
18+
- expose pipe and subprocess backends ([#1284])
19+
- new device type options are available ([#1316])
20+
- OAuth login is now supported ([#1321])
21+
- a warning is emitted on unsupported configuration values ([#1327])
1122

1223
### Changed
24+
- the docs have been overhauled to reflect the current state of the project and simplify onboarding ([#1327])
25+
- `librespot` dependency has been updated to 0.6 ([#1317])
1326
- Credential caching has been re-enabled. ([#1214])
1427

1528
### Fixed
1629
- alsa mixer: volume calculation has been fixed ([#1229])
1730

31+
### Removed
32+
- `armv6` binaries are no longer available by default ([#1332])
33+
If you still need them, please join our matrix channel (https://matrix.to/#/#spotifyd:matrix.org) and tell us!
34+
1835
[#1214]: https://github.com/Spotifyd/spotifyd/pull/1214
1936
[#1229]: https://github.com/Spotifyd/spotifyd/pull/1229
2037
[#1228]: https://github.com/Spotifyd/spotifyd/pull/1228
38+
[#1284]: https://github.com/Spotifyd/spotifyd/pull/1284
39+
[#1219]: https://github.com/Spotifyd/spotifyd/pull/1219
40+
[#1314]: https://github.com/Spotifyd/spotifyd/pull/1314
41+
[#1316]: https://github.com/Spotifyd/spotifyd/pull/1316
42+
[#1317]: https://github.com/Spotifyd/spotifyd/pull/1317
43+
[#1321]: https://github.com/Spotifyd/spotifyd/pull/1321
44+
[#1327]: https://github.com/Spotifyd/spotifyd/pull/1327
45+
[#1332]: https://github.com/Spotifyd/spotifyd/pull/1332
2146

2247
## [0.3.5]
2348

0 commit comments

Comments
 (0)