diff --git a/.github/dependabot.yml b/.github/dependabot.yml index a394d7dcbbab8c..6b1bcc73763f1a 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,5 +1,13 @@ version: 2 updates: + - package-ecosystem: pip + directory: "/.github/workflows/wheel_build" + schedule: + interval: daily + time: "03:00" + commit-message: + prefix: "[wheel] " + open-pull-requests-limit: 10 - package-ecosystem: "github-actions" directory: "/" schedule: diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index b9e5b91aff2681..e95771eace44c1 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -8,7 +8,9 @@ on: - dev - rc - master - pull_request: ~ + pull_request: + paths-ignore: + - ".github/workflows/wheel_build/requirements_wheels.txt" workflow_dispatch: inputs: full: diff --git a/.github/workflows/wheel_build/requirements_wheel.txt b/.github/workflows/wheel_build/requirements_wheel.txt new file mode 100644 index 00000000000000..4c14b0505306ad --- /dev/null +++ b/.github/workflows/wheel_build/requirements_wheel.txt @@ -0,0 +1,13 @@ +# Only add build system requirements here or dependencies +# which should be build for each new release here! +# The versions are updated with dependabot daily. + +# Anything else should be build as part of the regular +# requirements wheel build. + +cffi==1.17.1 +cython==3.0.11 +mysqlclient==2.2.6 +ninja==1.11.1.2 +numpy==2.1.3 +psycopg2==2.9.10 diff --git a/.github/workflows/wheels-common.yml b/.github/workflows/wheels-common.yml new file mode 100644 index 00000000000000..93f7b0f5934e1b --- /dev/null +++ b/.github/workflows/wheels-common.yml @@ -0,0 +1,78 @@ +name: Build common wheels + +# yamllint disable-line rule:truthy +on: + workflow_dispatch: + schedule: + - cron: "0 2 * * *" # every day at 02:00 + pull_request: + branches: + - dev + paths: + - ".github/workflows/wheels-common.yml" + - ".github/workflows/wheel_build/requirements_wheels.txt" + +concurrency: + group: ${{ github.workflow }}-${{ github.ref_name}} + cancel-in-progress: true + +jobs: + init: + name: Initialize wheels builder + if: github.repository_owner == 'home-assistant' + runs-on: ubuntu-latest + outputs: + architectures: ${{ steps.info.outputs.architectures }} + steps: + - name: Checkout the repository + uses: actions/checkout@v4.2.2 + + - name: Get information + id: info + uses: home-assistant/actions/helpers/info@master + + - name: Write env-file + run: | + ( + # Fix out of memory issues with rust + echo "CARGO_NET_GIT_FETCH_WITH_CLI=true" + ) > .env_file + + - name: Upload env_file + uses: actions/upload-artifact@v4.4.3 + with: + name: env_file + path: ./.env_file + include-hidden-files: true + overwrite: true + + wheels: + name: Build common wheels + if: github.repository_owner == 'home-assistant' + needs: init + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + abi: ["cp312", "cp313"] + arch: ${{ fromJson(needs.init.outputs.architectures) }} + steps: + - name: Check out code from GitHub + uses: actions/checkout@v4.2.2 + + - name: Download env_file + uses: actions/download-artifact@v4.1.8 + with: + name: env_file + + - name: Build wheels + uses: home-assistant/wheels@2024.11.0 + with: + abi: ${{ matrix.abi }} + tag: musllinux_1_2 + arch: ${{ matrix.arch }} + wheels-key: ${{ secrets.WHEELS_KEY }} + env-file: true + apk: "mariadb-dev;postgresql-dev;libffi-dev;openblas-dev" + skip-binary: "cython" + requirements: ".github/workflows/wheel_build/requirements_wheel.txt" diff --git a/CODEOWNERS b/CODEOWNERS index ba233c0c1413ed..23d138c7dec735 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -17,6 +17,7 @@ pyproject.toml @home-assistant/core requirements_test.txt @home-assistant/core /.devcontainer/ @home-assistant/core /.github/ @home-assistant/core +/.github/workflows/wheel_build/requirements_wheel.txt @home-assistant/core @cdce8p /.vscode/ @home-assistant/core /homeassistant/*.py @home-assistant/core /homeassistant/auth/ @home-assistant/core diff --git a/script/hassfest/codeowners.py b/script/hassfest/codeowners.py index 73ea8d02520daf..8948909a5833f7 100644 --- a/script/hassfest/codeowners.py +++ b/script/hassfest/codeowners.py @@ -24,6 +24,7 @@ requirements_test.txt @home-assistant/core /.devcontainer/ @home-assistant/core /.github/ @home-assistant/core +/.github/workflows/wheel_build/requirements_wheel.txt @home-assistant/core @cdce8p /.vscode/ @home-assistant/core /homeassistant/*.py @home-assistant/core /homeassistant/auth/ @home-assistant/core