Build wheels #752
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: ["cp310", "cp311"] | |
steps: | |
- name: Check out code from GitHub | |
uses: actions/checkout@v4 | |
- name: Download constraints.txt | |
uses: actions/download-artifact@v3 | |
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: 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" |