From e031882474e8e6dfe7976b42557df2ad4cafd53f Mon Sep 17 00:00:00 2001 From: LucasFA <23667494+LucasFA@users.noreply.github.com> Date: Tue, 12 Mar 2024 14:09:34 +0100 Subject: [PATCH] ci: Update docker images for arm See https://github.com/cross-rs/cross/wiki/Configuration#builddockerfile for context regarding the $CROSS_BASE_IMAGE environment variable. Here, it resolves to ghcr.io/cross-rs/armv7-unknown-linux-gnueabihf:{{cross_version}} Relies on docker caching instead of pre-building the image. Cross made the change to the GHCR on https://github.com/cross-rs/cross/pull/609 Add newline at EOF for some files. --- .github/workflows/cpal.yml | 3 --- Cross.toml | 4 ++-- Dockerfile | 5 +++-- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/.github/workflows/cpal.yml b/.github/workflows/cpal.yml index c2061ebac..4c475fa5f 100644 --- a/.github/workflows/cpal.yml +++ b/.github/workflows/cpal.yml @@ -85,9 +85,6 @@ jobs: with: target: armv7-unknown-linux-gnueabihf - - name: Build image - run: docker build -t cross/cpal_armv7:v1 ./ - - name: Install cross run: cargo install cross diff --git a/Cross.toml b/Cross.toml index 39abb8173..6d0ad81d1 100644 --- a/Cross.toml +++ b/Cross.toml @@ -1,7 +1,7 @@ [target.armv7-unknown-linux-gnueabihf] -image = "cross/cpal_armv7:v1" +dockerfile = "Dockerfile" [target.armv7-unknown-linux-gnueabihf.env] passthrough = [ "RUSTFLAGS", -] \ No newline at end of file +] diff --git a/Dockerfile b/Dockerfile index 05045c34f..3fa3b24ab 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,5 @@ -FROM rustembedded/cross:armv7-unknown-linux-gnueabihf +ARG CROSS_BASE_IMAGE +FROM $CROSS_BASE_IMAGE ENV PKG_CONFIG_ALLOW_CROSS 1 ENV PKG_CONFIG_PATH /usr/lib/arm-linux-gnueabihf/pkgconfig/ @@ -6,4 +7,4 @@ ENV PKG_CONFIG_PATH /usr/lib/arm-linux-gnueabihf/pkgconfig/ RUN dpkg --add-architecture armhf && \ apt-get update && \ apt-get install libasound2-dev:armhf -y && \ - apt-get install libjack-jackd2-dev:armhf libjack-jackd2-0:armhf -y \ \ No newline at end of file + apt-get install libjack-jackd2-dev:armhf libjack-jackd2-0:armhf -y \