v0.14.20
This commit is contained in:
+27
-11
@@ -9,17 +9,28 @@ FROM --platform=$BUILDPLATFORM tonistiigi/xx:${XX_VERSION} AS xx
|
||||
FROM --platform=$BUILDPLATFORM rust:${RUST_VERSION}-trixie AS builder-trixie
|
||||
COPY --from=xx / /
|
||||
WORKDIR /src
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y --no-install-recommends clang lld llvm file pkg-config
|
||||
ARG TARGETPLATFORM
|
||||
RUN xx-apt-get update \
|
||||
&& xx-apt-get install -y --no-install-recommends xx-c-essentials \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
&& xx-cargo --version >/dev/null
|
||||
&& apt-get install -y --no-install-recommends clang lld llvm file pkg-config \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Fetch Rust dependencies before TARGETPLATFORM enters the cache chain, so the
|
||||
# same registry/git cache is reused by amd64 and arm64 builds.
|
||||
COPY Cargo.toml Cargo.lock ./
|
||||
RUN --mount=type=cache,id=gree-controller-cargo-registry,target=/usr/local/cargo/registry \
|
||||
--mount=type=cache,id=gree-controller-cargo-git,target=/usr/local/cargo/git \
|
||||
cargo fetch --locked
|
||||
|
||||
ARG TARGETPLATFORM
|
||||
ARG TARGETARCH
|
||||
# Prepare the target C sysroot and Rust stdlib in a stable layer. Do not call
|
||||
# the xx-cargo version probe: xx-cargo is a build wrapper and that invocation
|
||||
# makes Cargo receive a target option without a subcommand.
|
||||
RUN xx-apt-get update \
|
||||
&& xx-apt-get install -y --no-install-recommends xx-c-essentials \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
&& rustup target add "$(xx-cargo --print-target-triple)"
|
||||
|
||||
COPY build.rs ./
|
||||
COPY src ./src
|
||||
COPY web ./web
|
||||
@@ -28,7 +39,7 @@ COPY presets ./presets
|
||||
COPY docs/openapi.json ./docs/openapi.json
|
||||
RUN --mount=type=cache,id=gree-controller-cargo-registry,target=/usr/local/cargo/registry \
|
||||
--mount=type=cache,id=gree-controller-cargo-git,target=/usr/local/cargo/git \
|
||||
--mount=type=cache,id=gree-controller-target-trixie,target=/src/target \
|
||||
--mount=type=cache,id=gree-controller-target-trixie-${TARGETARCH},target=/src/target \
|
||||
set -eux; \
|
||||
xx-cargo build --locked --release --target-dir /src/target; \
|
||||
binary="/src/target/$(xx-cargo --print-target-triple)/release/gree-controller"; \
|
||||
@@ -40,13 +51,18 @@ FROM --platform=$BUILDPLATFORM rust:${RUST_VERSION}-alpine AS builder-alpine
|
||||
COPY --from=xx / /
|
||||
WORKDIR /src
|
||||
RUN apk add --no-cache clang lld llvm file pkgconf
|
||||
ARG TARGETPLATFORM
|
||||
RUN xx-apk add --no-cache xx-c-essentials \
|
||||
&& xx-cargo --version >/dev/null
|
||||
|
||||
# Keep dependency fetching architecture-independent here as well.
|
||||
COPY Cargo.toml Cargo.lock ./
|
||||
RUN --mount=type=cache,id=gree-controller-cargo-registry,target=/usr/local/cargo/registry \
|
||||
--mount=type=cache,id=gree-controller-cargo-git,target=/usr/local/cargo/git \
|
||||
cargo fetch --locked
|
||||
|
||||
ARG TARGETPLATFORM
|
||||
ARG TARGETARCH
|
||||
RUN xx-apk add --no-cache xx-c-essentials \
|
||||
&& rustup target add "$(xx-cargo --print-target-triple)"
|
||||
|
||||
COPY build.rs ./
|
||||
COPY src ./src
|
||||
COPY web ./web
|
||||
@@ -55,7 +71,7 @@ COPY presets ./presets
|
||||
COPY docs/openapi.json ./docs/openapi.json
|
||||
RUN --mount=type=cache,id=gree-controller-cargo-registry,target=/usr/local/cargo/registry \
|
||||
--mount=type=cache,id=gree-controller-cargo-git,target=/usr/local/cargo/git \
|
||||
--mount=type=cache,id=gree-controller-target-alpine,target=/src/target \
|
||||
--mount=type=cache,id=gree-controller-target-alpine-${TARGETARCH},target=/src/target \
|
||||
set -eux; \
|
||||
xx-cargo build --locked --release --target-dir /src/target; \
|
||||
binary="/src/target/$(xx-cargo --print-target-triple)/release/gree-controller"; \
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"domain": "gree_controller",
|
||||
"name": "GREE Controller",
|
||||
"version": "0.14.19",
|
||||
"version": "0.14.20",
|
||||
"config_flow": true,
|
||||
"integration_type": "hub",
|
||||
"iot_class": "local_polling",
|
||||
|
||||
@@ -1,5 +1,13 @@
|
||||
# Changelog
|
||||
|
||||
## 0.14.20
|
||||
|
||||
- Fixes ARM cross-build startup by removing the invalid `xx-cargo --version` probe; `xx-cargo build` remains the cross-compilation entry point.
|
||||
- Installs the Rust target standard library in a cacheable layer before project sources are copied, so source-only changes do not redownload/reinstall it.
|
||||
- Fetches Cargo dependencies before target-specific setup so amd64/arm64 reuse the same registry/git cache.
|
||||
- Separates compiled `target/` caches by target architecture to avoid multi-platform build contention while retaining incremental dependency reuse.
|
||||
- Keeps the existing `build.sh` workflow and `DISTRO=alpine` (musl/Alpine) versus `DISTRO=trixie` (GNU/glibc Debian Trixie) runtime selection unchanged.
|
||||
|
||||
## 0.14.19
|
||||
|
||||
- Speeds up multi-architecture OCI builds by running Rust/Cargo on `BUILDPLATFORM` and cross-compiling to amd64/arm64 instead of compiling ARM under QEMU.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
name: "GREE Controller"
|
||||
version: "0.14.19"
|
||||
version: "0.14.20"
|
||||
slug: "gree_controller"
|
||||
description: "Local GREE HVAC controller with Web UI and Home Assistant integration"
|
||||
url: "https://git.linuxiarz.pl/gru/gree-controller-ha-addon/"
|
||||
|
||||
Reference in New Issue
Block a user