1
0
mirror of https://github.com/esphome/esphome.git synced 2025-02-08 06:00:56 +00:00

Remove arm/v7 container image support (#8194)

This commit is contained in:
Jesse Hills 2025-02-05 07:56:38 +13:00 committed by GitHub
parent 6b55df36c7
commit bd34697715
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 12 additions and 52 deletions

View File

@ -37,7 +37,7 @@ jobs:
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
arch: [amd64, armv7, aarch64] arch: [amd64, aarch64]
build_type: ["ha-addon", "docker", "lint"] build_type: ["ha-addon", "docker", "lint"]
steps: steps:
- uses: actions/checkout@v4.1.7 - uses: actions/checkout@v4.1.7

View File

@ -80,7 +80,6 @@ jobs:
matrix: matrix:
platform: platform:
- linux/amd64 - linux/amd64
- linux/arm/v7
- linux/arm64 - linux/arm64
steps: steps:
- uses: actions/checkout@v4.1.7 - uses: actions/checkout@v4.1.7

View File

@ -51,19 +51,7 @@ ENV \
# Store globally installed pio libs in /piolibs # Store globally installed pio libs in /piolibs
PLATFORMIO_GLOBALLIB_DIR=/piolibs PLATFORMIO_GLOBALLIB_DIR=/piolibs
# Support legacy binaries on Debian multiarch system. There is no "correct" way
# to do this, other than using properly built toolchains...
# See: https://unix.stackexchange.com/questions/553743/correct-way-to-add-lib-ld-linux-so-3-in-debian
RUN \ RUN \
if [ "$TARGETARCH$TARGETVARIANT" = "armv7" ]; then \
ln -s /lib/arm-linux-gnueabihf/ld-linux-armhf.so.3 /lib/ld-linux.so.3; \
fi
RUN \
# Ubuntu python3-pip is missing wheel
if [ "$TARGETARCH$TARGETVARIANT" = "armv7" ]; then \
export PIP_EXTRA_INDEX_URL="https://www.piwheels.org/simple"; \
fi; \
pip3 install \ pip3 install \
--break-system-packages --no-cache-dir \ --break-system-packages --no-cache-dir \
# Keep platformio version in sync with requirements.txt # Keep platformio version in sync with requirements.txt
@ -82,14 +70,6 @@ RUN --mount=type=tmpfs,target=/root/.cargo <<END-OF-RUN
# Fail on any non-zero status # Fail on any non-zero status
set -e set -e
if [ "$TARGETARCH$TARGETVARIANT" = "armv7" ]
then
curl -L https://www.piwheels.org/cp311/cryptography-43.0.0-cp37-abi3-linux_armv7l.whl -o /tmp/cryptography-43.0.0-cp37-abi3-linux_armv7l.whl
pip3 install --break-system-packages --no-cache-dir /tmp/cryptography-43.0.0-cp37-abi3-linux_armv7l.whl
rm /tmp/cryptography-43.0.0-cp37-abi3-linux_armv7l.whl
export PIP_EXTRA_INDEX_URL="https://www.piwheels.org/simple";
fi
# install build tools in case wheels are not available # install build tools in case wheels are not available
BUILD_DEPS=" BUILD_DEPS="
build-essential=12.9 build-essential=12.9
@ -106,7 +86,7 @@ LIB_DEPS="
libtiff6=4.5.0-6+deb12u1 libtiff6=4.5.0-6+deb12u1
libopenjp2-7=2.5.0-2 libopenjp2-7=2.5.0-2
" "
if [ "$TARGETARCH$TARGETVARIANT" = "arm64" ] || [ "$TARGETARCH$TARGETVARIANT" = "armv7" ] if [ "$TARGETARCH$TARGETVARIANT" = "arm64" ]
then then
apt-get update apt-get update
apt-get install -y --no-install-recommends $BUILD_DEPS $LIB_DEPS apt-get install -y --no-install-recommends $BUILD_DEPS $LIB_DEPS
@ -115,7 +95,7 @@ fi
CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse CARGO_HOME=/root/.cargo CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse CARGO_HOME=/root/.cargo
pip3 install --break-system-packages --no-cache-dir -r /requirements.txt -r /requirements_optional.txt pip3 install --break-system-packages --no-cache-dir -r /requirements.txt -r /requirements_optional.txt
if [ "$TARGETARCH$TARGETVARIANT" = "arm64" ] || [ "$TARGETARCH$TARGETVARIANT" = "armv7" ] if [ "$TARGETARCH$TARGETVARIANT" = "arm64" ]
then then
apt-get remove -y --purge --auto-remove $BUILD_DEPS apt-get remove -y --purge --auto-remove $BUILD_DEPS
rm -rf /tmp/* /var/{cache,log}/* /var/lib/apt/lists/* rm -rf /tmp/* /var/{cache,log}/* /var/lib/apt/lists/*
@ -135,11 +115,7 @@ FROM base AS docker
# Copy esphome and install # Copy esphome and install
COPY . /esphome COPY . /esphome
RUN if [ "$TARGETARCH$TARGETVARIANT" = "armv7" ]; then \ RUN pip3 install --break-system-packages --no-cache-dir -e /esphome
export PIP_EXTRA_INDEX_URL="https://www.piwheels.org/simple"; \
fi; \
pip3 install \
--break-system-packages --no-cache-dir -e /esphome
# Settings for dashboard # Settings for dashboard
ENV USERNAME="" PASSWORD="" ENV USERNAME="" PASSWORD=""
@ -197,11 +173,7 @@ COPY docker/ha-addon-rootfs/ /
# Copy esphome and install # Copy esphome and install
COPY . /esphome COPY . /esphome
RUN if [ "$TARGETARCH$TARGETVARIANT" = "armv7" ]; then \ RUN pip3 install --break-system-packages --no-cache-dir -e /esphome
export PIP_EXTRA_INDEX_URL="https://www.piwheels.org/simple"; \
fi; \
pip3 install \
--break-system-packages --no-cache-dir -e /esphome
# Labels # Labels
LABEL \ LABEL \
@ -232,21 +204,14 @@ RUN \
nano=7.2-1+deb12u1 \ nano=7.2-1+deb12u1 \
build-essential=12.9 \ build-essential=12.9 \
python3-dev=3.11.2-1+b1 \ python3-dev=3.11.2-1+b1 \
&& if [ "$TARGETARCH$TARGETVARIANT" != "armv7" ]; then \ clang-tidy-18=1:18.1.8~++20240731024826+3b5b5c1ec4a3-1~exp1~20240731144843.145 \
# move this up after armv7 is retired && rm -rf \
apt-get install -y --no-install-recommends clang-tidy-18=1:18.1.8~++20240731024826+3b5b5c1ec4a3-1~exp1~20240731144843.145 ; \
fi; \
rm -rf \
/tmp/* \ /tmp/* \
/var/{cache,log}/* \ /var/{cache,log}/* \
/var/lib/apt/lists/* /var/lib/apt/lists/*
COPY requirements_test.txt / COPY requirements_test.txt /
RUN if [ "$TARGETARCH$TARGETVARIANT" = "armv7" ]; then \ RUN pip3 install --break-system-packages --no-cache-dir -r /requirements_test.txt
export PIP_EXTRA_INDEX_URL="https://www.piwheels.org/simple"; \
fi; \
pip3 install \
--break-system-packages --no-cache-dir -r /requirements_test.txt
VOLUME ["/esphome"] VOLUME ["/esphome"]
WORKDIR /esphome WORKDIR /esphome

View File

@ -1,22 +1,19 @@
#!/usr/bin/env python3 #!/usr/bin/env python3
from dataclasses import dataclass
import subprocess
import argparse import argparse
from platform import machine from dataclasses import dataclass
import shlex
import re import re
import shlex
import subprocess
import sys import sys
CHANNEL_DEV = "dev" CHANNEL_DEV = "dev"
CHANNEL_BETA = "beta" CHANNEL_BETA = "beta"
CHANNEL_RELEASE = "release" CHANNEL_RELEASE = "release"
CHANNELS = [CHANNEL_DEV, CHANNEL_BETA, CHANNEL_RELEASE] CHANNELS = [CHANNEL_DEV, CHANNEL_BETA, CHANNEL_RELEASE]
ARCH_AMD64 = "amd64" ARCH_AMD64 = "amd64"
ARCH_ARMV7 = "armv7"
ARCH_AARCH64 = "aarch64" ARCH_AARCH64 = "aarch64"
ARCHS = [ARCH_AMD64, ARCH_ARMV7, ARCH_AARCH64] ARCHS = [ARCH_AMD64, ARCH_AARCH64]
TYPE_DOCKER = "docker" TYPE_DOCKER = "docker"
TYPE_HA_ADDON = "ha-addon" TYPE_HA_ADDON = "ha-addon"
@ -76,7 +73,6 @@ class DockerParams:
}[build_type] }[build_type]
platform = { platform = {
ARCH_AMD64: "linux/amd64", ARCH_AMD64: "linux/amd64",
ARCH_ARMV7: "linux/arm/v7",
ARCH_AARCH64: "linux/arm64", ARCH_AARCH64: "linux/arm64",
}[arch] }[arch]
target = { target = {