From 648c9e30eabb3dbdd4792c0be9d767a9b8a3f8e7 Mon Sep 17 00:00:00 2001 From: Roderick van Domburg Date: Wed, 13 Aug 2025 17:06:14 +0200 Subject: [PATCH] ci: bump MSRV to 1.85 and update actions --- .devcontainer/Dockerfile | 2 +- .devcontainer/Dockerfile.alpine | 2 +- .github/workflows/test.yml | 78 ++++++++++++------------ contrib/Dockerfile | 4 +- contrib/cross-compile-armv6hf/Dockerfile | 2 +- 5 files changed, 44 insertions(+), 44 deletions(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 233ac838..d7594a55 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -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 diff --git a/.devcontainer/Dockerfile.alpine b/.devcontainer/Dockerfile.alpine index 1a908955..bec4bb71 100644 --- a/.devcontainer/Dockerfile.alpine +++ b/.devcontainer/Dockerfile.alpine @@ -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" diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b58e61c2..5e84f9c0 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -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 diff --git a/contrib/Dockerfile b/contrib/Dockerfile index 644ab029..cae7a6d7 100644 --- a/contrib/Dockerfile +++ b/contrib/Dockerfile @@ -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 && \ diff --git a/contrib/cross-compile-armv6hf/Dockerfile b/contrib/cross-compile-armv6hf/Dockerfile index 16694afa..86ac2644 100644 --- a/contrib/cross-compile-armv6hf/Dockerfile +++ b/contrib/cross-compile-armv6hf/Dockerfile @@ -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 && \