Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automate building wheels for common build dependencies #130709

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
13 changes: 13 additions & 0 deletions .github/workflows/wheel_build/requirements_wheel.txt
Original file line number Diff line number Diff line change
@@ -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
78 changes: 78 additions & 0 deletions .github/workflows/wheels-common.yml
Original file line number Diff line number Diff line change
@@ -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/[email protected]

- 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/[email protected]
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/[email protected]

- name: Download env_file
uses: actions/[email protected]
with:
name: env_file

- name: Build wheels
uses: home-assistant/[email protected]
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"
1 change: 1 addition & 0 deletions CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions script/hassfest/codeowners.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down