Automate building wheels for common build dependencies #6
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 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" |