Skip to content

Commit

Permalink
Improve build coverage.
Browse files Browse the repository at this point in the history
Two changes here:

1) Build the tv-app example on Linux, in the examples-linux-standalone job.

2) Stand up build coverage equivalent to the "default" (i.e. including all the jobs that can be built on the OS) unified build on Darwin.
  • Loading branch information
bzbarsky-apple committed Jun 15, 2021
1 parent 345b466 commit 286cd37
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 2 deletions.
62 changes: 60 additions & 2 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,11 @@ name: Builds
on:
push:
pull_request:
workflow_dispatch:

jobs:
build:
name: Build
build_linux:
name: Build on Linux
timeout-minutes: 60

strategy:
Expand Down Expand Up @@ -95,3 +96,60 @@ jobs:
- name: Perform CodeQL Analysis
if: ${{ github.event_name == 'push' }}
uses: github/codeql-action/analyze@v1
build_darwin:
name: Build on Darwin
timeout-minutes: 60

env:
BUILD_TYPE: clang

runs-on: macos-latest
if: github.actor != 'restyled-io[bot]'

steps:
- name: Checkout
uses: actions/checkout@v2
with:
submodules: true
- name: Setup Environment
run: brew install openssl pkg-config
- name: Fix pkgconfig link
working-directory: /usr/local/lib/pkgconfig
run: |
pwd
ls -la /usr/local/Cellar/
ls -la /usr/local/Cellar/[email protected]
OPEN_SSL_VERSION=`ls -la /usr/local/Cellar/[email protected] | cat | tail -n1 | awk '{print $NF}'`
ln -s /usr/local/Cellar/[email protected]/$OPEN_SSL_VERSION/lib/pkgconfig/* .
- name: Bootstrap
timeout-minutes: 10
run: scripts/build/gn_bootstrap.sh
- name: Uploading bootstrap logs
uses: actions/upload-artifact@v2
if: ${{ always() }}
with:
name: bootstrap-logs
path: |
.environment/gn_out/.ninja_log
.environment/pigweed-venv/*.log
- name: Setup Build
# Just go ahead and do the "all" build; on Darwin that's fairly
# fast. If this ever becomes slow, we can think about ways to do
# the examples-linux-standalone.yaml tests on darwin without too
# much code duplication.
run: |
scripts/build/gn_gen.sh --args='is_clang=true target_os="all"'
- name: Run Build
timeout-minutes: 10
run: scripts/build/gn_build.sh
- name: Run Tests
timeout-minutes: 2
run: scripts/tests/gn_tests.sh
# TODO Log Upload https://github.com/project-chip/connectedhomeip/issues/2227
# TODO https://github.com/project-chip/connectedhomeip/issues/1512
# - name: Run Code Coverage
# if: ${{ contains('main', env.BUILD_TYPE) }}
# run: scripts/tools/codecoverage.sh
# - name: Upload Code Coverage
# if: ${{ contains('main', env.BUILD_TYPE) }}
# run: bash <(curl -s https://codecov.io/bash)
4 changes: 4 additions & 0 deletions .github/workflows/examples-linux-standalone.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,10 @@ jobs:
run:
scripts/examples/gn_build_example.sh examples/all-clusters-app/linux
out/all_clusters_debug chip_bypass_rendezvous=true
- name: Build example TV app
timeout-minutes: 5
run:
scripts/examples/gn_build_example.sh examples/tv-app/linux out/tv_app_debug
- name: Build example lighting app with RPCs
timeout-minutes: 5
run:
Expand Down

0 comments on commit 286cd37

Please sign in to comment.