| name: Examples |
| |
| on: |
| push: |
| pull_request: |
| |
| jobs: |
| esp32: |
| name: ESP32 |
| |
| env: |
| BUILD_TYPE: esp32 |
| |
| runs-on: ubuntu-latest |
| |
| container: |
| image: connectedhomeip/chip-build-esp32:0.3.0 |
| volumes: |
| - "/tmp/bloat_reports:/tmp/bloat_reports" |
| - "/tmp/output_binaries:/tmp/output_binaries" |
| |
| steps: |
| - name: Checkout |
| uses: actions/checkout@v2 |
| # Fetch depth 0 to get all history and be able to check mergepoint for bloat report |
| with: |
| fetch-depth: 0 |
| submodules: true |
| - name: Build example Echo App |
| run: scripts/examples/esp_echo_app.sh |
| - name: Copy aside build products |
| run: | |
| mkdir -p example_binaries/$BUILD_TYPE-build |
| cp examples/wifi-echo/server/esp32/build/chip-wifi-echo.elf \ |
| example_binaries/$BUILD_TYPE-build/chip-wifi-echo.elf |
| - name: Binary artifact suffix |
| id: outsuffix |
| uses: haya14busa/action-cond@v1.0.0 |
| with: |
| cond: ${{ github.event.pull_request.number == '' }} |
| if_true: "${{ github.sha }}" |
| if_false: "pull-${{ github.event.pull_request.number }}" |
| - name: Copy aside bloat report & binaries |
| run: | |
| cp -r example_binaries/$BUILD_TYPE-build /tmp/output_binaries/ |
| - name: Uploading Binaries |
| uses: actions/upload-artifact@v1 |
| with: |
| name: ${{ env.BUILD_TYPE }}-example-build-${{ steps.outsuffix.outputs.value }} |
| path: /tmp/output_binaries/${{ env.BUILD_TYPE }}-build |
| |
| nrf: |
| name: nRF |
| |
| env: |
| BUILD_TYPE: nrf |
| |
| runs-on: ubuntu-latest |
| |
| container: |
| image: connectedhomeip/chip-build-nrf-platform:0.3.0 |
| volumes: |
| - "/tmp/bloat_reports:/tmp/bloat_reports" |
| - "/tmp/output_binaries:/tmp/output_binaries" |
| |
| steps: |
| - name: Checkout |
| uses: actions/checkout@v2 |
| # Fetch depth 0 to get all history and be able to check mergepoint for bloat report |
| with: |
| fetch-depth: 0 |
| submodules: true |
| - name: Build example nRF5 Lock App |
| run: scripts/examples/nrf_lock_app.sh |
| - name: Copy aside build products |
| run: | |
| mkdir -p example_binaries/nrf-build |
| cp examples/lock-app/nrf5/build/chip-nrf52840-lock-example.out \ |
| example_binaries/$BUILD_TYPE-build/chip-nrf52840-lock-example.out |
| - name: Binary artifact suffix |
| id: outsuffix |
| uses: haya14busa/action-cond@v1.0.0 |
| with: |
| cond: ${{ github.event.pull_request.number == '' }} |
| if_true: "${{ github.sha }}" |
| if_false: "pull-${{ github.event.pull_request.number }}" |
| - name: Copy aside bloat report & binaries |
| run: | |
| cp -r example_binaries/$BUILD_TYPE-build /tmp/output_binaries/ |
| - name: Uploading Binaries |
| uses: actions/upload-artifact@v1 |
| with: |
| name: ${{ env.BUILD_TYPE }}-example-build-${{ steps.outsuffix.outputs.value }} |
| path: /tmp/output_binaries/${{ env.BUILD_TYPE }}-build |
| |
| linux-standalone: |
| name: Linux Standalone |
| |
| env: |
| BUILD_TYPE: linux |
| |
| runs-on: ubuntu-latest |
| |
| container: |
| image: connectedhomeip/chip-build:0.3.0 |
| volumes: |
| - "/tmp/bloat_reports:/tmp/bloat_reports" |
| - "/tmp/output_binaries:/tmp/output_binaries" |
| |
| steps: |
| - name: Checkout |
| uses: actions/checkout@v2 |
| # Fetch depth 0 to get all history and be able to check mergepoint for bloat report |
| with: |
| fetch-depth: 0 |
| submodules: true |
| - name: Build example Standalone Echo Client |
| run: scripts/examples/standalone_echo_client.sh |
| - name: Build example Standalone Shell |
| run: scripts/examples/standalone_shell.sh |
| - name: Preserve artifacts |
| run: | |
| mkdir -p example_binaries/$BUILD_TYPE-build |
| cp examples/chip-tool/build/chip-standalone-demo.out \ |
| example_binaries/$BUILD_TYPE-build/chip-standalone-demo.out |
| - name: Binary artifact suffix |
| id: outsuffix |
| uses: haya14busa/action-cond@v1.0.0 |
| with: |
| cond: ${{ github.event.pull_request.number == '' }} |
| if_true: "${{ github.sha }}" |
| if_false: "pull-${{ github.event.pull_request.number }}" |
| - name: Copy aside bloat report & binaries |
| run: | |
| cp -r example_binaries/$BUILD_TYPE-build /tmp/output_binaries/ |
| - name: Uploading Binaries |
| uses: actions/upload-artifact@v1 |
| with: |
| name: ${{ env.BUILD_TYPE }}-example-build-${{ steps.outsuffix.outputs.value }} |
| path: /tmp/output_binaries/${{ env.BUILD_TYPE }}-build |