Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve build coverage for Linux and Darwin #7625

Merged
merged 1 commit into from
Jun 15, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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