Skip to content

Commit

Permalink
Revert "Merge branch 'master' into PyBind11Basic"
Browse files Browse the repository at this point in the history
This reverts commit 37ceee5, reversing
changes made to 09fcf92.
  • Loading branch information
kidip committed Aug 12, 2021
1 parent e4e5998 commit 62db710
Show file tree
Hide file tree
Showing 518 changed files with 14,536 additions and 22,997 deletions.
50 changes: 47 additions & 3 deletions .github/workflows/android.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,51 @@ jobs:
path: |
.environment/gn_out/.ninja_log
.environment/pigweed-venv/*.log
- name: Build android examples
- name: Build arm libs
timeout-minutes: 2
run: |
./scripts/run_in_build_env.sh \
"./scripts/build/build_examples.py --platform android build"
./scripts/examples/android_app.sh
env:
BUILD_TYPE: android_arm
TARGET_CPU: arm
- name: Build arm App
timeout-minutes: 5
run: |
yes | "$ANDROID_HOME"/tools/bin/sdkmanager --licenses
cd src/android/CHIPTool
./gradlew build
env:
BUILD_TYPE: android_arm
TARGET_CPU: arm
- name: Build arm64 libs
timeout-minutes: 2
run: |
./scripts/examples/android_app.sh
env:
BUILD_TYPE: android_arm64
TARGET_CPU: arm64
- name: Build arm64 App
timeout-minutes: 5
run: |
yes | "$ANDROID_HOME"/tools/bin/sdkmanager --licenses
cd src/android/CHIPTool
./gradlew build
env:
BUILD_TYPE: android_arm64
TARGET_CPU: arm64
- name: Build x64 libs
timeout-minutes: 2
run: |
./scripts/examples/android_app.sh
env:
BUILD_TYPE: android_x64
TARGET_CPU: x64
- name: Build x64 App
timeout-minutes: 5
run: |
yes | "$ANDROID_HOME"/tools/bin/sdkmanager --licenses
cd src/android/CHIPTool
./gradlew build
env:
BUILD_TYPE: android_x64
TARGET_CPU: x64
44 changes: 23 additions & 21 deletions .github/workflows/examples-mbed.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2021 Project CHIP Authors
# 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.
Expand All @@ -25,13 +25,17 @@ concurrency:

jobs:
mbedos:
name: Mbed OS examples building
timeout-minutes: 30
strategy:
fail-fast: False
matrix:
EXAMPLE_APP: [lock-app, lighting-app]
EXAMPLE_TARGET: [CY8CPROTO_062_4343W]

name: "${{matrix.EXAMPLE_APP}}: ${{matrix.EXAMPLE_TARGET}}"

env:
BUILD_TYPE: mbedos
APP_PROFILE: release
APP_TARGET: CY8CPROTO_062_4343W
EXAMPLE_PROFILE: release

runs-on: ubuntu-latest
if: github.actor != 'restyled-io[bot]'
Expand All @@ -40,41 +44,39 @@ jobs:
image: connectedhomeip/chip-build-mbed-os:latest
volumes:
- "/tmp/output_binaries:/tmp/output_binaries"


steps:
- name: Checkout
uses: actions/checkout@v2
with:
submodules: true

- name: Build lock-app example
timeout-minutes: 10
run: scripts/examples/mbed_example.sh -a=lock-app -b=$APP_TARGET -p=$APP_PROFILE

- name: Build lighting-app example
timeout-minutes: 10
run: scripts/examples/mbed_example.sh -a=lighting-app -b=$APP_TARGET -p=$APP_PROFILE
- name: Build example
run: scripts/examples/mbed_example.sh -a=${{matrix.EXAMPLE_APP}} -b=${{matrix.EXAMPLE_TARGET}} -p=$EXAMPLE_PROFILE

- name: Copy aside build products
run: |
mkdir -p /tmp/output_binaries/$BUILD_TYPE-build
cp examples/lock-app/mbed/build-$APP_TARGET/$APP_PROFILE/chip-mbed-lock-app-example.hex \
/tmp/output_binaries/$BUILD_TYPE-build/lock-app-$APP_TARGET-$APP_PROFILE.hex
cp examples/lighting-app/mbed/build-$APP_TARGET/$APP_PROFILE/chip-mbed-lighting-app-example.hex \
/tmp/output_binaries/$BUILD_TYPE-build/lighting-app-$APP_TARGET-$APP_PROFILE.hex
mkdir -p example_binaries/$BUILD_TYPE-build/
cp examples/${{matrix.EXAMPLE_APP}}/mbed/build-${{matrix.EXAMPLE_TARGET}}/$EXAMPLE_PROFILE/chip-mbed-${{matrix.EXAMPLE_APP}}-example.hex \
example_binaries/$BUILD_TYPE-build/${{matrix.EXAMPLE_APP}}_${{matrix.EXAMPLE_TARGET}}_$EXAMPLE_PROFILE.hex
- name: Binary artifacts suffix
- name: Binary artifact suffix
id: outsuffix
uses: haya14busa/[email protected]
with:
cond: ${{ github.event.pull_request.number == '' }}
if_true: "${{ github.sha }}"
if_false: "pull-${{ github.event.pull_request.number }}"

- name: Uploading binaries as artifacts
- name: Copy aside binaries
run: |
cp -r example_binaries/$BUILD_TYPE-build/ /tmp/output_binaries/
- name: Uploading Binaries
uses: actions/upload-artifact@v1
with:
name:
${{ env.BUILD_TYPE }}-binaries-${{env.APP_TARGET}}-${{ env.APP_PROFILE}}-build-${{
${{ env.BUILD_TYPE }}-${{matrix.EXAMPLE_APP}}-example-${{matrix.EXAMPLE_TARGET}}-${{ env.EXAMPLE_PROFILE}}-build-${{
steps.outsuffix.outputs.value }}
path: /tmp/output_binaries/${{ env.BUILD_TYPE }}-build
path: /tmp/output_binaries/${{ env.BUILD_TYPE }}-build/${{matrix.EXAMPLE_APP}}_${{matrix.EXAMPLE_TARGET}}_${{ env.EXAMPLE_PROFILE }}.hex
4 changes: 4 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -163,3 +163,7 @@ url = https://github.com/Infineon/recipe-make-cat1a
path = third_party/pybind11/repo
url = ../../pybind/pybind11
branch = stable
[submodule "third_party/pybind11/repo"]
path = third_party/pybind11/repo
url = ../../pybind/pybind11
branch = stable
11 changes: 0 additions & 11 deletions .restyled.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ exclude:
- "third_party/bluez/repo/**/*"
- "third_party/cirque/repo/**/*"
- "third_party/nanopb/repo/**/*"
- "src/controller/python/chip/clusters/CHIPClusters.py" # generated file


changed_paths:
Expand Down Expand Up @@ -199,13 +198,3 @@ restylers:
include:
- "**/*.sh"
- "**/*.bash"
- name: autopep8
image: 'restyled/restyler-autopep8:v1.5.7'
command:
- autopep8
- '--in-place'
arguments: []
include:
- '**/*.py'
interpreters:
- python
15 changes: 0 additions & 15 deletions BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -176,9 +176,6 @@ if (current_toolchain != "${dir_pw_toolchain}/default:default") {
# Set this to true to enable efr32 builds by default.
enable_efr32_builds = false

# Set this to true to enable p6 builds by default.
enable_p6_builds = false

# Set this to true to enable Qorvo qpg builds by default.
enable_qpg_builds = false

Expand Down Expand Up @@ -237,9 +234,6 @@ if (current_toolchain != "${dir_pw_toolchain}/default:default") {
# Build the efr32 lock app example.
enable_efr32_lock_app_build = enable_efr32_builds

# Build the p6 lock app example.
enable_p6_lock_app_build = enable_p6_builds

# Build the qpgxxxx lock app example.
enable_qpg_lock_app_build = enable_qpg_builds && !is_debug

Expand Down Expand Up @@ -372,12 +366,6 @@ if (current_toolchain != "${dir_pw_toolchain}/default:default") {
}
}

if (enable_p6_lock_app_build) {
group("p6_lock_app") {
deps = [ "${chip_root}/examples/lock-app/p6(${chip_root}/config/p6/toolchain:p6_lock_app)" ]
}
}

if (enable_qpg_lock_app_build) {
group("qpg_lock_app") {
deps = [ "${chip_root}/examples/lock-app/qpg(${chip_root}/config/qpg/toolchain:qpg_lock_app)" ]
Expand Down Expand Up @@ -469,9 +457,6 @@ if (current_toolchain != "${dir_pw_toolchain}/default:default") {
if (enable_efr32_window_app_build) {
deps += [ ":efr32_window_app" ]
}
if (enable_p6_lock_app_build) {
deps += [ ":p6_lock_app" ]
}
if (enable_k32w_lighting_app_build) {
deps += [ ":k32w_lighting_app" ]
}
Expand Down
2 changes: 1 addition & 1 deletion build/chip/chip_test_group.gni
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ template("chip_test_group") {
deps += [ get_label_info(_test, "label_no_toolchain") + "_lib" ]
}

if (_build_monolithic_library && chip_build_test_static_libraries) {
if (_build_monolithic_library) {
complete_static_lib = true
}
}
Expand Down
7 changes: 1 addition & 6 deletions build/chip/chip_test_suite.gni
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,7 @@ template("chip_test_suite") {
invoker.sources += invoker.test_sources
}

if (chip_build_test_static_libraries) {
_target_type = "static_library"
} else {
_target_type = "source_set"
}
target(_target_type, "${_suite_name}_lib") {
static_library("${_suite_name}_lib") {
forward_variables_from(invoker, "*", [ "tests" ])

output_dir = "${root_out_dir}/lib"
Expand Down
100 changes: 50 additions & 50 deletions build/chip/java/jar_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,69 +28,69 @@


def IsExecutable(path):
"""Returns whether file at |path| exists and is executable.
"""Returns whether file at |path| exists and is executable.
Args:
path: absolute or relative path to test.
Args:
path: absolute or relative path to test.
Returns:
True if the file at |path| exists, False otherwise.
"""
return os.path.isfile(path) and os.access(path, os.X_OK)
Returns:
True if the file at |path| exists, False otherwise.
"""
return os.path.isfile(path) and os.access(path, os.X_OK)


def FindCommand(command):
"""Looks up for |command| in PATH.
Args:
command: name of the command to lookup, if command is a relative or
absolute path (i.e. contains some path separator) then only that
path will be tested.
Returns:
Full path to command or None if the command was not found.
On Windows, this respects the PATHEXT environment variable when the
command name does not have an extension.
"""
fpath, _ = os.path.split(command)
if fpath:
if IsExecutable(command):
return command

if sys.platform == 'win32':
# On Windows, if the command does not have an extension, cmd.exe will
# try all extensions from PATHEXT when resolving the full path.
command, ext = os.path.splitext(command)
if not ext:
exts = os.environ['PATHEXT'].split(os.path.pathsep)
else:
exts = [ext]
"""Looks up for |command| in PATH.
Args:
command: name of the command to lookup, if command is a relative or
absolute path (i.e. contains some path separator) then only that
path will be tested.
Returns:
Full path to command or None if the command was not found.
On Windows, this respects the PATHEXT environment variable when the
command name does not have an extension.
"""
fpath, _ = os.path.split(command)
if fpath:
if IsExecutable(command):
return command

if sys.platform == 'win32':
# On Windows, if the command does not have an extension, cmd.exe will
# try all extensions from PATHEXT when resolving the full path.
command, ext = os.path.splitext(command)
if not ext:
exts = os.environ['PATHEXT'].split(os.path.pathsep)
else:
exts = ['']
exts = [ext]
else:
exts = ['']

for path in os.environ['PATH'].split(os.path.pathsep):
for ext in exts:
path = os.path.join(path, command) + ext
if IsExecutable(path):
return path
for path in os.environ['PATH'].split(os.path.pathsep):
for ext in exts:
path = os.path.join(path, command) + ext
if IsExecutable(path):
return path

return None
return None


def main():
java_path = FindCommand('jar')
if not java_path:
sys.stderr.write('jar: command not found\n')
sys.exit(EXIT_FAILURE)
java_path = FindCommand('jar')
if not java_path:
sys.stderr.write('jar: command not found\n')
sys.exit(EXIT_FAILURE)

args = sys.argv[1:]
if len(args) < 1:
sys.stderr.write('usage: %s [jar_args]...\n' % sys.argv[0])
sys.exit(EXIT_FAILURE)
args = sys.argv[1:]
if len(args) < 1:
sys.stderr.write('usage: %s [jar_args]...\n' % sys.argv[0])
sys.exit(EXIT_FAILURE)

return subprocess.check_call([java_path] + args)
return subprocess.check_call([java_path] + args)


if __name__ == '__main__':
sys.exit(main())
sys.exit(main())
Loading

0 comments on commit 62db710

Please sign in to comment.