From 8fc7862c136a6d92f49e73acd2d04ef75867dddf Mon Sep 17 00:00:00 2001 From: Viacheslav Bocharov Date: Thu, 19 Oct 2023 15:24:52 +0300 Subject: [PATCH] JH: add workflows --- .github/workflows/jh-builder.yml | 468 ++++++++++++++++++++++++++ .github/workflows/jh-translations.yml | 47 +++ .github/workflows/jh-wheels.yml | 277 +++++++++++++++ 3 files changed, 792 insertions(+) create mode 100644 .github/workflows/jh-builder.yml create mode 100644 .github/workflows/jh-translations.yml create mode 100644 .github/workflows/jh-wheels.yml diff --git a/.github/workflows/jh-builder.yml b/.github/workflows/jh-builder.yml new file mode 100644 index 00000000000000..54d983f6c1132d --- /dev/null +++ b/.github/workflows/jh-builder.yml @@ -0,0 +1,468 @@ +name: JH Build images + +# yamllint disable-line rule:truthy +on: + workflow_dispatch: + release: + types: ["published"] + schedule: + - cron: "0 5 * * *" + +env: + BUILD_TYPE: core + DEFAULT_PYTHON: "3.11" + +jobs: + init: + name: Initialize build + if: github.repository_owner == 'jethub-homeassistant' + runs-on: ubuntu-latest + outputs: + architectures: ${{ steps.info.outputs.architectures }} + version: ${{ steps.version.outputs.version }} + channel: ${{ steps.version.outputs.channel }} + publish: ${{ steps.version.outputs.publish }} + steps: + - name: Checkout the repository + uses: actions/checkout@v4.1.1 + with: + fetch-depth: 0 + + - name: update build.yaml + run: cp -f build-jethub.yaml build.yaml + + - name: Set up Python ${{ env.DEFAULT_PYTHON }} + uses: actions/setup-python@v4.7.1 + with: + python-version: ${{ env.DEFAULT_PYTHON }} + + - name: Get information + id: info + uses: jethub-homeassistant/actions/helpers/info@master-jethub + + - name: Get version + id: version + uses: jethub-homeassistant/actions/helpers/version@master-jethub + with: + type: ${{ env.BUILD_TYPE }} + + - name: Verify version + uses: jethub-homeassistant/actions/helpers/verify-version@master-jethub + with: + ignore-dev: true + + build_python: + name: Build PyPi package + needs: ["init", "build_base"] + runs-on: ${{ vars.RUNNER }} + if: 0 # github.repository_owner == 'jethub-homeassistant' && needs.init.outputs.publish == 'true' + steps: + - name: Checkout the repository + uses: actions/checkout@v4.1.1 + + - name: update build.yaml + run: cp -f build-jethub.yaml build.yaml + + - name: Set up Python ${{ env.DEFAULT_PYTHON }} + uses: actions/setup-python@v4.7.1 + with: + python-version: ${{ env.DEFAULT_PYTHON }} + + - name: Download Translations + uses: transifex/cli-action@v2 + with: + token: ${{ secrets.TX_TOKEN }} + args: pull -s -t -a + + - name: Write Translations + run: python3 -m script.jhtranslations download + + - name: Build package + shell: bash + run: | + # Remove dist, build, and homeassistant.egg-info + # when build locally for testing! + pip install twine build + python -m build + + - name: Upload package + shell: bash + run: | + export TWINE_USERNAME="__token__" + export TWINE_PASSWORD="${{ secrets.TWINE_TOKEN }}" + + twine upload dist/* --skip-existing + + build_base: + name: Build ${{ matrix.arch }} base core image + if: github.repository_owner == 'jethub-homeassistant' + needs: init + runs-on: ${{ vars.RUNNER }} + permissions: + contents: read + packages: write + id-token: write + strategy: + matrix: + arch: ${{ fromJson(needs.init.outputs.architectures) }} + steps: + - name: Checkout the repository + uses: actions/checkout@v4.1.1 + + - name: update build.yaml + run: cp -f build-jethub.yaml build.yaml + + - name: Download nightly wheels of frontend + if: needs.init.outputs.channel == 'dev' + uses: dawidd6/action-download-artifact@v2 + with: + github_token: ${{secrets.GITHUB_TOKEN}} + repo: home-assistant/frontend + branch: dev + workflow: nightly.yaml + workflow_conclusion: success + name: wheels + + - name: Download nightly wheels of intents + if: needs.init.outputs.channel == 'dev' + uses: dawidd6/action-download-artifact@v2 + with: + github_token: ${{secrets.GITHUB_TOKEN}} + repo: home-assistant/intents-package + branch: main + workflow: nightly.yaml + workflow_conclusion: success + name: package + + - name: Set up Python ${{ env.DEFAULT_PYTHON }} + if: needs.init.outputs.channel == 'dev' + uses: actions/setup-python@v4.7.1 + with: + python-version: ${{ env.DEFAULT_PYTHON }} + + - name: Set up yq + run: | + BINARY=yq_linux_amd64 + VERSION=v4.35.1 + wget https://github.com/mikefarah/yq/releases/download/${VERSION}/${BINARY}.tar.gz -O - |\ + tar xz && sudo mv ${BINARY} /usr/bin/yq && sudo chmod +x /usr/bin/yq + + - name: Adjust nightly version + if: needs.init.outputs.channel == 'dev' + shell: bash + run: | + python3 -m pip install packaging tomli + python3 -m pip install . + version="$(python3 script/version_bump.py nightly)" + + if [[ "$(ls home_assistant_frontend*.whl)" =~ ^home_assistant_frontend-(.*)-py3-none-any.whl$ ]]; then + echo "Found frontend wheel, setting version to: ${BASH_REMATCH[1]}" + frontend_version="${BASH_REMATCH[1]}" yq \ + --inplace e -o json \ + '.requirements = ["home-assistant-frontend=="+env(frontend_version)]' \ + homeassistant/components/frontend/manifest.json + + sed -i "s|home-assistant-frontend==.*|home-assistant-frontend==${BASH_REMATCH[1]}|" \ + homeassistant/package_constraints.txt + + python -m script.gen_requirements_all + fi + + if [[ "$(ls home_assistant_intents*.whl)" =~ ^home_assistant_intents-(.*)-py3-none-any.whl$ ]]; then + echo "Found intents wheel, setting version to: ${BASH_REMATCH[1]}" + yq \ + --inplace e -o json \ + 'del(.requirements[] | select(contains("home-assistant-intents")))' \ + homeassistant/components/conversation/manifest.json + + intents_version="${BASH_REMATCH[1]}" yq \ + --inplace e -o json \ + '.requirements += ["home-assistant-intents=="+env(intents_version)]' \ + homeassistant/components/conversation/manifest.json + + sed -i "s|home-assistant-intents==.*|home-assistant-intents==${BASH_REMATCH[1]}|" \ + homeassistant/package_constraints.txt + + python -m script.gen_requirements_all + fi + + - name: Adjustments for armhf + if: matrix.arch == 'armhf' + run: | + # Pandas has issues building on armhf, it is expected they + # will drop the platform in the near future (they consider it + # "flimsy" on 386). The following packages depend on pandas, + # so we comment them out. + sed -i "s|env-canada|# env-canada|g" requirements_all.txt + sed -i "s|noaa-coops|# noaa-coops|g" requirements_all.txt + sed -i "s|pyezviz|# pyezviz|g" requirements_all.txt + sed -i "s|pykrakenapi|# pykrakenapi|g" requirements_all.txt + + - name: Download Translations + uses: transifex/cli-action@v2 + with: + token: ${{ secrets.TX_TOKEN }} + args: pull -s -t -a + + - name: Write Translations + run: python3 -m script.jhtranslations download + + - name: Write meta info file + shell: bash + run: | + echo "${{ github.sha }};${{ github.ref }};${{ github.event_name }};${{ github.actor }}" > rootfs/OFFICIAL_IMAGE + + - name: Login to GitHub Container Registry + uses: docker/login-action@v3.0.0 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Build base image + uses: jethub-homeassistant/builder@2023.09.0 + with: + args: | + $BUILD_ARGS \ + --${{ matrix.arch }} \ + --cosign \ + --target /data \ + --generic ${{ needs.init.outputs.version }} + + - name: Archive translations + shell: bash + run: find ./homeassistant/components/*/translations -name "*.json" | tar zcvf translations.tar.gz -T - + + - name: Upload translations + uses: actions/upload-artifact@v3 + with: + name: translations + path: translations.tar.gz + if-no-files-found: error + + build_machine: + name: Build ${{ matrix.machine }} machine core image + if: github.repository_owner == 'jethub-homeassistant' + needs: ["init", "build_base"] + runs-on: ${{ vars.RUNNER }} + permissions: + contents: read + packages: write + id-token: write + strategy: + matrix: + machine: + - generic-x86-64 + - intel-nuc + - jethub-h1 + - jethub-h2 + - jethub-d1 + - jethub-d1p + - odroid-c4 + - qemuarm + - qemuarm-64 + steps: + - name: Checkout the repository + uses: actions/checkout@v4.1.1 + + - name: update build.yaml + run: cp -f build-jethub.yaml build.yaml + + - name: Set build additional args + run: | + # Create general tags + if [[ "${{ needs.init.outputs.version }}" =~ d ]]; then + echo "BUILD_ARGS=--additional-tag dev" >> $GITHUB_ENV + elif [[ "${{ needs.init.outputs.version }}" =~ b ]]; then + echo "BUILD_ARGS=--additional-tag beta" >> $GITHUB_ENV + else + echo "BUILD_ARGS=--additional-tag stable" >> $GITHUB_ENV + fi + + - name: Login to GitHub Container Registry + uses: docker/login-action@v3.0.0 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Build base image + uses: jethub-homeassistant/builder@2023.09.0 + with: + args: | + $BUILD_ARGS \ + --target /data/machine \ + --cosign \ + --machine "${{ needs.init.outputs.version }}=${{ matrix.machine }}" + + publish_ha: + name: Publish version files + if: github.repository_owner == 'jethub-homeassistant' + needs: ["init", "build_machine"] + runs-on: ubuntu-latest + steps: + - name: Checkout the repository + uses: actions/checkout@v4.1.1 + + - name: update build.yaml + run: cp -f build-jethub.yaml build.yaml + + - name: Initialize git + uses: jethub-homeassistant/actions/helpers/git-init@master-jethub + with: + name: ${{ secrets.GIT_NAME }} + email: ${{ secrets.GIT_EMAIL }} + token: ${{ secrets.GIT_TOKEN }} + + - name: Update version file + uses: jethub-homeassistant/actions/helpers/version-push@master-jethub + with: + key: "homeassistant[]" + key-description: "Home Assistant Core" + version: ${{ needs.init.outputs.version }} + channel: ${{ needs.init.outputs.channel }} + + - name: Update version file (stable -> beta) + if: needs.init.outputs.channel == 'stable' + uses: jethub-homeassistant/actions/helpers/version-push@master-jethub + with: + key: "homeassistant[]" + key-description: "Home Assistant Core" + version: ${{ needs.init.outputs.version }} + channel: beta + + publish_container: + name: Publish meta container for ${{ matrix.registry }} + if: github.repository_owner == 'jethub-homeassistant' + needs: ["init", "build_base"] + runs-on: ${{ vars.RUNNER }} + permissions: + contents: read + packages: write + id-token: write + steps: + - name: Checkout the repository + uses: actions/checkout@v4.1.1 + + - name: Install Cosign + uses: sigstore/cosign-installer@v3.1.2 + with: + cosign-release: "v2.0.2" + + - name: update build.yaml + run: cp -f build-jethub.yaml build.yaml + + - name: Login to DockerHub + uses: docker/login-action@v3.0.0 + with: + username: ${{ vars.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - name: Login to GitHub Container Registry + uses: docker/login-action@v3.0.0 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Build Meta Image + shell: bash + run: | + export DOCKER_CLI_EXPERIMENTAL=enabled + + function create_manifest() { + local tag_l=${1} + local tag_r=${2} + + for registry in "ghcr.io/jethub-homeassistant" "docker.io/jethubjhaos" + do + + docker manifest create "${registry}/home-assistant:${tag_l}" \ + "${registry}/amd64-homeassistant:${tag_r}" \ + "${registry}/i386-homeassistant:${tag_r}" \ + "${registry}/armhf-homeassistant:${tag_r}" \ + "${registry}/armv7-homeassistant:${tag_r}" \ + "${registry}/aarch64-homeassistant:${tag_r}" + + docker manifest annotate "${registry}/home-assistant:${tag_l}" \ + "${registry}/amd64-homeassistant:${tag_r}" \ + --os linux --arch amd64 + + docker manifest annotate "${registry}/home-assistant:${tag_l}" \ + "${registry}/i386-homeassistant:${tag_r}" \ + --os linux --arch 386 + + docker manifest annotate "${registry}/home-assistant:${tag_l}" \ + "${registry}/armhf-homeassistant:${tag_r}" \ + --os linux --arch arm --variant=v6 + + docker manifest annotate "${registry}/home-assistant:${tag_l}" \ + "${registry}/armv7-homeassistant:${tag_r}" \ + --os linux --arch arm --variant=v7 + + docker manifest annotate "${registry}/home-assistant:${tag_l}" \ + "${registry}/aarch64-homeassistant:${tag_r}" \ + --os linux --arch arm64 --variant=v8 + + docker manifest push --purge "${registry}/home-assistant:${tag_l}" + cosign sign --yes "${registry}/home-assistant:${tag_l}" + + done + } + + function validate_image() { + local image=${1} + if ! cosign verify --certificate-oidc-issuer https://token.actions.githubusercontent.com --certificate-identity-regexp https://github.com/jethub-homeassistant/core/.* "${image}"; then + echo "Invalid signature!" + exit 1 + fi + } + + function push_dockerhub() { + local image=${1} + local tag=${2} + + docker tag "ghcr.io/jethub-homeassistant/${image}:${tag}" "docker.io/jethubjhaos/${image}:${tag}" + docker push "docker.io/jethubjhaos/${image}:${tag}" + cosign sign --yes "docker.io/jethubjhaos/${image}:${tag}" + } + + # Pull images from github container registry and verify signature + docker pull "ghcr.io/jethub-homeassistant/amd64-homeassistant:${{ needs.init.outputs.version }}" + docker pull "ghcr.io/jethub-homeassistant/i386-homeassistant:${{ needs.init.outputs.version }}" + docker pull "ghcr.io/jethub-homeassistant/armhf-homeassistant:${{ needs.init.outputs.version }}" + docker pull "ghcr.io/jethub-homeassistant/armv7-homeassistant:${{ needs.init.outputs.version }}" + docker pull "ghcr.io/jethub-homeassistant/aarch64-homeassistant:${{ needs.init.outputs.version }}" + + validate_image "ghcr.io/jethub-homeassistant/amd64-homeassistant:${{ needs.init.outputs.version }}" + validate_image "ghcr.io/jethub-homeassistant/i386-homeassistant:${{ needs.init.outputs.version }}" + validate_image "ghcr.io/jethub-homeassistant/armhf-homeassistant:${{ needs.init.outputs.version }}" + validate_image "ghcr.io/jethub-homeassistant/armv7-homeassistant:${{ needs.init.outputs.version }}" + validate_image "ghcr.io/jethub-homeassistant/aarch64-homeassistant:${{ needs.init.outputs.version }}" + + # Upload images to dockerhub + push_dockerhub "amd64-homeassistant" "${{ needs.init.outputs.version }}" + push_dockerhub "i386-homeassistant" "${{ needs.init.outputs.version }}" + push_dockerhub "armhf-homeassistant" "${{ needs.init.outputs.version }}" + push_dockerhub "armv7-homeassistant" "${{ needs.init.outputs.version }}" + push_dockerhub "aarch64-homeassistant" "${{ needs.init.outputs.version }}" + + # Create version tag + create_manifest "${{ needs.init.outputs.version }}" "${{ needs.init.outputs.version }}" + + # Create general tags + if [[ "${{ needs.init.outputs.version }}" =~ d ]]; then + create_manifest "dev" "${{ needs.init.outputs.version }}" + elif [[ "${{ needs.init.outputs.version }}" =~ b ]]; then + create_manifest "beta" "${{ needs.init.outputs.version }}" + create_manifest "rc" "${{ needs.init.outputs.version }}" + else + create_manifest "stable" "${{ needs.init.outputs.version }}" + create_manifest "latest" "${{ needs.init.outputs.version }}" + create_manifest "beta" "${{ needs.init.outputs.version }}" + create_manifest "rc" "${{ needs.init.outputs.version }}" + + # Create series version tag (e.g. 2021.6) + v="${{ needs.init.outputs.version }}" + create_manifest "${v%.*}" "${{ needs.init.outputs.version }}" + fi diff --git a/.github/workflows/jh-translations.yml b/.github/workflows/jh-translations.yml new file mode 100644 index 00000000000000..7baa7880beaf1f --- /dev/null +++ b/.github/workflows/jh-translations.yml @@ -0,0 +1,47 @@ +name: JH Translations + +# yamllint disable-line rule:truthy +on: + workflow_dispatch: + push: + branches: + - dev + - dev-jethub + - master + - master-jethub + paths: + - "**strings.json" + +env: + DEFAULT_PYTHON: "3.11" + +jobs: + upload: + name: Upload + if: github.repository_owner == 'jethub-homeassistant' + runs-on: ${{ vars.RUNNER }} + steps: + - name: Checkout the repository + uses: actions/checkout@v4.1.1 + + - name: Set up Python ${{ env.DEFAULT_PYTHON }} + uses: actions/setup-python@v4.7.1 + with: + python-version: ${{ env.DEFAULT_PYTHON }} + + - name: Prepare Translations + run: | + python3 -m script.jhtranslations upload + + - name: Get translated resources from current HA core dev + run: | + VERSION=$(curl -s https://version.home-assistant.io/dev.json | jq -r '.homeassistant."qemuarm-64"') + docker create --name temp-core ghcr.io/home-assistant/aarch64-homeassistant:$VERSION + docker cp temp-core:"/usr/src/homeassistant/build/translations-download/" build/translations-download/ + docker rm temp-core + + - name: Upload Translations + uses: transifex/cli-action@v2 + with: + token: ${{ secrets.TX_TOKEN }} + args: push -s -t -a diff --git a/.github/workflows/jh-wheels.yml b/.github/workflows/jh-wheels.yml new file mode 100644 index 00000000000000..a6aa4c43e366af --- /dev/null +++ b/.github/workflows/jh-wheels.yml @@ -0,0 +1,277 @@ +name: JH Build wheels + +# yamllint disable-line rule:truthy +on: + workflow_dispatch: + schedule: + - cron: "0 4 * * *" + push: + branches: + - dev-jethub + - rc-jethub + paths: + - ".github/workflows/jh-wheels.yml" + - ".github/workflows/wheels.yml" + - "homeassistant/package_constraints.txt" + - "requirements_all.txt" + - "requirements.txt" + workflow_call: + +concurrency: + group: ${{ github.workflow }}-${{ github.ref_name}} + cancel-in-progress: true + +jobs: + init: + name: Initialize wheels builder + if: github.repository_owner == 'jethub-homeassistant' + runs-on: ubuntu-latest + outputs: + architectures: ${{ steps.info.outputs.architectures }} + steps: + - name: Checkout the repository + uses: actions/checkout@v4.1.1 + + - name: Get information + id: info + uses: jethub-homeassistant/actions/helpers/info@master-jethub + + - name: Create requirements_diff file + run: | + if [[ ${{ github.event_name }} =~ (schedule|workflow_dispatch) ]]; then + touch requirements_diff.txt + else + curl -s -o requirements_diff.txt https://raw.githubusercontent.com/jethub-homeassistant/core/master-jethub/requirements.txt + fi + + - name: Write env-file + 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" + echo "GRPC_PYTHON_LDFLAGS=-lpthread -Wl,-wrap,memcpy -static-libgcc" + + # 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: Upload env_file + uses: actions/upload-artifact@v3.1.2 + with: + name: env_file + path: ./.env_file + + - name: Upload requirements_diff + uses: actions/upload-artifact@v3.1.2 + with: + name: requirements_diff + path: ./requirements_diff.txt + + core: + name: Build Core wheels ${{ matrix.abi }} for ${{ matrix.arch }} (musllinux_1_2) + if: github.repository_owner == 'jethub-homeassistant' + needs: init + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + abi: ["cp311", "cp312"] + arch: ${{ fromJson(needs.init.outputs.architectures) }} + steps: + - name: Checkout the repository + uses: actions/checkout@v4.1.1 + + - name: Download env_file + uses: actions/download-artifact@v3 + with: + name: env_file + + - name: Download requirements_diff + uses: actions/download-artifact@v3 + with: + name: requirements_diff + + - name: Build wheels + uses: jethub-homeassistant/wheels@2023.10.5 + with: + abi: ${{ matrix.abi }} + tag: musllinux_1_2 + arch: ${{ matrix.arch }} + wheels-key: ${{ secrets.WHEELS_KEY }} + env-file: true + apk: "libffi-dev;openssl-dev;yaml-dev" + skip-binary: aiohttp + constraints: "homeassistant/package_constraints.txt" + requirements-diff: "requirements_diff.txt" + requirements: "requirements.txt" + + integrations: + name: Build wheels ${{ matrix.abi }} for ${{ matrix.arch }} + if: github.repository_owner == 'jethub-homeassistant' + needs: init + runs-on: ${{ vars.RUNNER }} + strategy: + fail-fast: false + matrix: + abi: ["cp311", "cp312"] + arch: ${{ fromJson(needs.init.outputs.architectures) }} + steps: + - name: Checkout the repository + uses: actions/checkout@v4.1.1 + + - name: Download env_file + uses: actions/download-artifact@v3 + with: + name: env_file + + - name: Download requirements_diff + uses: actions/download-artifact@v3 + with: + name: requirements_diff + + - name: (Un)comment packages + run: | + requirement_files="requirements_all.txt requirements_diff.txt" + for requirement_file in ${requirement_files}; do + 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} + + # Some packages are not buildable on armhf anymore + if [ "${{ matrix.arch }}" = "armhf" ]; then + + # Pandas has issues building on armhf, it is expected they + # will drop the platform in the near future (they consider it + # "flimsy" on 386). The following packages depend on pandas, + # so we comment them out. + sed -i "s|env-canada|# env-canada|g" ${requirement_file} + sed -i "s|noaa-coops|# noaa-coops|g" ${requirement_file} + sed -i "s|pyezviz|# pyezviz|g" ${requirement_file} + sed -i "s|pykrakenapi|# pykrakenapi|g" ${requirement_file} + fi + 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) / 5) requirements_all.txt requirements_all.txt + + - name: Create requirements for cython<3 + run: | + # Some dependencies still require 'cython<3' + # and don't yet use isolated build environments. + # Build these first. + # grpcio: https://github.com/grpc/grpc/issues/33918 + + touch requirements_old-cython.txt + cat homeassistant/package_constraints.txt | grep 'grpcio==' >> requirements_old-cython.txt + + - name: Adjust build env + run: | + if [ "${{ matrix.arch }}" = "i386" ]; then + echo "NPY_DISABLE_SVML=1" >> .env_file + fi + + # Do not pin numpy in wheels building + sed -i "/numpy/d" homeassistant/package_constraints.txt + + - name: Build wheels (old cython) + uses: jethub-homeassistant/wheels@2023.10.5 + 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;charset-normalizer;grpcio;SQLAlchemy;protobuf + constraints: "homeassistant/package_constraints.txt" + requirements-diff: "requirements_diff.txt" + requirements: "requirements_old-cython.txt" + pip: "'cython<3'" + + - name: Build wheels (part 1) + uses: jethub-homeassistant/wheels@2023.10.5 + 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;charset-normalizer;grpcio;SQLAlchemy;protobuf + constraints: "homeassistant/package_constraints.txt" + requirements-diff: "requirements_diff.txt" + requirements: "requirements_all.txtaa" + + - name: Build wheels (part 2) + uses: jethub-homeassistant/wheels@2023.10.5 + 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;charset-normalizer;grpcio;SQLAlchemy;protobuf + constraints: "homeassistant/package_constraints.txt" + requirements-diff: "requirements_diff.txt" + requirements: "requirements_all.txtab" + + - name: Build wheels (part 3) + uses: jethub-homeassistant/wheels@2023.10.5 + 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;charset-normalizer;grpcio;SQLAlchemy;protobuf + constraints: "homeassistant/package_constraints.txt" + requirements-diff: "requirements_diff.txt" + requirements: "requirements_all.txtac" + + - name: Build wheels (part 4) + uses: jethub-homeassistant/wheels@2023.10.5 + 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;charset-normalizer;grpcio;SQLAlchemy;protobuf + constraints: "homeassistant/package_constraints.txt" + requirements-diff: "requirements_diff.txt" + requirements: "requirements_all.txtad" + + - name: Build wheels (part 5) + uses: jethub-homeassistant/wheels@2023.10.5 + 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;charset-normalizer;grpcio;SQLAlchemy;protobuf + constraints: "homeassistant/package_constraints.txt" + requirements-diff: "requirements_diff.txt" + requirements: "requirements_all.txtae"