-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add chip-tool-darwin tests to run in CI (#17338)
- Loading branch information
Showing
7 changed files
with
146 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,121 @@ | ||
# Copyright (c) 2022 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: Darwin Tests | ||
|
||
on: | ||
push: | ||
pull_request: | ||
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 | ||
|
||
jobs: | ||
test_suites_chip_tool_darwin: | ||
name: Test Suites - Darwin | ||
timeout-minutes: 120 | ||
|
||
strategy: | ||
matrix: | ||
build_variant: [no-ble-asan] | ||
env: | ||
BUILD_VARIANT: ${{matrix.build_variant}} | ||
|
||
if: github.actor != 'restyled-io[bot]' | ||
runs-on: macos-latest | ||
|
||
steps: | ||
- name: Checkout submodules | ||
run: scripts/checkout_submodules.py --shallow --platform darwin | ||
- name: Setup Environment | ||
# coreutils for stdbuf | ||
run: brew install openssl pkg-config coreutils | ||
- name: | ||
Try to ensure the directories for core dumping and diagnostic | ||
log collection exist and we can write them. | ||
run: | | ||
sudo chown ${USER} /cores || true | ||
mkdir -p ~/Library/Logs/DiagnosticReports || true | ||
mkdir objdir-clone || true | ||
- 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: 25 | ||
run: scripts/build/gn_bootstrap.sh | ||
- name: Uploading bootstrap logs | ||
uses: actions/upload-artifact@v2 | ||
if: ${{ always() }} && ${{ !env.ACT }} | ||
with: | ||
name: | ||
bootstrap-logs-darwin-${{ matrix.build_variant }}${{ matrix.chip_tool }} | ||
path: | | ||
.environment/gn_out/.ninja_log | ||
.environment/pigweed-venv/*.log | ||
- name: Build Apps | ||
timeout-minutes: 30 | ||
run: | | ||
./scripts/run_in_build_env.sh \ | ||
"./scripts/build/build_examples.py \ | ||
--target darwin-x64-chip-tool-darwin-${BUILD_VARIANT} \ | ||
--target darwin-x64-all-clusters-${BUILD_VARIANT} \ | ||
build \ | ||
--copy-artifacts-to objdir-clone \ | ||
" | ||
- name: Run Tests | ||
timeout-minutes: 45 | ||
run: | | ||
./scripts/run_in_build_env.sh \ | ||
"./scripts/tests/run_test_suite.py \ | ||
--chip-tool ./out/darwin-x64-chip-tool-darwin-${BUILD_VARIANT}/chip-tool-darwin \ | ||
--target-skip-glob '{TestGroupMessaging,TV_*}' \ | ||
run \ | ||
--iterations 1 \ | ||
--all-clusters-app ./out/darwin-x64-all-clusters-${BUILD_VARIANT}/chip-all-clusters-app \ | ||
" | ||
- name: Uploading core files | ||
uses: actions/upload-artifact@v2 | ||
if: ${{ failure() }} && ${{ !env.ACT }} | ||
with: | ||
name: | ||
crash-core-darwin-${{ matrix.build_variant }}${{ matrix.chip_tool }} | ||
path: /cores/ | ||
# Cores are big; don't hold on to them too long. | ||
retention-days: 5 | ||
- name: Uploading diagnostic logs | ||
uses: actions/upload-artifact@v2 | ||
if: ${{ failure() }} && ${{ !env.ACT }} | ||
with: | ||
name: | ||
crash-log-darwin-${{ matrix.build_variant }}${{ matrix.chip_tool }} | ||
path: ~/Library/Logs/DiagnosticReports/ | ||
- name: Uploading objdir for debugging | ||
uses: actions/upload-artifact@v2 | ||
if: ${{ failure() }} && ${{ !env.ACT }} | ||
with: | ||
name: | ||
crash-objdir-darwin-${{ matrix.build_variant }}${{ matrix.chip_tool }} | ||
path: objdir-clone/ | ||
# objdirs are big; don't hold on to them too long. | ||
retention-days: 5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters