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

[.github/workflows] Added pigweed-app related builds to workflows. #4563

Merged
merged 1 commit into from
Feb 8, 2021
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
11 changes: 9 additions & 2 deletions .github/workflows/examples-esp32.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,20 @@ jobs:
with:
languages: "cpp, python"
queries: +security-and-quality
- name: Build example Echo App
run: scripts/examples/esp_echo_app.sh
- name: Build example All Clusters App
run: scripts/examples/esp_example.sh all-clusters-app
- name: Copy aside build products
run: |
mkdir -p example_binaries/$BUILD_TYPE-build
cp examples/all-clusters-app/esp32/build/chip-all-clusters-app.elf \
example_binaries/$BUILD_TYPE-build/chip-all-clusters-app.elf
- name: Build example Pigweed App
run: scripts/examples/esp_example.sh pigweed-app
- name: Copy aside build products
run: |
mkdir -p example_binaries/$BUILD_TYPE-build
cp examples/pigweed-app/esp32/build/chip-pigweed-app.elf \
example_binaries/$BUILD_TYPE-build/chip-pigweed-app.elf
- name: Binary artifact suffix
id: outsuffix
uses: haya14busa/action-cond@v1.0.0
Expand Down
14 changes: 8 additions & 6 deletions .github/workflows/examples-nrfconnect.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,14 @@ jobs:
# with:
# languages: "cpp, python"
# queries: +security-and-quality
- name: Build example nRF Connect SDK Lock App
run: scripts/examples/nrfconnect_example.sh lock-app
- name: Build example nRF Connect SDK Lighting App
run: scripts/examples/nrfconnect_example.sh lighting-app
- name: Build example nRF Connect SDK Shell
run: scripts/examples/nrfconnect_example.sh shell
- name: Build example nRF Connect SDK Lock App on nRF52840 DK
run: scripts/examples/nrfconnect_example.sh lock-app nrf52840dk_nrf52840
- name: Build example nRF Connect SDK Lighting App on nRF52840 DK
run: scripts/examples/nrfconnect_example.sh lighting-app nrf52840dk_nrf52840
- name: Build example nRF Connect SDK Shell on nRF52840 DK
run: scripts/examples/nrfconnect_example.sh shell nrf52840dk_nrf52840
- name: Build example nRF Connect SDK Pigweed on nRF52840 DK
run: scripts/examples/nrfconnect_example.sh pigweed-app nrf52840dk_nrf52840
- name: Run unit tests for Zephyr native_posix_64 platform
run:
scripts/tests/nrfconnect_native_posix_tests.sh native_posix_64
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/qemu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ jobs:
uses: actions/checkout@v2
with:
submodules: true
- name: Build example Echo App
run: scripts/examples/esp_echo_app.sh
- name: Build example All Clusters App
run: scripts/examples/esp_example.sh all-clusters-app
- name: Build ESP32 QEMU and Run Tests
run: scripts/tests/esp32_qemu_tests.sh /tmp/test_logs
- name: Uploading Logs
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release_artifacts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
with:
submodules: true
- name: Build
run: scripts/examples/esp_echo_app.sh
run: scripts/examples/esp_example.sh all-clusters-app

- name: Upload artifact
run: |
Expand Down
16 changes: 8 additions & 8 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -181,9 +181,9 @@
"problemMatcher": ["$gcc"]
},
{
"label": "Build nRF Connect Lock Example",
"label": "Build nRF Connect Lock Example (nRF52840)",
"type": "shell",
"command": "source scripts/activate.sh && scripts/examples/nrfconnect_example.sh lock-app",
"command": "source scripts/activate.sh && scripts/examples/nrfconnect_example.sh lock-app nrf52840dk_nrf52840",
"group": "build",
"problemMatcher": {
"base": "$gcc",
Expand All @@ -194,9 +194,9 @@
}
},
{
"label": "Build nRF Connect Lighting Example",
"label": "Build nRF Connect Lighting Example (nRF52840)",
"type": "shell",
"command": "source scripts/activate.sh && scripts/examples/nrfconnect_example.sh lighting-app",
"command": "source scripts/activate.sh && scripts/examples/nrfconnect_example.sh lighting-app nrf52840dk_nrf52840",
"group": "build",
"problemMatcher": {
"base": "$gcc",
Expand All @@ -207,9 +207,9 @@
}
},
{
"label": "Build nRF Connect Shell Example",
"label": "Build nRF Connect Shell Example (nRF52840)",
"type": "shell",
"command": "source scripts/activate.sh && scripts/examples/nrfconnect_example.sh shell",
"command": "source scripts/activate.sh && scripts/examples/nrfconnect_example.sh shell nrf52840dk_nrf52840",
"group": "build",
"problemMatcher": {
"base": "$gcc",
Expand All @@ -220,9 +220,9 @@
}
},
{
"label": "Build nRF Connect Pigweed Example",
"label": "Build nRF Connect Pigweed Example (nRF52840)",
"type": "shell",
"command": "source scripts/activate.sh && scripts/examples/nrfconnect_example.sh pigweed-app",
"command": "source scripts/activate.sh && scripts/examples/nrfconnect_example.sh pigweed-app nrf52840dk_nrf52840",
"group": "build",
"problemMatcher": {
"base": "$gcc",
Expand Down
2 changes: 1 addition & 1 deletion examples/pigweed-app/esp32/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
# project subdirectory.
#

PROJECT_NAME := pw-rpc-app
PROJECT_NAME := chip-pigweed-app

EXTRA_COMPONENT_DIRS += $(PROJECT_PATH)/third_party/connectedhomeip/config/esp32/components \

Expand Down
2 changes: 1 addition & 1 deletion examples/pigweed-app/esp32/main/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#include "pw_sys_io/sys_io.h"
#include "pw_sys_io_esp32/init.h"

const char * TAG = "pw-rpc-app";
const char * TAG = "chip-pigweed-app";

namespace hdlc_example {
extern void Start();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,25 +19,28 @@
set -x
env

root=examples/all-clusters-app/esp32/
app="$1"
root=examples/$app/esp32/

# shellcheck source=/dev/null
source "$root"/idf.sh
shift 1

rm -f "$root"/sdkconfig
SDKCONFIG_DEFAULTS=sdkconfig_devkit.defaults idf make -j8 -C "$root" defconfig "$@"
idf make -j8 -C "$root" "$@" || {
echo 'build DevKit-C failed'
if [ -z "$app" ]; then
echo "No mandatory app argument supplied!"
exit 1
}
cp examples/all-clusters-app/esp32/build/chip-all-clusters-app.elf \
examples/all-clusters-app/esp32/build/devkit-c-chip-all-clusters-app.elf
fi

rm -f "$root"/sdkconfig
SDKCONFIG_DEFAULTS=sdkconfig_m5stack.defaults idf make -j8 -C "$root" defconfig "$@"
idf make -j8 -C "$root" "$@" || {
echo 'build M5Stack failed'
exit 1
}
cp examples/all-clusters-app/esp32/build/chip-all-clusters-app.elf \
examples/all-clusters-app/esp32/build/m5stack-chip-all-clusters-app.elf
source "scripts/activate.sh"
# shellcheck source=/dev/null
source "$root"/idf.sh

for sdkconfig in "$root"/sdkconfig*.defaults; do
# remove root path to get sdkconfig*.defaults name
sdkconfig_name=${sdkconfig#"$root"/}
rm -f "$root"/sdkconfig
SDKCONFIG_DEFAULTS=$sdkconfig_name idf make -j8 -C "$root" defconfig "$@"
idf make -j8 -C "$root" "$@" || {
echo "build $sdkconfig_name failed"
exit 1
}
cp "$root"/build/chip-"$app".elf "$root"/build/"${sdkconfig_name%".defaults"}"-chip-"$app".elf
done
12 changes: 10 additions & 2 deletions scripts/examples/nrfconnect_example.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,15 @@
# limitations under the License.
#

# Run bootstrap to set up e.g. Pigweed correctly
# Run bootstrap and activate to set up e.g. Pigweed correctly
source "$(dirname "$0")/../../scripts/bootstrap.sh"
source "$(dirname "$0")/../../scripts/activate.sh"
Copy link
Contributor

Choose a reason for hiding this comment

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

isn't running bootstrap.sh enough?

Copy link
Contributor Author

@kkasperczyk-no kkasperczyk-no Feb 1, 2021

Choose a reason for hiding this comment

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

I think not for pigweed-app, as activate.sh sets proper python version. Without running activate.sh python version is set wrong (I guess it is 2.7 ?) and when compiling pigweed syntax errors appear.

Copy link
Contributor

@szatmz szatmz Feb 1, 2021

Choose a reason for hiding this comment

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

Well, that's weird given that activate.sh is a symlink to bootstrap.sh:

$ ll ./scripts/activate.sh 
lrwxrwxrwx 1 szatmz primarygroup 12 Nov  2 17:48 ./scripts/activate.sh -> bootstrap.sh

Copy link
Contributor

Choose a reason for hiding this comment

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

@kkasperczyk-no can you take a peek at this? Sounds like something isn't working as expected..


cd "$(dirname "$0")/../../examples"

APP="$1"
BOARD="$2"
shift 2

if [[ ! -f "$APP/nrfconnect/CMakeLists.txt" ]]; then
echo "Usage: $0 <application>" >&2
Expand All @@ -30,8 +33,13 @@ if [[ ! -f "$APP/nrfconnect/CMakeLists.txt" ]]; then
exit 1
fi

if [ -z "$BOARD" ]; then
echo "No mandatory BOARD argument supplied!"
exit 1
fi

set -x
[[ -n $ZEPHYR_BASE ]] && source "$ZEPHYR_BASE/zephyr-env.sh"
env

west build -b nrf52840dk_nrf52840 -d "$APP/nrfconnect/build" "$APP/nrfconnect"
west build -b "$BOARD" -d "$APP/nrfconnect/build" "$APP/nrfconnect" -- "$@"