Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

prepare release #1332

Merged
merged 12 commits into from
Mar 7, 2025
226 changes: 91 additions & 135 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,170 +2,126 @@ name: Continuous Deployment

on:
push:
branches:
- master
tags:
- 'v*.*.*'

jobs:
publish:
name: Publishing ${{ matrix.build_target }}-${{ matrix.artifact_type }}
runs-on: ${{ matrix.os }}
build:
name: Building ${{matrix.os}}-${{ matrix.arch }} (${{ matrix.artifact_type }})
runs-on: ${{ matrix.runs_on }}
strategy:
matrix:
build_target: [macos, linux, linux-armhf, linux-armv6]
os: [macos, linux]
arch: [x86_64, aarch64, armv7]
rust: [stable]
artifact_type: ['slim', 'default', 'full'] # The build strategy will build all types for each OS specified
include:
- artifact_type: 'slim' # Slim version has no features enabled by default.
feature: ''
- artifact_type: 'default'
feature: 'dbus_mpris' # Default version has all extra features enabled
- artifact_type: 'full'
feature: 'dbus_mpris' # Full version has all extra features and audio backends enabled
- build_target: macos
os: macos-latest
artifact_prefix: macos
target: x86_64-apple-darwin
- build_target: linux
os: ubuntu-latest
artifact_prefix: linux
target: x86_64-unknown-linux-gnu
- build_target: linux-armhf
os: ubuntu-18.04
artifact_prefix: linux-armhf
target: arm-unknown-linux-gnueabihf
- build_target: linux-armv6
os: ubuntu-18.04
artifact_prefix: linux-armv6
target: arm-unknown-linux-gnueabihf
- build_target: macos
# Runner configuration
- os: macos
arch: x86_64
runs_on: macos-13
- os: macos
arch: aarch64
runs_on: macos-latest
- os: linux
runs_on: ubuntu-latest
# DBus configuration
- artifact_type: slim
dbus: ''
- artifact_type: default
dbus: dbus_mpris
- artifact_type: full
dbus: dbus_mpris
# Cross Compilation Targets
- os: linux
arch: aarch64
target: aarch64-unknown-linux-gnu
- os: linux
arch: armv7
target: armv7-unknown-linux-gnueabihf
# Audio backend configuration: Linux
- os: linux
artifact_type: slim
audio_backend: portaudio_backend
- build_target: linux
artifact_type: slim
audio_backend: pulseaudio_backend
- build_target: linux-armhf
artifact_type: slim
audio_backend: alsa_backend
- build_target: linux-armv6
artifact_type: slim
audio_backend: alsa_backend
- build_target: macos
artifact_type: default
audio_backend: portaudio_backend
- build_target: linux
artifact_type: default
audio_backend: pulseaudio_backend
- build_target: linux-armhf
audio_backends: alsa_backend
- os: linux
artifact_type: default
audio_backend: alsa_backend
- build_target: linux
audio_backends: alsa_backend,pulseaudio_backend,rodio_backend
- os: linux
artifact_type: full
audio_backend: pulseaudio_backend,alsa_backend,rodio_backend
- build_target: macos
artifact_type: full
audio_backend: portaudio_backend,rodio_backend
- build_target: linux-armhf
artifact_type: full
audio_backend: alsa_backend
audio_backends: alsa_backend,pulseaudio_backend,rodio_backend,rodiojack_backend
# Audio backend configuration: macOS
- os: macos
audio_backends: portaudio_backend,rodio_backend
exclude:
- build_target: linux-armv6
artifact_type: 'default' # Raspberry Pi toolchain is too old for dbus/systemd
- build_target: linux-armv6
artifact_type: 'full' # Raspberry Pi toolchain is too old for dbus/systemd

- os: macos
artifact_type: 'full'
- os: macos
arch: armv7
steps:
- name: Installing Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
target: ${{ matrix.target }}
override: true
- name: Checking out sources
uses: actions/checkout@v4
- name: Installing needed macOS dependencies
if: matrix.os == 'macos-latest'
run: brew install awk dbus pkg-config portaudio
if: matrix.os == 'macos'
run: brew install dbus portaudio
- name: Installing needed Ubuntu dependencies
if: matrix.os == 'ubuntu-latest' || matrix.os == 'ubuntu-18.04'
if: startsWith(matrix.runs_on, 'ubuntu') && matrix.target == ''
run: |
sudo apt-get update
sudo apt-get install -y -qq libasound2-dev libssl-dev libpulse-dev libdbus-1-dev
- name: Installing needed Ubuntu armhf dependencies
if: matrix.os == 'ubuntu-18.04' && matrix.build_target == 'linux-armhf'
# alsa_backend,rodio_backend and base deps
sudo apt-get install -y libasound2-dev libssl-dev libclang-dev clang
# dbus_mpris
sudo apt-get install -y libdbus-1-dev
# pulseaudio_backend
sudo apt-get install -y libpulse-dev
# portaudio_backend
sudo apt-get install -y portaudio19-dev
- name: Determine cargo args
run: |
sudo mkdir -p /build/sysroot
echo "deb [arch=armhf] http://ports.ubuntu.com/ubuntu-ports/ bionic main" | sudo tee -a /etc/apt/sources.list
sudo apt-get update
sudo apt-get install -y -qq gcc-arm-linux-gnueabihf libc6-armhf-cross libc6-dev-armhf-cross
sudo apt-get download libasound2:armhf libasound2-dev:armhf libssl-dev:armhf libssl1.1:armhf
sudo dpkg -x libasound2_*.deb /build/sysroot/
sudo dpkg -x libssl-dev*.deb /build/sysroot/
sudo dpkg -x libssl1.1*.deb /build/sysroot/
sudo dpkg -x libasound2-dev*.deb /build/sysroot/
echo "PKG_CONFIG_ALLOW_CROSS=1" >> $GITHUB_ENV
echo "TEST=abc" >> $GITHUB_ENV
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
echo "C_INCLUDE_PATH=/build/sysroot/usr/include" >> $GITHUB_ENV
echo "OPENSSL_LIB_DIR=/build/sysroot/usr/lib/arm-linux-gnueabihf" >> $GITHUB_ENV
echo "OPENSSL_INCLUDE_DIR=/build/sysroot/usr/include/arm-linux-gnueabihf" >> $GITHUB_ENV
- name: Installing needed Ubuntu armv6 dependencies
if: matrix.os == 'ubuntu-18.04' && matrix.build_target == 'linux-armv6'
run: |
sudo mkdir -p /build/sysroot
echo "deb [arch=armhf] http://ports.ubuntu.com/ubuntu-ports/ bionic main" | sudo tee -a /etc/apt/sources.list
sudo apt-get update
sudo apt-get install -y -qq git
sudo git -C /build clone --depth=1 https://github.com/raspberrypi/tools.git
sudo apt-get download libasound2:armhf libasound2-dev:armhf libssl-dev:armhf libssl1.1:armhf
sudo dpkg -x libasound2_*.deb /build/sysroot/
sudo dpkg -x libssl-dev*.deb /build/sysroot/
sudo dpkg -x libssl1.1*.deb /build/sysroot/
sudo dpkg -x libasound2-dev*.deb /build/sysroot/
echo "/build/tools/arm-bcm2708/arm-linux-gnueabihf/bin" >> $GITHUB_PATH
echo "PKG_CONFIG_ALLOW_CROSS=1" >> $GITHUB_ENV
echo "TEST=abcd" >> $GITHUB_ENV
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
echo "C_INCLUDE_PATH=/build/sysroot/usr/include" >> $GITHUB_ENV
echo "OPENSSL_LIB_DIR=/build/sysroot/usr/lib/arm-linux-gnueabihf" >> $GITHUB_ENV
echo "OPENSSL_INCLUDE_DIR=/build/sysroot/usr/include/arm-linux-gnueabihf" >> $GITHUB_ENV
- name: Installing needed Ubuntu armhf dependencies (full)
if: matrix.os == 'ubuntu-18.04' && matrix.build_target == 'linux-armhf' && matrix.artifact_type != 'slim'
features="--no-default-features --features ${{ matrix.dbus }},${{ matrix.audio_backends }}"
echo CARGO_ARGS="--locked --release $features" | tee -a "$GITHUB_ENV"
- name: Build (using cargo)
if: matrix.target == ''
run: |
# Make dbus-rs cross-compile, see https://github.com/diwic/dbus-rs/issues/184#issuecomment-520228758
sudo apt-get download libdbus-1-dev:armhf libdbus-1-3:armhf libsystemd0:armhf libgcrypt20:armhf liblzma5:armhf liblz4-1:armhf libgpg-error0:armhf
sudo dpkg -x libdbus-1-3*.deb /build/sysroot/
sudo dpkg -x libdbus-1-dev*.deb /build/sysroot/
sudo dpkg -x libsystemd0*.deb /build/sysroot/
sudo dpkg -x libgcrypt20_*.deb /build/sysroot/
sudo dpkg -x liblzma5_*.deb /build/sysroot/
sudo dpkg -x liblz4-1_*.deb /build/sysroot/
sudo dpkg -x libgpg-error0_*.deb /build/sysroot/
sudo cp -r /build/sysroot/lib/* /build/sysroot/usr/lib/
sudo ln -frs /build/sysroot/lib/arm-linux-gnueabihf/libdbus-1.so.3 /build/sysroot/lib/arm-linux-gnueabihf/libdbus-1.so
sudo ln -rs /build/sysroot/lib/arm-linux-gnueabihf/libgcrypt.so.20 /build/sysroot/lib/arm-linux-gnueabihf/libgcrypt.so
sudo ln -rs /build/sysroot/lib/arm-linux-gnueabihf/libgpg-error.so.0 /build/sysroot/lib/arm-linux-gnueabihf/libgpg-error.so
sudo ln -rs /build/sysroot/lib/arm-linux-gnueabihf/liblzma.so.5 /build/sysroot/lib/arm-linux-gnueabihf/liblzma.so
sudo ln -rs /build/sysroot/lib/arm-linux-gnueabihf/libsystemd.so.0 /build/sysroot/lib/arm-linux-gnueabihf/libsystemd.so
sudo ln -rs /build/sysroot/usr/lib/arm-linux-gnueabihf/liblz4.so.1 /build/sysroot/usr/lib/arm-linux-gnueabihf/liblz4.so
sudo mkdir -p /.cargo
echo -e '[target.arm-unknown-linux-gnueabihf.dbus]\nrustc-link-lib = ["dbus-1", "gcrypt", "gpg-error", "lz4", "lzma", "systemd"]' | sudo tee -a /.cargo/config
- name: Checking out sources
uses: actions/checkout@v1
- name: Running cargo build
uses: actions-rs/cargo@v1
cargo +${{ matrix.rust }} build $CARGO_ARGS
- name: Build (using cross)
if: matrix.target != ''
uses: houseabsolute/actions-rust-cross@v1
with:
cross-version: 49338b1 # currently needed (check again if cross version > 0.2.5)
command: build
toolchain: ${{ matrix.rust }}
args: --locked --release --target ${{ matrix.target }} --no-default-features --features "${{ matrix.feature }},${{ matrix.audio_backend }}"
target: ${{ matrix.target }}
args: $CARGO_ARGS
- name: Uploading artifacts
uses: actions/upload-artifact@v4
with:
name: spotifyd-${{ matrix.os }}-${{ matrix.arch }}-${{ matrix.artifact_type }}
path: target/${{ matrix.target }}/release/spotifyd
release: # only runs when a version tag is pushed
if: startsWith(github.ref, 'refs/tags/v')
needs: build
runs-on: ubuntu-latest
steps:
- name: Downloading artifacts # download all binaries
uses: actions/download-artifact@v4
- name: Packaging final binary
shell: bash
run: |
cd target/${{ matrix.target }}/release
tar czvf spotifyd-${{ matrix.artifact_prefix }}-${{ matrix.artifact_type }}.tar.gz spotifyd
shasum -a 512 spotifyd-${{ matrix.artifact_prefix }}-${{ matrix.artifact_type }}.tar.gz > spotifyd-${{ matrix.artifact_prefix }}-${{ matrix.artifact_type }}.sha512
for artifact_dir in ./*/
do
pushd $artifact_dir
artifact_name=$(basename $artifact_dir)
tar czvf $artifact_name.tar.gz spotifyd
shasum -a 512 $artifact_name.tar.gz > $artifact_name.sha512
popd
done
- name: Releasing assets
uses: softprops/action-gh-release@v1
with:
files: |
target/${{ matrix.target }}/release/spotifyd-${{ matrix.artifact_prefix }}-${{ matrix.artifact_type }}.tar.gz
target/${{ matrix.target }}/release/spotifyd-${{ matrix.artifact_prefix }}-${{ matrix.artifact_type }}.sha512
**/*.tar.gz
**/*.sha512
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
rust: [stable, 1.81]
rust: [stable, 1.82]
os: [macos-latest, ubuntu-latest]
include:
- os: macos-latest
Expand Down
25 changes: 25 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,43 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Breaking
- username and password authentaction have been removed and are replaced by OAuth ([#1321])
Look at the [docs](https://docs.spotifyd.rs) for setup instructions.

### Added
- retry enabling discovery several times before exiting ([#1228])
- development artifacts are now available ([#1332])
- prebuilt binaries are available for `aarch64` (both Linux and macOS) ([#1332])
- Windows and Android are now supported ([#1219], [#1314])
- expose pipe and subprocess backends ([#1284])
- new device type options are available ([#1316])
- OAuth login is now supported ([#1321])
- a warning is emitted on unsupported configuration values ([#1327])

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

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

### Removed
- `armv6` binaries are no longer available by default ([#1332])
If you still need them, please join our matrix channel (https://matrix.to/#/#spotifyd:matrix.org) and tell us!

[#1214]: https://github.com/Spotifyd/spotifyd/pull/1214
[#1229]: https://github.com/Spotifyd/spotifyd/pull/1229
[#1228]: https://github.com/Spotifyd/spotifyd/pull/1228
[#1284]: https://github.com/Spotifyd/spotifyd/pull/1284
[#1219]: https://github.com/Spotifyd/spotifyd/pull/1219
[#1314]: https://github.com/Spotifyd/spotifyd/pull/1314
[#1316]: https://github.com/Spotifyd/spotifyd/pull/1316
[#1317]: https://github.com/Spotifyd/spotifyd/pull/1317
[#1321]: https://github.com/Spotifyd/spotifyd/pull/1321
[#1327]: https://github.com/Spotifyd/spotifyd/pull/1327
[#1332]: https://github.com/Spotifyd/spotifyd/pull/1332

## [0.3.5]

Expand Down
Loading
Loading