|
| 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 | + |
| 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 | + |
| 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 | + |
| 58 | + |
| 59 | + - name: Download env_file |
| 60 | + |
| 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" |
0 commit comments