Skip to content

Commit f17f104

Browse files
committed
Automate building wheels for common build dependencies
1 parent 92aa2f7 commit f17f104

File tree

5 files changed

+97
-0
lines changed

5 files changed

+97
-0
lines changed

.github/dependabot.yml

+8
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
version: 2
22
updates:
3+
- package-ecosystem: pip
4+
directory: "/.github/workflows/wheel_build"
5+
schedule:
6+
interval: daily
7+
time: "03:00"
8+
commit-message:
9+
prefix: "[wheel] "
10+
open-pull-requests-limit: 10
311
- package-ecosystem: "github-actions"
412
directory: "/"
513
schedule:
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Only add build system requirements here or or dependencies
2+
# which should be build for each new release here!
3+
# The versions are updated with dependabot daily.
4+
5+
# Anything else should be build as part of the regular
6+
# requirements wheel build.
7+
8+
cffi==1.17.1
9+
cython==3.0.11
10+
mysqlclient==2.2.6
11+
ninja==1.11.1.1
12+
numpy==2.1.3
13+
psycopg2==2.9.10

.github/workflows/wheels-common.yml

+74
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
name: Build common wheels
2+
3+
# yamllint disable-line rule:truthy
4+
on:
5+
workflow_dispatch:
6+
schedule:
7+
- cron: "0 2 * * *" # every day at 02:00
8+
pull_request:
9+
branches:
10+
- dev
11+
paths:
12+
- ".github/workflows/wheels-common.yml"
13+
- ".github/workflows/wheel_build/requirements_wheels.txt"
14+
15+
jobs:
16+
init:
17+
name: Initialize wheels builder
18+
if: github.repository_owner == 'home-assistant'
19+
runs-on: ubuntu-latest
20+
outputs:
21+
architectures: ${{ steps.info.outputs.architectures }}
22+
steps:
23+
- name: Checkout the repository
24+
uses: actions/[email protected]
25+
26+
- name: Get information
27+
id: info
28+
uses: home-assistant/actions/helpers/info@master
29+
30+
- name: Write env-file
31+
run: |
32+
(
33+
# Fix out of memory issues with rust
34+
echo "CARGO_NET_GIT_FETCH_WITH_CLI=true"
35+
) > .env_file
36+
37+
- name: Upload env_file
38+
uses: actions/[email protected]
39+
with:
40+
name: env_file
41+
path: ./.env_file
42+
include-hidden-files: true
43+
overwrite: true
44+
45+
wheels:
46+
name: Build common wheels
47+
if: github.repository_owner == 'home-assistant'
48+
needs: init
49+
runs-on: ubuntu-latest
50+
strategy:
51+
fail-fast: false
52+
matrix:
53+
abi: ["cp312", "cp313"]
54+
arch: ${{ fromJson(needs.init.outputs.architectures) }}
55+
steps:
56+
- name: Check out code from GitHub
57+
uses: actions/[email protected]
58+
59+
- name: Download env_file
60+
uses: actions/[email protected]
61+
with:
62+
name: env_file
63+
64+
- name: Build wheels
65+
uses: home-assistant/[email protected]
66+
with:
67+
abi: ${{ matrix.abi }}
68+
tag: musllinux_1_2
69+
arch: ${{ matrix.arch }}
70+
wheels-key: ${{ secrets.WHEELS_KEY }}
71+
env-file: true
72+
apk: "mariadb-dev;postgresql-dev;libffi-dev;openblas-dev"
73+
skip-binary: "cython"
74+
requirements: ".github/workflows/wheel_build/requirements_wheel.txt"

CODEOWNERS

+1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ pyproject.toml @home-assistant/core
1717
requirements_test.txt @home-assistant/core
1818
/.devcontainer/ @home-assistant/core
1919
/.github/ @home-assistant/core
20+
/.github/workflows/wheel_build/requirements_wheel.txt @home-assistant/core @cdce8p
2021
/.vscode/ @home-assistant/core
2122
/homeassistant/*.py @home-assistant/core
2223
/homeassistant/auth/ @home-assistant/core

script/hassfest/codeowners.py

+1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
requirements_test.txt @home-assistant/core
2525
/.devcontainer/ @home-assistant/core
2626
/.github/ @home-assistant/core
27+
/.github/workflows/wheel_build/requirements_wheel.txt @home-assistant/core @cdce8p
2728
/.vscode/ @home-assistant/core
2829
/homeassistant/*.py @home-assistant/core
2930
/homeassistant/auth/ @home-assistant/core

0 commit comments

Comments
 (0)