1
0
Fork 0
mirror of https://github.com/librespot-org/librespot.git synced 2025-10-03 09:49:31 +02:00

ci: bump MSRV to 1.85 and update actions

This commit is contained in:
Roderick van Domburg 2025-08-13 17:06:14 +02:00
parent 1dcd041070
commit 648c9e30ea
No known key found for this signature in database
GPG key ID: 607FA06CB5236AE0
5 changed files with 44 additions and 44 deletions

View file

@ -1,6 +1,6 @@
# syntax=docker/dockerfile:1
ARG debian_version=slim-bookworm
ARG rust_version=1.81.0
ARG rust_version=1.85.0
FROM rust:${rust_version}-${debian_version}
ARG DEBIAN_FRONTEND=noninteractive

View file

@ -1,6 +1,6 @@
# syntax=docker/dockerfile:1
ARG alpine_version=alpine3.19
ARG rust_version=1.81.0
ARG rust_version=1.85.0
FROM rust:${rust_version}-${alpine_version}
ENV CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"

View file

@ -51,7 +51,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4.2.2
uses: actions/checkout@v5
- name: Install toolchain
run: curl https://sh.rustup.rs -sSf | sh -s -- --profile default --default-toolchain stable -y
- run: cargo fmt --all -- --check
@ -68,7 +68,7 @@ jobs:
toolchain: [stable]
steps:
- name: Checkout code
uses: actions/checkout@v4.2.2
uses: actions/checkout@v4
- name: Install toolchain
run: curl https://sh.rustup.rs -sSf | sh -s -- --profile default --default-toolchain ${{ matrix.toolchain }} -y
@ -79,7 +79,7 @@ jobs:
shell: bash
- name: Cache Rust dependencies
uses: actions/cache@v4.2.0
uses: actions/cache@v4
with:
path: |
~/.cargo/registry/index
@ -109,7 +109,7 @@ jobs:
matrix:
os: [ubuntu-latest]
toolchain:
- "1.81" # MSRV (Minimum supported rust version)
- "1.85" # MSRV (Minimum supported rust version)
- stable
experimental: [false]
# Ignore failures in beta
@ -119,7 +119,7 @@ jobs:
experimental: true
steps:
- name: Checkout code
uses: actions/checkout@v4.2.2
uses: actions/checkout@v5
- name: Install toolchain
run: curl https://sh.rustup.rs -sSf | sh -s -- --profile minimal --default-toolchain ${{ matrix.toolchain }} -y
@ -130,7 +130,7 @@ jobs:
shell: bash
- name: Cache Rust dependencies
uses: actions/cache@v4.2.0
uses: actions/cache@v4
with:
path: |
~/.cargo/registry/index
@ -164,12 +164,12 @@ jobs:
matrix:
os: [windows-latest]
toolchain:
- "1.81" # MSRV (Minimum supported rust version)
- "1.85" # MSRV (Minimum supported rust version)
- stable
steps:
- name: Checkout code
uses: actions/checkout@v4.2.2
uses: actions/checkout@v5
# hyper-rustls >=0.27 uses aws-lc as default backend which requires NASM to build
- name: Install NASM
uses: ilammy/setup-nasm@v1.5.1
@ -183,7 +183,7 @@ jobs:
shell: bash
- name: Cache Rust dependencies
uses: actions/cache@v4.2.0
uses: actions/cache@v4
with:
path: |
~/.cargo/registry/index
@ -210,16 +210,16 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest]
target:
target:
- armv7-unknown-linux-gnueabihf
- aarch64-unknown-linux-gnu
- riscv64gc-unknown-linux-gnu
toolchain:
- "1.81" # MSRV (Minimum supported rust version)
- "1.85" # MSRV (Minimum supported rust version)
- stable
steps:
- name: Checkout code
uses: actions/checkout@v4.2.2
uses: actions/checkout@v5
- name: Install toolchain
run: curl https://sh.rustup.rs -sSf | sh -s -- --profile minimal --default-toolchain ${{ matrix.toolchain }} -y
@ -230,7 +230,7 @@ jobs:
shell: bash
- name: Cache Rust dependencies
uses: actions/cache@v4.2.0
uses: actions/cache@v4
with:
path: |
~/.cargo/registry/index
@ -250,36 +250,36 @@ jobs:
- name: Install cross compiler
run: |
if [ ${{ matrix.target }} = "armv7-unknown-linux-gnueabihf" ]; then
sudo apt-get install -y gcc-arm-linux-gnueabihf
fi
if [ ${{ matrix.target }} = "aarch64-unknown-linux-gnu" ]; then
sudo apt-get install -y gcc-aarch64-linux-gnu
fi
if [ ${{ matrix.target }} = "riscv64gc-unknown-linux-gnu" ]; then
sudo apt-get install -y gcc-riscv64-linux-gnu
fi
if [ ${{ matrix.target }} = "armv7-unknown-linux-gnueabihf" ]; then
sudo apt-get install -y gcc-arm-linux-gnueabihf
fi
if [ ${{ matrix.target }} = "aarch64-unknown-linux-gnu" ]; then
sudo apt-get install -y gcc-aarch64-linux-gnu
fi
if [ ${{ matrix.target }} = "riscv64gc-unknown-linux-gnu" ]; then
sudo apt-get install -y gcc-riscv64-linux-gnu
fi
- name: Set target link compiler
run: |
# Convert target to uppercase and replace - with _
target=${{ matrix.target }}
target=${target^^}
target=${target//-/_}
if [ ${{ matrix.target }} = "armv7-unknown-linux-gnueabihf" ]; then
echo "CARGO_TARGET_${target}_LINKER=arm-linux-gnueabihf-gcc" >> $GITHUB_ENV
fi
if [ ${{ matrix.target }} = "aarch64-unknown-linux-gnu" ]; then
echo "CARGO_TARGET_${target}_LINKER=aarch64-linux-gnu-gcc" >> $GITHUB_ENV
fi
if [ ${{ matrix.target }} = "riscv64gc-unknown-linux-gnu" ]; then
echo "CARGO_TARGET_${target}_LINKER=riscv64-linux-gnu-gcc" >> $GITHUB_ENV
fi
# Convert target to uppercase and replace - with _
target=${{ matrix.target }}
target=${target^^}
target=${target//-/_}
if [ ${{ matrix.target }} = "armv7-unknown-linux-gnueabihf" ]; then
echo "CARGO_TARGET_${target}_LINKER=arm-linux-gnueabihf-gcc" >> $GITHUB_ENV
fi
if [ ${{ matrix.target }} = "aarch64-unknown-linux-gnu" ]; then
echo "CARGO_TARGET_${target}_LINKER=aarch64-linux-gnu-gcc" >> $GITHUB_ENV
fi
if [ ${{ matrix.target }} = "riscv64gc-unknown-linux-gnu" ]; then
echo "CARGO_TARGET_${target}_LINKER=riscv64-linux-gnu-gcc" >> $GITHUB_ENV
fi
- name: Fetch
run: cargo fetch --locked
- name: Build
run: cargo build --frozen --verbose --target ${{ matrix.target }} --no-default-features
- name: Check binary
run: file target/${{ matrix.target }}/debug/librespot

View file

@ -40,10 +40,10 @@ RUN dpkg --add-architecture arm64 && \
libpulse0:arm64 \
libpulse0:armel \
libpulse0:armhf \
pkg-config
pkg-config
ENV PATH="/root/.cargo/bin/:${PATH}"
RUN curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain 1.81 -y && \
RUN curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain 1.85 -y && \
rustup target add aarch64-unknown-linux-gnu && \
rustup target add arm-unknown-linux-gnueabi && \
rustup target add arm-unknown-linux-gnueabihf && \

View file

@ -22,7 +22,7 @@ RUN mkdir /sysroot && \
dpkg -x libasound2-dev*.deb /sysroot/
# Install rust.
RUN curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain 1.81 -y
RUN curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain 1.85 -y
ENV PATH="/root/.cargo/bin/:${PATH}"
RUN rustup target add arm-unknown-linux-gnueabihf
RUN mkdir /.cargo && \