forked from project-chip/connectedhomeip
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add linux embedded & standalone examples to GN build + misc cleanups (p…
…roject-chip#1525) * Move nrf5 platform args to src/platform This separates platform default args from app specific args. * Move device.gni to src/platform This file includes common definitions for the device layer, so move it there. * Fix libCHIPShell not being built on non-POSIX * Clean up nRF5 lock app superproject build - Move build_overrides and symlink it so we can share it between examples - Remove build_overrides/nrf5_lock_app.gni; the samples can use relative paths to their own files and $chip_root to reference chip files. - Remove the split args file and instead put the 2 special args directly in .gn * Clean up toolchain definitions Simplify some code copy pasted from pigweed & remove dead code. * Fix standalone examples building without their project configs Define a new toolchain for config/standalone to build these examples. * Fix default enablement of async DNS * Add Linux device layer support * Add nRF5 lighting app * Add GN examples workflow * Silence warnings due source files with no symbols on Mac * Fix pigweed directories after repo move * Remove unnecessary conjunction * Fix typo in version generation * Fix comment for enable_nrf5_builds * Move nrf5 toolchains to separate file * Move toolchains in config/ into existing dirs
- Loading branch information
Showing
59 changed files
with
821 additions
and
353 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
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,76 @@ | ||
name: GN Examples | ||
|
||
on: | ||
push: | ||
pull_request: | ||
|
||
jobs: | ||
nrf: | ||
name: nRF | ||
|
||
env: | ||
BUILD_TYPE: nrf | ||
BUILD_VERSION: 0.2.14 | ||
BUILD_IMAGE: chip-build-nrf-platform | ||
BUILD_ORG: connectedhomeip | ||
|
||
runs-on: ubuntu-latest | ||
|
||
container: | ||
image: connectedhomeip/chip-build-nrf-platform:0.2.14 # $BUILD_IMAGE/$BUILD_ORG:$BUILD_VERSION | ||
volumes: | ||
- "/tmp/bloat_reports:/tmp/bloat_reports" | ||
- "/tmp/output_binaries:/tmp/output_binaries" | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Checkout Submodules | ||
run: make -f Makefile-bootstrap repos | ||
- name: Bootstrap | ||
run: scripts/build/gn_bootstrap.sh | ||
- name: Build example nRF5 Lock App | ||
run: scripts/examples/gn_nrf_example.sh examples/lock-app/nrf5 out/lock_app_debug | ||
- name: Build example nRF5 Lighting App | ||
run: scripts/examples/gn_nrf_example.sh examples/lighting-app/nrf5 out/lighting_app_debug | ||
- name: Preserve artifacts | ||
run: | | ||
mkdir -p example_binaries/nrf-build | ||
cp out/lock_app_debug/chip-nrf52840-lock-example \ | ||
out/lighting_app_debug/chip-nrf52840-lighting-example \ | ||
example_binaries/nrf-build/ | ||
linux-standalone: | ||
name: Linux Standalone | ||
|
||
env: | ||
BUILD_TYPE: linux | ||
BUILD_VERSION: 0.2.14 | ||
BUILD_IMAGE: chip-build | ||
BUILD_ORG: connectedhomeip | ||
|
||
runs-on: ubuntu-latest | ||
|
||
container: | ||
image: connectedhomeip/chip-build:0.2.14 # $BUILD_IMAGE/$BUILD_ORG:$BUILD_VERSION | ||
volumes: | ||
- "/tmp/bloat_reports:/tmp/bloat_reports" | ||
- "/tmp/output_binaries:/tmp/output_binaries" | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Checkout Submodules | ||
run: make -f Makefile-bootstrap repos | ||
- name: Bootstrap | ||
run: scripts/build/gn_bootstrap.sh | ||
- name: Build example Standalone Echo Client | ||
run: scripts/examples/gn_build_example.sh examples/chip-tool out/chip_tool_debug | ||
- name: Build example Standalone Shell | ||
run: scripts/examples/gn_build_example.sh examples/shell out/shell_debug | ||
- name: Preserve artifacts | ||
run: | | ||
mkdir -p example_binaries/$BUILD_TYPE | ||
cp out/chip_tool_debug/bin/chip-standalone-demo \ | ||
out/shell_debug/bin/chip-shell \ | ||
example_binaries/$BUILD_TYPE/ |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# Copyright (c) 2020 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. | ||
|
||
import("//build_overrides/chip.gni") | ||
|
||
import("//build/toolchain/arm_gcc/arm_toolchain.gni") | ||
|
||
arm_toolchain("nrf5_lock_app") { | ||
toolchain_args = { | ||
current_os = "freertos" | ||
import("${chip_root}/examples/lock-app/nrf5/args.gni") | ||
} | ||
} | ||
|
||
arm_toolchain("nrf5_lighting_app") { | ||
toolchain_args = { | ||
current_os = "freertos" | ||
import("${chip_root}/examples/lighting-app/nrf5/args.gni") | ||
} | ||
} |
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,22 @@ | ||
# Copyright (c) 2020 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. | ||
|
||
chip_build_tests = false | ||
|
||
config_network_layer_ble = false | ||
inet_config_enable_async_dns_sockets = false | ||
|
||
project_config_include_dirs = rebase_path([ "." ]) | ||
chip_project_config_include = "<CHIPProjectConfig.h>" | ||
system_project_config_include = "<SystemProjectConfig.h>" |
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Copyright (c) 2020 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. | ||
|
||
# The location of the build configuration file. | ||
buildconfig = "//build/config/BUILDCONFIG.gn" | ||
|
||
# CHIP uses angle bracket includes. | ||
check_system_includes = true | ||
|
||
# Allow loading paths relative to //gn. | ||
secondary_source = "//third_party/connectedhomeip/gn/" | ||
|
||
default_args = { | ||
import("//args.gni") | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../build_overrides |
Oops, something went wrong.