|
| 1 | +name: CHIP wheels build |
| 2 | + |
| 3 | +on: push |
| 4 | + |
| 5 | +jobs: |
| 6 | + build_prepare: |
| 7 | + name: Prepare build Python wheels for Linux |
| 8 | + runs-on: ubuntu-latest |
| 9 | + outputs: |
| 10 | + chip_sha: ${{ steps.determine_version.outputs.chip_sha }} |
| 11 | + steps: |
| 12 | + - name: Checkout build repository |
| 13 | + uses: actions/checkout@v3 |
| 14 | + - name: Determine version |
| 15 | + id: determine_version |
| 16 | + run: | |
| 17 | + echo "chip_sha=a17c005209fbde737edb97b0f51ea63472c166aa" >> $GITHUB_OUTPUT |
| 18 | +
|
| 19 | + build_linux_python_lib: |
| 20 | + name: Build Python wheels for Linux |
| 21 | + needs: build_prepare |
| 22 | + timeout-minutes: 60 |
| 23 | + |
| 24 | + runs-on: ubuntu-latest |
| 25 | + permissions: |
| 26 | + contents: write # for actions/upload-release-asset to upload release asset |
| 27 | + |
| 28 | + container: |
| 29 | + image: connectedhomeip/chip-build:0.5.99 |
| 30 | + volumes: |
| 31 | + - "/tmp/log_output:/tmp/test_logs" |
| 32 | + options: --sysctl "net.ipv6.conf.all.disable_ipv6=0 |
| 33 | + net.ipv4.conf.all.forwarding=1 net.ipv6.conf.all.forwarding=1" |
| 34 | + |
| 35 | + steps: |
| 36 | + - name: Dump GitHub context |
| 37 | + env: |
| 38 | + GITHUB_CONTEXT: ${{ toJSON(github) }} |
| 39 | + run: echo "$GITHUB_CONTEXT" |
| 40 | + - uses: Wandalen/wretry.action@v1.0.15 |
| 41 | + name: Checkout |
| 42 | + with: |
| 43 | + action: actions/checkout@v3 |
| 44 | + repository: project-chip/connectedhomeip |
| 45 | + ref: ${{ needs.build_prepare.outputs.chip_sha }} |
| 46 | + with: | |
| 47 | + token: ${{ github.token }} |
| 48 | + attempt_limit: 3 |
| 49 | + attempt_delay: 2000 |
| 50 | + - name: Checkout submodules |
| 51 | + run: scripts/checkout_submodules.py --shallow --platform linux |
| 52 | + - name: Bootstrap |
| 53 | + timeout-minutes: 10 |
| 54 | + run: scripts/build/gn_bootstrap.sh |
| 55 | + - name: Setup Build, Run Build and Run Tests |
| 56 | + timeout-minutes: 50 |
| 57 | + run: | |
| 58 | + scripts/build/gn_gen.sh --args="enable_rtti=true enable_pylib=true chip_config_memory_debug_checks=false chip_config_memory_debug_dmalloc=false" |
| 59 | + scripts/run_in_build_env.sh "ninja -C ./out" |
| 60 | + scripts/tests/gn_tests.sh |
| 61 | + - name: Run Python library specific unit tests |
| 62 | + timeout-minutes: 5 |
| 63 | + run: | |
| 64 | + scripts/run_in_build_env.sh 'pip3 install ./out/controller/python/chip_core-0.0-cp37-abi3-linux_x86_64.whl' |
| 65 | + scripts/run_in_build_env.sh 'pip3 install ./out/controller/python/chip_clusters-0.0-py3-none-any.whl' |
| 66 | + scripts/run_in_build_env.sh 'pip3 install ./out/controller/python/chip_repl-0.0-py3-none-any.whl' |
| 67 | + scripts/run_in_build_env.sh '(cd src/controller/python/test/unit_tests/ && python3 -m unittest -v)' |
| 68 | +
|
| 69 | +
|
0 commit comments