Skip to content

Commit f1c735b

Browse files
authored
Merge pull request #9 from SPRESENSE/merge-nuttx-10.1.0
Merge NuttX 10.1.0
2 parents fe86a15 + a3a228f commit f1c735b

File tree

2,307 files changed

+68439
-151546
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2,307 files changed

+68439
-151546
lines changed

.asf.yaml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
github:
2+
description: "Apache NuttX Apps is a collection of tools, shells, network utilities, libraries, interpreters and can be used with the NuttX RTOS"
3+
homepage: https://nuttx.apache.org/
4+
features:
5+
# Enable issues management
6+
issues: true
7+
# Enable project for project management boards
8+
projects: true
9+
labels:
10+
- nuttx
11+
- rtos
12+
- embedded
13+
- real-time
14+
- mcu
15+
- microcontroller
16+
enabled_merge_buttons:
17+
# disable squash button:
18+
squash: false
19+
# disable merge button:
20+
merge: false
21+
# enable rebase button:
22+
rebase: true

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
## Summary
2+
3+
## Impact
4+
5+
## Testing
6+

.github/workflows/build.yml

Lines changed: 191 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,191 @@
1+
# Licensed under the Apache License, Version 2.0 (the "License");
2+
# you may not use this file except in compliance with the License.
3+
# You may obtain a copy of the License at
4+
#
5+
# http://www.apache.org/licenses/LICENSE-2.0
6+
#
7+
# Unless required by applicable law or agreed to in writing, software
8+
# distributed under the License is distributed on an "AS IS" BASIS,
9+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10+
# See the License for the specific language governing permissions and
11+
# limitations under the License.
12+
#
13+
name: Build
14+
15+
on:
16+
pull_request:
17+
push:
18+
branches:
19+
- master
20+
- 'releases/*'
21+
tags:
22+
23+
jobs:
24+
Fetch-Source:
25+
runs-on: ubuntu-latest
26+
steps:
27+
- name: Determine Target Branches
28+
id: gittargets
29+
shell: bash
30+
run: |
31+
OS_REF=""
32+
APPS_REF=""
33+
34+
REF=$GITHUB_REF
35+
36+
# If a base ref is set this is a PR and we will want to use
37+
# the base ref instead of the ref that triggered the event
38+
if [ ${GITHUB_BASE_REF} ]; then
39+
REF=refs/heads/$GITHUB_BASE_REF
40+
fi
41+
42+
echo "Working with ref: $REF"
43+
44+
# We modify for all tags and release branches
45+
if [[ $REF =~ refs/heads/releases/*|refs/tags/* ]]; then
46+
if [[ $REF =~ refs/heads/* ]]
47+
then
48+
REF_NAME=${REF##refs/heads/}
49+
echo "Working with a branch: $REF_NAME"
50+
else
51+
REF_NAME=${REF##refs/tags/}
52+
echo "Working with a tag: $REF_NAME"
53+
fi
54+
55+
# Determine the repo and leave that unset to use the normal checkout behavior
56+
# of using the merge commit instead of HEAD
57+
case $GITHUB_REPOSITORY in
58+
"apache/incubator-nuttx")
59+
# OS
60+
echo "Triggered by change in OS"
61+
APPS_REF=$REF_NAME
62+
;;
63+
64+
"apache/incubator-nuttx-apps" )
65+
# APPS
66+
OS_REF=$REF_NAME
67+
echo "Triggered by change in APPS"
68+
;;
69+
70+
*)
71+
echo "Trigger by change on $GITHUB_REPOSITORY. This is unexpected."
72+
;;
73+
esac
74+
fi
75+
76+
echo ::set-output name=os_ref::$OS_REF
77+
echo ::set-output name=apps_ref::$APPS_REF
78+
79+
- name: Checkout nuttx repo
80+
uses: actions/checkout@v2
81+
with:
82+
repository: apache/incubator-nuttx
83+
ref: ${{ steps.gittargets.outputs.os_ref }}
84+
path: sources/nuttx
85+
fetch-depth: 1
86+
- name: Checkout nuttx repo tags
87+
run: git -C sources/nuttx fetch --tags
88+
89+
- name: Checkout apps repo
90+
uses: actions/checkout@v2
91+
with:
92+
repository: apache/incubator-nuttx-apps
93+
ref: ${{ steps.gittargets.outputs.apps_ref }}
94+
path: sources/apps
95+
fetch-depth: 1
96+
97+
- name: Tar sources
98+
run: tar zcf sources.tar.gz sources
99+
- name: Archive Source Bundle
100+
uses: actions/upload-artifact@v1
101+
with:
102+
name: source-bundle
103+
path: sources.tar.gz
104+
105+
Linux:
106+
needs: Fetch-Source
107+
runs-on: ubuntu-latest
108+
env:
109+
DOCKER_BUILDKIT: 1
110+
111+
strategy:
112+
matrix:
113+
boards: [arm-01, arm-02, arm-03, arm-04, arm-05, arm-06, arm-07, arm-08, arm-09, arm-10, arm-11, arm-12, arm-13, other, risc-v, sim01, sim02, xtensa]
114+
115+
steps:
116+
- name: Download Source Artifact
117+
uses: actions/download-artifact@v1
118+
with:
119+
name: source-bundle
120+
path: .
121+
- name: Extract sources
122+
run: tar zxf sources.tar.gz
123+
- name: Docker Login
124+
uses: azure/docker-login@v1
125+
with:
126+
login-server: docker.pkg.github.com
127+
username: ${GITHUB_ACTOR}
128+
password: ${{ secrets.GITHUB_TOKEN }}
129+
130+
- name: Docker Pull
131+
run: docker pull docker.pkg.github.com/apache/incubator-nuttx/apache-nuttx-ci-linux
132+
- name: Export NuttX Repo SHA
133+
run: echo "nuttx_sha=`git -C sources/nuttx rev-parse HEAD`" >> $GITHUB_ENV
134+
- name: Run builds
135+
uses: ./sources/nuttx/.github/actions/ci-container
136+
env:
137+
BLOBDIR: /tools/blobs
138+
with:
139+
run: |
140+
echo "::add-matcher::sources/nuttx/.github/gcc.json"
141+
export CCACHE_DIR=`pwd`/ccache
142+
mkdir $CCACHE_DIR
143+
export ARTIFACTDIR=`pwd`/buildartifacts
144+
cd sources/nuttx/tools/ci
145+
./cibuild.sh -A -c testlist/${{matrix.boards}}.dat
146+
ccache -s
147+
- uses: actions/upload-artifact@v2
148+
with:
149+
name: linux-builds
150+
path: buildartifacts/
151+
continue-on-error: true
152+
153+
macOS:
154+
runs-on: macos-10.15
155+
needs: Fetch-Source
156+
strategy:
157+
matrix:
158+
boards: [macos, sim01, sim02]
159+
steps:
160+
- name: Download Source Artifact
161+
uses: actions/download-artifact@v1
162+
with:
163+
name: source-bundle
164+
path: .
165+
- name: Extract sources
166+
run: tar zxf sources.tar.gz
167+
- name: Restore Tools Cache
168+
id: cache-tools
169+
uses: actions/cache@v2
170+
env:
171+
cache-name: ${{ runner.os }}-cache-tools
172+
with:
173+
path: prebuilt
174+
key: ${{ runner.os }}-tools-${{ hashFiles('./sources/nuttx/tools/ci/cibuild.sh') }}
175+
176+
- name: Export NuttX Repo SHA
177+
run: echo "nuttx_sha=`git -C sources/nuttx rev-parse HEAD`" >> $GITHUB_ENV
178+
- name: Run Builds
179+
run: |
180+
echo "::add-matcher::sources/nuttx/.github/gcc.json"
181+
export CCACHE_DIR=`pwd`/ccache
182+
mkdir $CCACHE_DIR
183+
export ARTIFACTDIR=`pwd`/buildartifacts
184+
cd sources/nuttx/tools/ci
185+
./cibuild.sh -i -A -c testlist/${{matrix.boards}}.dat
186+
ccache -s
187+
- uses: actions/upload-artifact@v2
188+
with:
189+
name: macos-builds
190+
path: buildartifacts/
191+
continue-on-error: true

.github/workflows/cancel.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Cancelling Duplicates
2+
on:
3+
workflow_run:
4+
workflows: ["Build", "Check", "❄️ Lint"]
5+
types: ['requested']
6+
7+
jobs:
8+
cancel-duplicate-workflow-runs:
9+
name: "Cancel duplicate workflow runs"
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: apache/airflow-cancel-workflow-runs@master
13+
name: "Cancel duplicate workflow runs"
14+
with:
15+
cancelMode: allDuplicates
16+
token: ${{ secrets.GITHUB_TOKEN }}
17+
sourceRunId: ${{ github.event.workflow_run.id }}

.github/workflows/check.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# Licensed under the Apache License, Version 2.0 (the "License");
2+
# you may not use this file except in compliance with the License.
3+
# You may obtain a copy of the License at
4+
#
5+
# http://www.apache.org/licenses/LICENSE-2.0
6+
#
7+
# Unless required by applicable law or agreed to in writing, software
8+
# distributed under the License is distributed on an "AS IS" BASIS,
9+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10+
# See the License for the specific language governing permissions and
11+
# limitations under the License.
12+
#
13+
name: Check
14+
15+
on:
16+
pull_request:
17+
18+
jobs:
19+
check:
20+
runs-on: ubuntu-18.04
21+
22+
steps:
23+
- name: Checkout nuttx repo
24+
uses: actions/checkout@v2
25+
with:
26+
repository: apache/incubator-nuttx
27+
path: nuttx
28+
fetch-depth: 0
29+
30+
- name: Checkout apps repo
31+
uses: actions/checkout@v2
32+
with:
33+
repository: apache/incubator-nuttx-apps
34+
path: apps
35+
fetch-depth: 0
36+
37+
- name: Check Pull Request
38+
run: |
39+
echo "::add-matcher::nuttx/.github/nxstyle.json"
40+
cd apps
41+
commits="${{ github.event.pull_request.base.sha }}..HEAD"
42+
git log --oneline $commits
43+
echo "../nuttx/tools/checkpatch.sh -g $commits"
44+
../nuttx/tools/checkpatch.sh -g $commits

.github/workflows/lint.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: ❄️ Lint
2+
3+
on: [pull_request]
4+
5+
jobs:
6+
yamllint:
7+
name: 🍺 YAML
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v2
11+
- name: 🧹 YAML Lint
12+
uses: github/super-linter@v3
13+
env:
14+
VALIDATE_YAML: true
15+
FILTER_REGEX_INCLUDE: .*\.github/.*

.gitignore

Lines changed: 19 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,27 @@
1-
.depend
2-
Make.dep
3-
*.o
41
*.a
2+
*.adb
3+
*.asm
54
*.d
5+
*.dSYM
6+
*.exe
7+
*.hobj
68
*.i
9+
*.lib
10+
*.lst
11+
*.o
12+
*.obj
13+
*.rel
14+
*.src
15+
*.swp
16+
*.sym
717
*~
8-
.swp
9-
.*.swp
10-
core
11-
.gdbinit
12-
cscope.out
13-
/Kconfig
18+
.depend
19+
.kconfig
1420
/bin
21+
/boot_romfsimg.h
1522
/external
16-
/.context
17-
/.config
18-
/.depend
19-
/*.lib
23+
/Kconfig
2024
/romfs.img
21-
/boot_romfsimg.h
2225
/symtab_apps.c
23-
/*/*/.built
24-
26+
cscope.out
27+
Make.dep

0 commit comments

Comments
 (0)