Skip to content

Commit 4755315

Browse files
committed
ci: Build application samples
Make sure samples are building with default BSP (currently nordic_pca10056).
1 parent ac9aff0 commit 4755315

File tree

3 files changed

+124
-1
lines changed

3 files changed

+124
-1
lines changed

.github/test_build_apps.sh

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
#!/bin/bash -x
2+
3+
# Licensed to the Apache Software Foundation (ASF) under one
4+
# or more contributor license agreements. See the NOTICE file
5+
# distributed with this work for additional information
6+
# regarding copyright ownership. The ASF licenses this file
7+
# to you under the Apache License, Version 2.0 (the
8+
# "License"); you may not use this file except in compliance
9+
# with the License. You may obtain a copy of the License at
10+
#
11+
# http://www.apache.org/licenses/LICENSE-2.0
12+
#
13+
# Unless required by applicable law or agreed to in writing,
14+
# software distributed under the License is distributed on an
15+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16+
# KIND, either express or implied. See the License for the
17+
# specific language governing permissions and limitations
18+
# under the License.
19+
20+
EXIT_CODE=0
21+
22+
APPS=$(basename -a `ls -d repos/apache-mynewt-core/apps/*/`)
23+
24+
# Those apps require some special configurations or setup
25+
IGNORED_APPS="ffs2native fs_test hash_test lora_app_shell loraping lorashell\
26+
pwm_test rust_blinky lvgl_demo"
27+
28+
for app in ${APPS}; do
29+
# NOTE: do not remove the spaces around IGNORED_APPS; it's required to
30+
# match against the first and last entries
31+
if [[ " ${IGNORED_APPS} " =~ [[:blank:]]${app}[[:blank:]] ]]; then
32+
echo "Skipping $app"
33+
continue
34+
fi
35+
36+
echo "Testing $app"
37+
38+
# TODO add support for 'custom' app BSP
39+
40+
target="test-$app"
41+
newt target delete -s -f $target &> /dev/null
42+
newt target create -s $target
43+
newt target set -s $target bsp="@apache-mynewt-core/hw/bsp/nordic_pca10056"
44+
newt target set -s $target app="@apache-mynewt-core/apps/$app"
45+
newt build -q $target
46+
47+
rc=$?
48+
[[ $rc -ne 0 ]] && EXIT_CODE=$rc
49+
50+
newt clean $target
51+
newt target delete -s -f $target
52+
done
53+
54+
exit $EXIT_CODE

.github/workflows/build_all_apps.yml

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
#
2+
# Licensed to the Apache Software Foundation (ASF) under one
3+
# or more contributor license agreements. See the NOTICE file
4+
# distributed with this work for additional information
5+
# regarding copyright ownership. The ASF licenses this file
6+
# to you under the Apache License, Version 2.0 (the
7+
# "License"); you may not use this file except in compliance
8+
# with the License. You may obtain a copy of the License at
9+
#
10+
# http://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
# Unless required by applicable law or agreed to in writing,
13+
# software distributed under the License is distributed on an
14+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
# KIND, either express or implied. See the License for the
16+
# specific language governing permissions and limitations
17+
# under the License.
18+
#
19+
20+
name: Build check
21+
22+
on: [push, pull_request]
23+
24+
jobs:
25+
targets:
26+
name: Build all apps
27+
strategy:
28+
fail-fast: false
29+
matrix:
30+
os: [ubuntu-latest]
31+
runs-on: ${{ matrix.os }}
32+
steps:
33+
- uses: actions/checkout@v3
34+
- uses: actions/setup-go@v3
35+
with:
36+
go-version: 'stable'
37+
- uses: carlosperate/arm-none-eabi-gcc-action@48db4484a55750df7a0ccca63347fcdea6534d78
38+
with:
39+
release: '12.2.Rel1'
40+
- name: Install Dependencies
41+
shell: bash
42+
if: matrix.os == 'ubuntu-latest'
43+
run: |
44+
sudo apt-get update
45+
sudo apt-get install -y gcc-multilib
46+
- name: Install newt
47+
shell: bash
48+
run: |
49+
go version
50+
go install mynewt.apache.org/newt/newt@latest
51+
- name: Setup project
52+
shell: bash
53+
run: |
54+
newt new build
55+
cp -f .github/project.yml build/project.yml
56+
cd build
57+
newt upgrade --shallow=1
58+
git -C repos/apache-mynewt-core fetch origin $GITHUB_SHA
59+
sed -i "s/0.0.0/$GITHUB_SHA-commit/g" project.yml
60+
newt upgrade --shallow=1
61+
rm -rf targets
62+
cd ..
63+
- name: Build applications
64+
shell: bash
65+
if: matrix.os == 'ubuntu-latest'
66+
run: |
67+
cd build
68+
bash ../.github/test_build_apps.sh
69+
cd ..

apps/bsncent/syscfg.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ syscfg.vals:
3030
LOG_LEVEL: 255
3131

3232
# Turn strict scheduling on
33-
BLE_LL_STRICT_CONN_SCHEDULING: 1
33+
BLE_LL_CONN_STRICT_SCHED: 1
3434

3535
# Config in RAM
3636
BLE_STORE_CONFIG_PERSIST: 0

0 commit comments

Comments
 (0)