|
88 | 88 | - name: linux-aarch64
|
89 | 89 | container: docker.io/agners/aarch64-chip-build:1
|
90 | 90 | runner: ARM64
|
91 |
| - - name: macos-aarch64 |
92 |
| - container: ghcr.io/project-chip/chip-build:1 |
93 |
| - runner: macos-14 |
94 | 91 |
|
95 | 92 | runs-on: ${{ matrix.arch.runner }}
|
96 | 93 | permissions:
|
@@ -177,3 +174,88 @@ jobs:
|
177 | 174 | python3 -m twine upload out/controller/python/home_assistant_chip_clusters-${{ needs.build_prepare.outputs.version }}-py3-none-any.whl --skip-existing
|
178 | 175 | python3 -m twine upload out/controller/python/home_assistant_chip_core-${{ needs.build_prepare.outputs.version }}-cp37-abi3-manylinux_2_31_${{ matrix.arch.name }}.whl --skip-existing
|
179 | 176 | python3 -m twine upload out/controller/python/home_assistant_chip_repl-${{ needs.build_prepare.outputs.version }}-py3-none-any.whl --skip-existing
|
| 177 | +
|
| 178 | + build_macos_python_lib: |
| 179 | + name: Build Python wheels for macOS (${{ matrix.arch.name }}) |
| 180 | + needs: build_prepare |
| 181 | + |
| 182 | + strategy: |
| 183 | + matrix: |
| 184 | + arch: |
| 185 | + - name: aarch64 |
| 186 | + runner: macos-14 |
| 187 | + |
| 188 | + runs-on: ${{ matrix.arch.runner }} |
| 189 | + permissions: |
| 190 | + contents: write # for actions/upload-release-asset to upload release asset |
| 191 | + |
| 192 | + defaults: |
| 193 | + run: |
| 194 | + working-directory: ./project-chip |
| 195 | + |
| 196 | + steps: |
| 197 | + - name: Restore Matter SDK from artifacts |
| 198 | + uses: actions/download-artifact@v3 |
| 199 | + with: |
| 200 | + name: matter-sdk-${{ github.run_id }} |
| 201 | + - name: Extract Matter SDK from tar |
| 202 | + working-directory: ./ |
| 203 | + run: | |
| 204 | + rm -rf project-chip |
| 205 | + mkdir -p project-chip |
| 206 | + cd project-chip |
| 207 | + apt update && apt install zstd |
| 208 | + tar -xaf ../project-chip.tar.zst --use-compress-program=zstdmt . |
| 209 | + git config --global --add safe.directory "*" |
| 210 | + rm -rf out/ |
| 211 | + - name: Bootstrap |
| 212 | + run: bash scripts/bootstrap.sh -p all,darwin |
| 213 | + - name: Setup Build, Run Build and Run Tests |
| 214 | + run: | |
| 215 | + scripts/build/gn_gen.sh --args=" \ |
| 216 | + enable_rtti=true \ |
| 217 | + enable_pylib=true \ |
| 218 | + chip_config_memory_debug_checks=false \ |
| 219 | + chip_config_memory_debug_dmalloc=false \ |
| 220 | + chip_mdns=\"minimal\" \ |
| 221 | + chip_minmdns_default_policy=\"libnl\" \ |
| 222 | + chip_python_version=\"${{ needs.build_prepare.outputs.version }}\" \ |
| 223 | + chip_python_package_prefix=\"home-assistant-chip\" \ |
| 224 | + chip_python_platform_tag=\"manylinux_2_31\" \ |
| 225 | + chip_code_pre_generated_directory=\"$(pwd)/zzz_pregenerated\" \ |
| 226 | + " |
| 227 | + scripts/run_in_build_env.sh "ninja -C ./out chip-repl" |
| 228 | + - name: Run Python library specific unit tests |
| 229 | + run: | |
| 230 | + scripts/run_in_build_env.sh 'pip3 install ./out/controller/python/home_assistant_chip_core-${{ needs.build_prepare.outputs.version }}-cp37-abi3-manylinux_2_31_${{ matrix.arch.name }}.whl' |
| 231 | + scripts/run_in_build_env.sh 'pip3 install ./out/controller/python/home_assistant_chip_clusters-${{ needs.build_prepare.outputs.version }}-py3-none-any.whl' |
| 232 | + scripts/run_in_build_env.sh 'pip3 install ./out/controller/python/home_assistant_chip_repl-${{ needs.build_prepare.outputs.version }}-py3-none-any.whl' |
| 233 | + scripts/run_in_build_env.sh '(cd src/controller/python/test/unit_tests/ && python3 -m unittest -v)' |
| 234 | + - name: Upload wheels as artifacts |
| 235 | + uses: actions/upload-artifact@v3 |
| 236 | + with: |
| 237 | + name: chip-wheels-${{ matrix.arch.name }} |
| 238 | + path: project-chip/out/controller/python/*.whl |
| 239 | + - name: Upload wheels as release assets |
| 240 | + uses: softprops/action-gh-release@v1 |
| 241 | + if: startsWith(github.ref, 'refs/tags/') |
| 242 | + with: |
| 243 | + files: project-chip/out/controller/python/*.whl |
| 244 | + - name: Upload wheels to PyPI |
| 245 | + if: startsWith(github.ref, 'refs/tags/') |
| 246 | + env: |
| 247 | + TWINE_USERNAME: "__token__" |
| 248 | + TWINE_PASSWORD: ${{ secrets.TWINE_TOKEN_PYPI }} |
| 249 | + TWINE_REPOSITORY: "pypi" |
| 250 | + run: | |
| 251 | + python3 -m pip install twine build |
| 252 | + python3 -m twine upload out/controller/python/home_assistant_chip_core-${{ needs.build_prepare.outputs.version }}-cp37-abi3-manylinux_2_31_${{ matrix.arch.name }}.whl --skip-existing |
| 253 | + - name: Upload wheels to Test PyPI |
| 254 | + if: ${{ github.ref == 'refs/heads/main' }} |
| 255 | + env: |
| 256 | + TWINE_USERNAME: "__token__" |
| 257 | + TWINE_PASSWORD: ${{ secrets.TWINE_TOKEN_TESTPYPI }} |
| 258 | + TWINE_REPOSITORY: "testpypi" |
| 259 | + run: | |
| 260 | + python3 -m pip install twine build |
| 261 | + python3 -m twine upload out/controller/python/home_assistant_chip_core-${{ needs.build_prepare.outputs.version }}-cp37-abi3-manylinux_2_31_${{ matrix.arch.name }}.whl --skip-existing |
0 commit comments