Skip to content

Build wheels

Build wheels #1226

Workflow file for this run

name: Build wheels
on:
push:
branches:
- master
paths:
- requirements.txt
pull_request:
branches:
- master
workflow_dispatch:
schedule:
- cron: "0 0 * * *"
jobs:
lint:
runs-on: ubuntu-latest
name: init
outputs:
requirements: ${{ steps.requirements.outputs.exist }}
apk: ${{ steps.apk.outputs.packages }}
steps:
- name: Check out code from GitHub
uses: actions/checkout@v4
- name: Get constraints
run: |
wget -O constraints.txt https://raw.githubusercontent.com/home-assistant/core/dev/homeassistant/package_constraints.txt
sed -i "/numpy/d" constraints.txt
- name: Upload constraints.txt
uses: actions/[email protected]
with:
name: constraints
path: ./constraints.txt
wheels:
runs-on: ubuntu-latest
needs: lint
name: Prepare musllinux for ${{ matrix.abi }} with ${{ matrix.arch }}
strategy:
fail-fast: false
matrix:
arch: ["aarch64", "armhf", "armv7", "amd64", "i386"]
abi: ["cp312"]
steps:
- name: Check out code from GitHub
uses: actions/checkout@v4
- name: Download constraints.txt
uses: actions/[email protected]
with:
name: constraints
- name: Pull-Request test
id: test
shell: bash
run: |
if [ "${{ github.event_name }}" = "pull_request" ]; then
echo "is_test=True" >> $GITHUB_OUTPUT
else
echo "is_test=False" >> $GITHUB_OUTPUT
fi
- name: Write env-file
shell: bash
run: |
touch .env_file
- name: (Un)comment packages
run: |
# Some packages are not buildable on armhf anymore
if [ "${{ matrix.arch }}" = "armhf" ]; then
sed -i "s|Shapely|# Shapely|g" requirements.txt
fi
- 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
single: True
test: ${{ steps.test.outputs.is_test }}
constraints: "constraints.txt"
requirements: "requirements.txt"
apk: "libffi-dev;rrdtool-dev;geos-dev;opus-dev;libvpx-dev;ffmpeg-dev;libsrtp-dev;libressl-dev"