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

Splitting example and core workflows #32976

Merged
merged 1 commit into from
Apr 13, 2024
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
49 changes: 20 additions & 29 deletions .github/workflows/darwin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,16 @@ name: Darwin
on:
push:
branches-ignore:
- 'dependabot/**'
- "dependabot/**"
pull_request:
merge_group:
workflow_dispatch:

concurrency:
group: ${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name == 'pull_request' && github.event.number) || (github.event_name == 'workflow_dispatch' && github.run_number) || github.sha }}
group:
${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name ==
'pull_request' && github.event.number) || (github.event_name ==
'workflow_dispatch' && github.run_number) || github.sha }}
cancel-in-progress: true

env:
Expand Down Expand Up @@ -51,30 +54,33 @@ jobs:
- name: Checkout submodules & Bootstrap
uses: ./.github/actions/checkout-submodules-and-bootstrap
with:
platform: darwin
bootstrap-log-name: bootstrap-logs-framework-${{ matrix.options.flavor }}
platform: darwin
bootstrap-log-name:
bootstrap-logs-framework-${{ matrix.options.flavor }}
- name: Block zap-cli from being used
env:
PW_ENVSETUP_NO_BANNER: 1
PW_ENVSETUP_NO_BANNER: 1
run: |
# Framework builds are NOT expected to require zap-cli
scripts/run_in_build_env.sh 'rm -- "$(which zap-cli)"'
# run_in_build_env.sh is used to ensure PATH is set to something that would otherwise find zap-cli
scripts/run_in_build_env.sh '(zap-cli --version && exit 1) || exit 0'
# Framework builds are NOT expected to require zap-cli
scripts/run_in_build_env.sh 'rm -- "$(which zap-cli)"'
# run_in_build_env.sh is used to ensure PATH is set to something that would otherwise find zap-cli
scripts/run_in_build_env.sh '(zap-cli --version && exit 1) || exit 0'
- name: Build
working-directory: src/darwin/Framework
run: xcodebuild -target "Matter" ${{ matrix.options.arguments }}

tests:
name: Run framework tests
if: github.actor != 'restyled-io[bot]'
needs: [ framework ] # serialize to avoid running to many parallel macos runners
needs: [framework] # serialize to avoid running to many parallel macos runners
runs-on: macos-13
strategy:
matrix:
options: # We don't need a full matrix
- flavor: asan
arguments: -enableAddressSanitizer YES -enableUndefinedBehaviorSanitizer YES
arguments:
-enableAddressSanitizer YES
-enableUndefinedBehaviorSanitizer YES
Comment on lines +81 to +83
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This reformat is odd. It's making it look like a YAML array, but it's just a string, no?

- flavor: tsan
arguments: -enableThreadSanitizer YES
steps:
Expand All @@ -83,8 +89,9 @@ jobs:
- name: Checkout submodules & Bootstrap
uses: ./.github/actions/checkout-submodules-and-bootstrap
with:
platform: darwin
bootstrap-log-name: bootstrap-logs-framework-${{ matrix.options.flavor }}
platform: darwin
bootstrap-log-name:
bootstrap-logs-framework-${{ matrix.options.flavor }}
- name: Build example All Clusters Server
run: |
scripts/examples/gn_build_example.sh examples/all-clusters-app/linux out/debug chip_config_network_layer_ble=false
Expand Down Expand Up @@ -124,19 +131,3 @@ jobs:
name: darwin-framework-test-logs-${{ matrix.options.flavor }}
path: /tmp/darwin/framework-tests
retention-days: 5

tv-casting-bridge:
name: Build TV Casting Bridge example
if: github.actor != 'restyled-io[bot]'
needs: [ framework ] # serialize to avoid running to many parallel macos runners
runs-on: macos-13
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Checkout submodules & Bootstrap
uses: ./.github/actions/checkout-submodules-and-bootstrap
with:
platform: darwin
- name: Build
working-directory: examples/tv-casting-app/darwin/MatterTvCastingBridge
run: xcodebuild -target "MatterTvCastingBridge" -sdk iphoneos
49 changes: 49 additions & 0 deletions .github/workflows/example-tv-casting-darwin.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Copyright (c) 2020-2021 Project CHIP Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

name: TV Casting Example - Darwin

on:
push:
branches-ignore:
- "dependabot/**"
pull_request:
merge_group:
workflow_dispatch:

concurrency:
group:
${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name ==
'pull_request' && github.event.number) || (github.event_name ==
'workflow_dispatch' && github.run_number) || github.sha }}
cancel-in-progress: true

env:
CHIP_NO_LOG_TIMESTAMPS: true

jobs:
tv-casting-bridge:
name: Build TV Casting Bridge example
if: github.actor != 'restyled-io[bot]'
runs-on: macos-13
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Checkout submodules & Bootstrap
uses: ./.github/actions/checkout-submodules-and-bootstrap
with:
platform: darwin
- name: Build
working-directory: examples/tv-casting-app/darwin/MatterTvCastingBridge
run: xcodebuild -target "MatterTvCastingBridge" -sdk iphoneos
Loading