forked from project-chip/connectedhomeip
-
Notifications
You must be signed in to change notification settings - Fork 0
92 lines (87 loc) · 3.95 KB
/
darwin.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
# 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: Darwin
on:
push:
pull_request:
jobs:
darwin:
name: Build Darwin
timeout-minutes: 60
if: github.actor != 'restyled-io[bot]'
runs-on: macos-latest
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/openssl@1.1
OPEN_SSL_VERSION=`ls -la /usr/local/Cellar/openssl@1.1 | cat | tail -n1 | awk '{print $NF}'`
ln -s /usr/local/Cellar/openssl@1.1/$OPEN_SSL_VERSION/lib/pkgconfig/* .
- name: Run iOS Build
timeout-minutes: 15
working-directory: src/darwin/Framework
run: xcodebuild -target "CHIP" -sdk iphoneos
- name: Clean Build
run: xcodebuild clean
working-directory: src/darwin/Framework
- name: Delete Defaults
run: defaults delete com.apple.dt.xctest.tool
continue-on-error: true
- name: Run macOS Build
timeout-minutes: 15
# Enable -Werror by hand here, because the Xcode config can't
# enable it for various reasons. Keep whatever Xcode settings
# for OTHER_CFLAGS exist by using ${inherited}.
#
# Disable -Wdocumentation because so much of our doxygen is so
# broken. See https://github.com/project-chip/connectedhomeip/issues/6734
#
# Disable -Wconditional-uninitialized because the generated IM TLV
# code hits this all over the place.
#
# Disable -Wmacro-redefined because CHIP_DEVICE_CONFIG_ENABLE_MDNS
# seems to be unconditionally defined in CHIPDeviceBuildConfig.h,
# which is apparently being included after CHIPDeviceConfig.h.
#
# Disable -Wdeprecated-declarations because we use deprecated
# things like PairTestDeviceWithoutSecurity.
run: xcodebuild -target "CHIP" -sdk macosx OTHER_CFLAGS='${inherited} -Werror -Wno-documentation -Wno-conditional-uninitialized -Wno-macro-redefined -Wno-deprecated-declarations'
working-directory: src/darwin/Framework
- name: Clean Build
run: xcodebuild clean
working-directory: src/darwin/Framework
- name: Bootstrap
timeout-minutes: 15
run: scripts/build/gn_bootstrap.sh
- name: Run Build Test Server
timeout-minutes: 10
run: |
scripts/examples/gn_build_example.sh examples/all-clusters-app/linux out/debug chip_config_network_layer_ble=false
- name: Delete Defaults
run: defaults delete com.apple.dt.xctest.tool
continue-on-error: true
- name: Run Framework Tests
timeout-minutes: 10
run: |
../../../out/debug/chip-all-clusters-app &
xcodebuild test -target "CHIP" -scheme "CHIP Framework Tests" -sdk macosx
working-directory: src/darwin/Framework