mirror of
https://github.com/home-assistant/core.git
synced 2025-07-25 22:27:07 +00:00
Clean up wheels building, removing cp310 abi (#95334)
This commit is contained in:
parent
9de2b6c253
commit
39f76b757d
160
.github/workflows/wheels.yml
vendored
160
.github/workflows/wheels.yml
vendored
@ -47,10 +47,7 @@ jobs:
|
|||||||
echo "GRPC_PYTHON_BUILD_SYSTEM_OPENSSL=true"
|
echo "GRPC_PYTHON_BUILD_SYSTEM_OPENSSL=true"
|
||||||
echo "GRPC_PYTHON_BUILD_WITH_CYTHON=true"
|
echo "GRPC_PYTHON_BUILD_WITH_CYTHON=true"
|
||||||
echo "GRPC_PYTHON_DISABLE_LIBC_COMPATIBILITY=true"
|
echo "GRPC_PYTHON_DISABLE_LIBC_COMPATIBILITY=true"
|
||||||
# GRPC on armv7 needs -lexecinfo (issue #56669) since home assistant installs
|
echo "GRPC_PYTHON_LDFLAGS=-lpthread -Wl,-wrap,memcpy -static-libgcc"
|
||||||
# execinfo-dev when building wheels. The setuptools build setup does not have an option for
|
|
||||||
# adding a single LDFLAG so copy all relevant linux flags here (as of 1.43.0)
|
|
||||||
echo "GRPC_PYTHON_LDFLAGS=-lpthread -Wl,-wrap,memcpy -static-libgcc -lexecinfo"
|
|
||||||
|
|
||||||
# Fix out of memory issues with rust
|
# Fix out of memory issues with rust
|
||||||
echo "CARGO_NET_GIT_FETCH_WITH_CLI=true"
|
echo "CARGO_NET_GIT_FETCH_WITH_CLI=true"
|
||||||
@ -83,7 +80,7 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
abi: ["cp310", "cp311"]
|
abi: ["cp311"]
|
||||||
arch: ${{ fromJson(needs.init.outputs.architectures) }}
|
arch: ${{ fromJson(needs.init.outputs.architectures) }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout the repository
|
- name: Checkout the repository
|
||||||
@ -113,7 +110,7 @@ jobs:
|
|||||||
requirements-diff: "requirements_diff.txt"
|
requirements-diff: "requirements_diff.txt"
|
||||||
requirements: "requirements.txt"
|
requirements: "requirements.txt"
|
||||||
|
|
||||||
integrations_cp310:
|
integrations_cp311:
|
||||||
name: Build wheels ${{ matrix.abi }} for ${{ matrix.arch }}
|
name: Build wheels ${{ matrix.abi }} for ${{ matrix.arch }}
|
||||||
if: github.repository_owner == 'home-assistant'
|
if: github.repository_owner == 'home-assistant'
|
||||||
needs: init
|
needs: init
|
||||||
@ -121,7 +118,7 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
abi: ["cp310"]
|
abi: ["cp311"]
|
||||||
arch: ${{ fromJson(needs.init.outputs.architectures) }}
|
arch: ${{ fromJson(needs.init.outputs.architectures) }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout the repository
|
- name: Checkout the repository
|
||||||
@ -137,152 +134,10 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
name: requirements_diff
|
name: requirements_diff
|
||||||
|
|
||||||
- name: Uncomment packages
|
|
||||||
run: |
|
|
||||||
requirement_files="requirements_all.txt requirements_diff.txt"
|
|
||||||
for requirement_file in ${requirement_files}; do
|
|
||||||
sed -i "s|# pybluez|pybluez|g" ${requirement_file}
|
|
||||||
sed -i "s|# beacontools|beacontools|g" ${requirement_file}
|
|
||||||
sed -i "s|# fritzconnection|fritzconnection|g" ${requirement_file}
|
|
||||||
sed -i "s|# pyuserinput|pyuserinput|g" ${requirement_file}
|
|
||||||
sed -i "s|# evdev|evdev|g" ${requirement_file}
|
|
||||||
sed -i "s|# pycups|pycups|g" ${requirement_file}
|
|
||||||
sed -i "s|# homekit|homekit|g" ${requirement_file}
|
|
||||||
sed -i "s|# decora_wifi|decora_wifi|g" ${requirement_file}
|
|
||||||
sed -i "s|# python-gammu|python-gammu|g" ${requirement_file}
|
|
||||||
sed -i "s|# opencv-python-headless|opencv-python-headless|g" ${requirement_file}
|
|
||||||
done
|
|
||||||
|
|
||||||
- name: Split requirements all
|
|
||||||
run: |
|
|
||||||
# We split requirements all into two different files.
|
|
||||||
# This is to prevent the build from running out of memory when
|
|
||||||
# resolving packages on 32-bits systems (like armhf, armv7).
|
|
||||||
|
|
||||||
split -l $(expr $(expr $(cat requirements_all.txt | wc -l) + 1) / 3) requirements_all.txt requirements_all.txt
|
|
||||||
|
|
||||||
- name: Adjust build env
|
|
||||||
run: |
|
|
||||||
if [ "${{ matrix.arch }}" = "i386" ]; then
|
|
||||||
echo "NPY_DISABLE_SVML=1" >> .env_file
|
|
||||||
fi
|
|
||||||
|
|
||||||
(
|
|
||||||
# cmake > 3.22.2 have issue on arm
|
|
||||||
# Tested until 3.22.5
|
|
||||||
echo "cmake==3.22.2"
|
|
||||||
) >> homeassistant/package_constraints.txt
|
|
||||||
|
|
||||||
# Do not pin numpy in wheels building
|
|
||||||
sed -i "/numpy/d" homeassistant/package_constraints.txt
|
|
||||||
|
|
||||||
- name: Build wheels (part 1)
|
|
||||||
uses: home-assistant/wheels@2023.04.0
|
|
||||||
with:
|
|
||||||
abi: ${{ matrix.abi }}
|
|
||||||
tag: musllinux_1_2
|
|
||||||
arch: ${{ matrix.arch }}
|
|
||||||
wheels-key: ${{ secrets.WHEELS_KEY }}
|
|
||||||
env-file: true
|
|
||||||
apk: "bluez-dev;libffi-dev;openssl-dev;glib-dev;eudev-dev;libxml2-dev;libxslt-dev;libpng-dev;libjpeg-turbo-dev;tiff-dev;cups-dev;gmp-dev;mpfr-dev;mpc1-dev;ffmpeg-dev;gammu-dev;yaml-dev;openblas-dev;fftw-dev;lapack-dev;gfortran;blas-dev;eigen-dev;freetype-dev;glew-dev;harfbuzz-dev;hdf5-dev;libdc1394-dev;libtbb-dev;mesa-dev;openexr-dev;openjpeg-dev;uchardet-dev"
|
|
||||||
skip-binary: aiohttp;grpcio;sqlalchemy;protobuf
|
|
||||||
constraints: "homeassistant/package_constraints.txt"
|
|
||||||
requirements-diff: "requirements_diff.txt"
|
|
||||||
requirements: "requirements_all.txtaa"
|
|
||||||
|
|
||||||
- name: Build wheels (part 2)
|
|
||||||
uses: home-assistant/wheels@2023.04.0
|
|
||||||
with:
|
|
||||||
abi: ${{ matrix.abi }}
|
|
||||||
tag: musllinux_1_2
|
|
||||||
arch: ${{ matrix.arch }}
|
|
||||||
wheels-key: ${{ secrets.WHEELS_KEY }}
|
|
||||||
env-file: true
|
|
||||||
apk: "bluez-dev;libffi-dev;openssl-dev;glib-dev;eudev-dev;libxml2-dev;libxslt-dev;libpng-dev;libjpeg-turbo-dev;tiff-dev;cups-dev;gmp-dev;mpfr-dev;mpc1-dev;ffmpeg-dev;gammu-dev;yaml-dev;openblas-dev;fftw-dev;lapack-dev;gfortran;blas-dev;eigen-dev;freetype-dev;glew-dev;harfbuzz-dev;hdf5-dev;libdc1394-dev;libtbb-dev;mesa-dev;openexr-dev;openjpeg-dev;uchardet-dev"
|
|
||||||
skip-binary: aiohttp;grpcio;sqlalchemy;protobuf
|
|
||||||
constraints: "homeassistant/package_constraints.txt"
|
|
||||||
requirements-diff: "requirements_diff.txt"
|
|
||||||
requirements: "requirements_all.txtab"
|
|
||||||
|
|
||||||
- name: Build wheels (part 3)
|
|
||||||
uses: home-assistant/wheels@2023.04.0
|
|
||||||
with:
|
|
||||||
abi: ${{ matrix.abi }}
|
|
||||||
tag: musllinux_1_2
|
|
||||||
arch: ${{ matrix.arch }}
|
|
||||||
wheels-key: ${{ secrets.WHEELS_KEY }}
|
|
||||||
env-file: true
|
|
||||||
apk: "bluez-dev;libffi-dev;openssl-dev;glib-dev;eudev-dev;libxml2-dev;libxslt-dev;libpng-dev;libjpeg-turbo-dev;tiff-dev;cups-dev;gmp-dev;mpfr-dev;mpc1-dev;ffmpeg-dev;gammu-dev;yaml-dev;openblas-dev;fftw-dev;lapack-dev;gfortran;blas-dev;eigen-dev;freetype-dev;glew-dev;harfbuzz-dev;hdf5-dev;libdc1394-dev;libtbb-dev;mesa-dev;openexr-dev;openjpeg-dev;uchardet-dev"
|
|
||||||
skip-binary: aiohttp;grpcio;sqlalchemy;protobuf
|
|
||||||
constraints: "homeassistant/package_constraints.txt"
|
|
||||||
requirements-diff: "requirements_diff.txt"
|
|
||||||
requirements: "requirements_all.txtac"
|
|
||||||
|
|
||||||
# Wheels building for the cp311 ABI is currently split
|
|
||||||
# This is mainly until we have figured out to get all wheels built.
|
|
||||||
# Without harming our current workflow.
|
|
||||||
integrations_cp311:
|
|
||||||
name: Build wheels ${{ matrix.abi }} for ${{ matrix.arch }}
|
|
||||||
if: github.repository_owner == 'home-assistant'
|
|
||||||
needs: init
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
abi: ["cp311"]
|
|
||||||
arch: ${{ fromJson(needs.init.outputs.architectures) }}
|
|
||||||
steps:
|
|
||||||
- name: Checkout the repository
|
|
||||||
uses: actions/checkout@v3.5.3
|
|
||||||
|
|
||||||
- name: Write alternative env-file for cp311
|
|
||||||
run: |
|
|
||||||
(
|
|
||||||
echo "GRPC_BUILD_WITH_BORING_SSL_ASM=false"
|
|
||||||
echo "GRPC_PYTHON_BUILD_SYSTEM_OPENSSL=true"
|
|
||||||
echo "GRPC_PYTHON_BUILD_WITH_CYTHON=true"
|
|
||||||
echo "GRPC_PYTHON_DISABLE_LIBC_COMPATIBILITY=true"
|
|
||||||
|
|
||||||
# GRPC on armv7 needed -lexecinfo (issue #56669) since home assistant installed
|
|
||||||
# execinfo-dev when building wheels. However, this package is no longer available
|
|
||||||
# Alpine 3.17, which we use for the cp311 ABI, so the flag should no longer be needed.
|
|
||||||
echo "GRPC_PYTHON_LDFLAGS=-lpthread -Wl,-wrap,memcpy -static-libgcc" # -lexecinfo
|
|
||||||
|
|
||||||
# Fix out of memory issues with rust
|
|
||||||
echo "CARGO_NET_GIT_FETCH_WITH_CLI=true"
|
|
||||||
|
|
||||||
# OpenCV headless installation
|
|
||||||
echo "CI_BUILD=1"
|
|
||||||
echo "ENABLE_HEADLESS=1"
|
|
||||||
|
|
||||||
# Use C-Extension for sqlalchemy
|
|
||||||
echo "REQUIRE_SQLALCHEMY_CEXT=1"
|
|
||||||
) > .env_file
|
|
||||||
|
|
||||||
- name: Download requirements_diff
|
|
||||||
uses: actions/download-artifact@v3
|
|
||||||
with:
|
|
||||||
name: requirements_diff
|
|
||||||
|
|
||||||
- name: (Un)comment packages
|
- name: (Un)comment packages
|
||||||
run: |
|
run: |
|
||||||
requirement_files="requirements_all.txt requirements_diff.txt"
|
requirement_files="requirements_all.txt requirements_diff.txt"
|
||||||
for requirement_file in ${requirement_files}; do
|
for requirement_file in ${requirement_files}; do
|
||||||
|
|
||||||
# PyBluez no longer compiles. Commented it out for now.
|
|
||||||
# It need further cleanup down the line, as all machine images
|
|
||||||
# try to install it.
|
|
||||||
# sed -i "s|# pybluez|pybluez|g" ${requirement_file}
|
|
||||||
|
|
||||||
# beacontools requires PyBluez.
|
|
||||||
# sed -i "s|# beacontools|beacontools|g" ${requirement_file}
|
|
||||||
|
|
||||||
# It doesn't build for some reason, so we skip it for now.
|
|
||||||
# Bumping to the latest version (4.7.0.72) supporting Python 3.11
|
|
||||||
# doesn't help. Reverted bump in #91871. There are 8 registered
|
|
||||||
# instances using this integration according to analytics.
|
|
||||||
# sed -i "s|# opencv-python-headless|opencv-python-headless|g" ${requirement_file}
|
|
||||||
|
|
||||||
sed -i "s|# fritzconnection|fritzconnection|g" ${requirement_file}
|
sed -i "s|# fritzconnection|fritzconnection|g" ${requirement_file}
|
||||||
sed -i "s|# pyuserinput|pyuserinput|g" ${requirement_file}
|
sed -i "s|# pyuserinput|pyuserinput|g" ${requirement_file}
|
||||||
sed -i "s|# evdev|evdev|g" ${requirement_file}
|
sed -i "s|# evdev|evdev|g" ${requirement_file}
|
||||||
@ -319,13 +174,6 @@ jobs:
|
|||||||
echo "NPY_DISABLE_SVML=1" >> .env_file
|
echo "NPY_DISABLE_SVML=1" >> .env_file
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Probably not an issue anymore. Removing for now.
|
|
||||||
# (
|
|
||||||
# # cmake > 3.22.2 have issue on arm
|
|
||||||
# # Tested until 3.22.5
|
|
||||||
# echo "cmake==3.22.2"
|
|
||||||
# ) >> homeassistant/package_constraints.txt
|
|
||||||
|
|
||||||
# Do not pin numpy in wheels building
|
# Do not pin numpy in wheels building
|
||||||
sed -i "/numpy/d" homeassistant/package_constraints.txt
|
sed -i "/numpy/d" homeassistant/package_constraints.txt
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user