Compare commits
1 Commits
| Author | SHA1 | Date |
|---|---|---|
|
|
2ce740a0ac |
|
|
@ -0,0 +1,40 @@
|
|||
name: 缺陷反馈 | Bug
|
||||
description: 当您发现了一个缺陷,需要向社区反馈时,请使用此模板。
|
||||
title: "[BUG] <标题>"
|
||||
labels: [👀 needs triage, "Type: Bug"]
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
感谢您对 openvela 社区的支持与关注,欢迎反馈缺陷。
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: "重现问题的步骤"
|
||||
description: "简洁地描述错误是什么,为什么您认为它是一个错误,以及如何重现它的步骤"
|
||||
placeholder: |
|
||||
重现问题的步骤,可能包括日志和截图。
|
||||
1. 步骤 1
|
||||
2. 步骤 2
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: dropdown
|
||||
id: architecture
|
||||
attributes:
|
||||
label: Issue Architecture
|
||||
multiple: true
|
||||
options:
|
||||
- "Arch: arm"
|
||||
- "Arch: arm64"
|
||||
- "Arch: x86_64"
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
提交前请确认您已遵循以下步骤:
|
||||
- 确认问题在 [**dev**](../) 上可重现。
|
||||
- 遇到构建问题时运行 `make distclean`。
|
||||
- 搜索 [现有问题](./)
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
name: 新需求 | Feature
|
||||
description: 当您需要反馈或实现一个新需求时,使用此模板。
|
||||
title: "[FEATURE] <标题>"
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
感谢您对 openvela 社区的支持与关注。
|
||||
|
||||
- type: textarea
|
||||
id: question-description
|
||||
attributes:
|
||||
label: 您的需求是否和问题相关?
|
||||
description: 请简单描述问题,并提供issue链接。
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
id: solution
|
||||
attributes:
|
||||
label: 请描述您想要的解决方案
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
id: 替代方案
|
||||
attributes:
|
||||
label: 请描述您考虑过的替代解决方案
|
||||
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
提交前请搜索 [现有功能需求](./)
|
||||
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
name: 问题咨询
|
||||
title: "[问题咨询]"
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
感谢您对 openvela 社区的支持与关注。
|
||||
|
||||
- type: textarea
|
||||
id: question-description
|
||||
attributes:
|
||||
label: 描述
|
||||
description: 请解释您的问题的背景或上下文,这有助于其他人更好地理解您的问题或疑问。
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
提交前请确认您已遵循以下步骤:
|
||||
- 我已搜索 [openvela 文档](../),但未找到问题的答案。
|
||||
- 已搜索 [现有问题](./)
|
||||
|
|
@ -0,0 +1 @@
|
|||
blank_issues_enabled: false
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
## 概要
|
||||
|
||||
*在此部分更新信息,说明更改的必要性、具体做了什么以及如何实现的,如果有新功能出现,请提供参考资料(依赖关系、类似问题和解决方案等)。*
|
||||
|
||||
## 影响
|
||||
|
||||
*在此部分更新信息(如适用),说明更改如何影响用户、构建过程、硬件、文档、安全性、兼容性等。*
|
||||
|
||||
## 测试
|
||||
|
||||
*在此部分更新信息,详细说明如何验证更改,使用什么主机进行构建(操作系统、CPU、编译器等),使用什么目标进行验证(架构、板子:配置等)。提供更改前后的构建和运行日志将非常有帮助。*
|
||||
|
|
@ -0,0 +1 @@
|
|||
* @xiaoxiang781216 @GUIDINGLI
|
||||
|
|
@ -11,18 +11,18 @@
|
|||
# limitations under the License.
|
||||
#
|
||||
name: Bug report
|
||||
description: Report a bug to improve NuttX stability
|
||||
description: Report a bug to improve openvela stability
|
||||
title: "[BUG] <title>"
|
||||
labels: [👀 needs triage, "Type: Bug"]
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
Hello NuttX Community member! Please keep things tidy by putting your post in the proper place:
|
||||
Hello openvela Community member! Please keep things tidy by putting your post in the proper place:
|
||||
|
||||
Reporting a bug: use this form.
|
||||
Asking a question or getting help: use the [General Help](https://github.com/apache/nuttx/issues/new?assignees=&labels=Community%3A+Question&projects=&template=003_help.yml&title=%5BHELP%5D+%3Ctitle%3E) form or [Mailing list](https://nuttx.apache.org/community/).
|
||||
Requesting a new feature: use the [Feature request](https://github.com/apache/nuttx/issues/new?assignees=&labels=Type%3A+Enhancement&projects=&template=002_feature_request.yml&title=%5BFEATURE%5D+%3Ctitle%3E) form.
|
||||
Asking a question or getting help: use the [General Help](./new?assignees=&labels=Community%3A+Question&projects=&template=003_help.yml&title=%5BHELP%5D+%3Ctitle%3E) form.
|
||||
Requesting a new feature: use the [Feature request](./new?assignees=&labels=Type%3A+Enhancement&projects=&template=002_feature_request.yml&title=%5BFEATURE%5D+%3Ctitle%3E) form.
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: "Description / Steps to reproduce the issue"
|
||||
|
|
@ -35,42 +35,6 @@ body:
|
|||
validations:
|
||||
required: true
|
||||
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
### Environment
|
||||
Please specify your environment.
|
||||
|
||||
- type: dropdown
|
||||
id: os
|
||||
attributes:
|
||||
label: On which OS does this issue occur?
|
||||
multiple: true
|
||||
options:
|
||||
- "[OS: BSD]"
|
||||
- "[OS: Linux]"
|
||||
- "[OS: Mac]"
|
||||
- "[OS: Windows]"
|
||||
- "[OS: Other]"
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: input
|
||||
id: os_version
|
||||
attributes:
|
||||
label: What is the version of your OS?
|
||||
description: Please fill out the distro or OS version from the previous dropdown
|
||||
placeholder: "MacOS 14, Ubuntu 23.10, Windows 10/MSYS_NT-10.0-19045, ecc"
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: input
|
||||
attributes:
|
||||
label: NuttX Version
|
||||
placeholder: "e.g., master, 12.5.1, ecc"
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: dropdown
|
||||
id: architecture
|
||||
attributes:
|
||||
|
|
@ -78,54 +42,9 @@ body:
|
|||
description: What architecture(s) are you seeing the problem on?
|
||||
multiple: true
|
||||
options:
|
||||
- "[Arch: all]"
|
||||
- "[Arch: arm]"
|
||||
- "[Arch: arm64]"
|
||||
- "[Arch: avr]"
|
||||
- "[Arch: ceva]"
|
||||
- "[Arch: hc]"
|
||||
- "[Arch: mips]"
|
||||
- "[Arch: misoc]"
|
||||
- "[Arch: openrisc]"
|
||||
- "[Arch: renesas]"
|
||||
- "[Arch: risc-v]"
|
||||
- "[Arch: simulator]"
|
||||
- "[Arch: sparc]"
|
||||
- "[Arch: tricore]"
|
||||
- "[Arch: x86]"
|
||||
- "[Arch: x86_64]"
|
||||
- "[Arch: xtensa]"
|
||||
- "[Arch: z16]"
|
||||
- "[Arch: z80]"
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: dropdown
|
||||
id: area
|
||||
attributes:
|
||||
label: Issue Area
|
||||
description: What area(s) are you seeing the problem on?
|
||||
multiple: true
|
||||
options:
|
||||
- "[Area: Other]"
|
||||
- "[Area: Applications]"
|
||||
- "[Area: Api]"
|
||||
- "[Area: Board support]"
|
||||
- "[Area: Build System]"
|
||||
- "[Area: Configuring]"
|
||||
- "[Area: Debugging]"
|
||||
- "[Area: Drivers]"
|
||||
- "[Area: File System]"
|
||||
- "[Area: Installing]"
|
||||
- "[Area: Kconfig]"
|
||||
- "[Area: Kernel]"
|
||||
- "[Area: Memory Management]"
|
||||
- "[Area: Native port]"
|
||||
- "[Area: Networking]"
|
||||
- "[Area: OS Components]"
|
||||
- "[Area: Posix]"
|
||||
- "[Area: Sensors]"
|
||||
- "[Area: Specific Peripheral]"
|
||||
validations:
|
||||
required: true
|
||||
|
||||
|
|
@ -135,14 +54,7 @@ body:
|
|||
### Before You Submit
|
||||
|
||||
Please verify that you've followed these steps:
|
||||
- Confirm the problem is reproducible on [**master**](https://github.com/apache/nuttx) or [**latest stable**](https://nuttx.apache.org/download) release.
|
||||
- Confirm the problem is reproducible on [**dev**](../).
|
||||
- Run `make distclean` when encountering build issues.
|
||||
- Search [existing issues](https://github.com/apache/nuttx/issues) (including [closed](https://github.com/apache/nuttx/issues?q=is%3Aissue+is%3Aclosed))
|
||||
- Read the [FAQ](https://nuttx.apache.org/docs/latest/faq/index.html).
|
||||
- Search [existing issues](./) (including [closed](./?q=is%3Aissue+is%3Aclosed))
|
||||
|
||||
- type: checkboxes
|
||||
attributes:
|
||||
label: "Verification"
|
||||
options:
|
||||
- label: "I have verified before submitting the report."
|
||||
required: true
|
||||
|
|
|
|||
|
|
@ -11,19 +11,19 @@
|
|||
# limitations under the License.
|
||||
#
|
||||
name: Feature request
|
||||
description: Request an enhancement for NuttX
|
||||
description: Request an enhancement for openvela
|
||||
title: "[FEATURE] <title>"
|
||||
labels: ["Type: Enhancement"]
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
Hello NuttX Community member! Please keep things tidy by putting your post in the proper place:
|
||||
Hello openvela Community member! Please keep things tidy by putting your post in the proper place:
|
||||
|
||||
Requesting a new feature: use this form.
|
||||
Asking a question or getting help: use the [General Help](https://github.com/apache/nuttx/issues/new?assignees=&labels=Community%3A+Question&projects=&template=003_help.yml&title=%5BHELP%5D+%3Ctitle%3E) form or [Mailing list](https://nuttx.apache.org/community/).
|
||||
Reporting a bug: use the [Bug report](https://github.com/apache/nuttx/issues/new?assignees=&labels=%F0%9F%91%80+needs+triage%2CType%3A+Bug&projects=&template=001_bug_report.yml&title=%5BBUG%5D+%3Ctitle%3E) form.
|
||||
|
||||
Asking a question or getting help: use the [General Help](./new?assignees=&labels=Community%3A+Question&projects=&template=003_help.yml&title=%5BHELP%5D+%3Ctitle%3E) form.
|
||||
Reporting a bug: use the [Bug report](./new?assignees=&labels=%F0%9F%91%80+needs+triage%2CType%3A+Bug&projects=&template=001_bug_report.yml&title=%5BBUG%5D+%3Ctitle%3E) form.
|
||||
|
||||
- type: textarea
|
||||
id: question-description
|
||||
attributes:
|
||||
|
|
@ -52,11 +52,4 @@ body:
|
|||
### Before You Submit
|
||||
|
||||
Please verify that you've followed these steps:
|
||||
- Search [existing feature requests](https://github.com/apache/nuttx/issues) (including [closed](https://github.com/apache/nuttx/issues?q=is%3Aissue+is%3Aclosed))
|
||||
|
||||
- type: checkboxes
|
||||
attributes:
|
||||
label: "Verification"
|
||||
options:
|
||||
- label: "I have verified before submitting the report."
|
||||
required: true
|
||||
- Search [existing feature requests](./) (including [closed](./?q=is%3Aissue+is%3Aclosed))
|
||||
|
|
|
|||
|
|
@ -11,23 +11,23 @@
|
|||
# limitations under the License.
|
||||
#
|
||||
name: General Help
|
||||
description: Get general support regarding NuttX
|
||||
description: Get general support regarding openvela
|
||||
title: "[HELP] <title>"
|
||||
labels: ["Community: Question"]
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
Hello NuttX Community member! Please keep things tidy by putting your post in the proper place:
|
||||
Hello openvela Community member! Please keep things tidy by putting your post in the proper place:
|
||||
|
||||
Asking a question or getting help: use this form or [Mailing list](https://nuttx.apache.org/community/).
|
||||
Reporting a bug: use the [Bug report](https://github.com/apache/nuttx/issues/new?assignees=&labels=%F0%9F%91%80+needs+triage%2CType%3A+Bug&projects=&template=001_bug_report.yml&title=%5BBUG%5D+%3Ctitle%3E) form.
|
||||
Requesting a new feature: use the [Feature request](https://github.com/apache/nuttx/issues/new?assignees=&labels=Type%3A+Enhancement&projects=&template=002_feature_request.yml&title=%5BFEATURE%5D+%3Ctitle%3E) form
|
||||
Asking a question or getting help: use this form.
|
||||
Reporting a bug: use the [Bug report](./new?assignees=&labels=%F0%9F%91%80+needs+triage%2CType%3A+Bug&projects=&template=001_bug_report.yml&title=%5BBUG%5D+%3Ctitle%3E) form.
|
||||
Requesting a new feature: use the [Feature request](./new?assignees=&labels=Type%3A+Enhancement&projects=&template=002_feature_request.yml&title=%5BFEATURE%5D+%3Ctitle%3E) form
|
||||
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
### Whether you're a beginner or an experienced developer, NuttX Help is here to assist you with all your NuttX questions and concerns.
|
||||
### Whether you're a beginner or an experienced developer, openvela Help is here to assist you with all your openvela questions and concerns.
|
||||
|
||||
- type: textarea
|
||||
id: question-description
|
||||
|
|
@ -43,12 +43,5 @@ body:
|
|||
### Before You Submit
|
||||
|
||||
Please verify that you've followed these steps:
|
||||
- I have searched [NuttX Documentation](https://nuttx.apache.org/docs/latest/) and didn't find an answer to my question.
|
||||
- Search [existing issues](https://github.com/apache/nuttx/issues) (including [closed](https://github.com/apache/nuttx/issues?q=is%3Aissue+is%3Aclosed))
|
||||
|
||||
- type: checkboxes
|
||||
attributes:
|
||||
label: "Verification"
|
||||
options:
|
||||
- label: "I have verified before submitting the report."
|
||||
required: true
|
||||
- I have searched [openvela Documentation](../) and didn't find an answer to my question.
|
||||
- Search [existing issues](./) (including [closed](./?q=is%3Aissue+is%3Aclosed))
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
*Note: Please adhere to [Contributing Guidelines](https://github.com/apache/nuttx/blob/master/CONTRIBUTING.md).*
|
||||
*Note: Please adhere to [Contributing Guidelines](https://github.com/open-vela/docs/blob/dev/CONTRIBUTING.md).*
|
||||
|
||||
## Summary
|
||||
|
||||
|
|
@ -18,4 +18,3 @@
|
|||
used for verification (arch, board:config, ..), etc. Providing build
|
||||
and runtime logs from before and after change is highly appreciated.*
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,21 +0,0 @@
|
|||
# Security Policy
|
||||
|
||||
## Supported Versions
|
||||
|
||||
| Version | Supported |
|
||||
| ------- | ------------------ |
|
||||
| 11.0.x | :heavy_check_mark: |
|
||||
| 10.3.x | :heavy_check_mark: |
|
||||
| 10.2.x | :heavy_check_mark: |
|
||||
| 10.1.x | :heavy_check_mark: |
|
||||
| 10.0.x | :heavy_check_mark: |
|
||||
| 9.1.x | :heavy_check_mark: |
|
||||
| < 9.1 | :x: |
|
||||
|
||||
## Reporting a Vulnerability
|
||||
|
||||
If you think you have found a possible vulnerability please reach out to the _private_ project mailing list
|
||||
private@nuttx.apache.org or the Apache Security list security@apache.org.
|
||||
|
||||
Please **DO NOT** create a GitHub issue or email the project dev list as they are public.
|
||||
This project follows the Apache Vulnerability Handling Policy documented [here](https://www.apache.org/security/committers.html#vulnerability-handling).
|
||||
|
|
@ -1,25 +0,0 @@
|
|||
# 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.
|
||||
#
|
||||
|
||||
name: ci-container
|
||||
inputs:
|
||||
run: # id of input
|
||||
description: 'Commands to run'
|
||||
required: true
|
||||
runs:
|
||||
using: 'docker'
|
||||
image: 'ghcr.io/apache/nuttx/apache-nuttx-ci-linux'
|
||||
args:
|
||||
- "/bin/bash"
|
||||
- "-ce"
|
||||
- ${{ inputs.run }}
|
||||
|
|
@ -1,248 +0,0 @@
|
|||
name: "Free Disk Space (Ubuntu)"
|
||||
author: "Jérémie Lumbroso"
|
||||
description: "A configurable GitHub Action to free up disk space on an Ubuntu GitHub Actions runner.(https://github.com/jlumbroso/free-disk-space)"
|
||||
|
||||
# See: https://docs.github.com/en/actions/creating-actions/metadata-syntax-for-github-actions#branding
|
||||
branding:
|
||||
icon: "trash-2"
|
||||
color: "green"
|
||||
|
||||
inputs:
|
||||
android:
|
||||
description: "Remove Android runtime"
|
||||
required: false
|
||||
default: "true"
|
||||
dotnet:
|
||||
description: "Remove .NET runtime"
|
||||
required: false
|
||||
default: "true"
|
||||
haskell:
|
||||
description: "Remove Haskell runtime"
|
||||
required: false
|
||||
default: "true"
|
||||
|
||||
# option inspired by:
|
||||
# https://github.com/apache/flink/blob/master/tools/azure-pipelines/free_disk_space.sh
|
||||
large-packages:
|
||||
description: "Remove large packages"
|
||||
required: false
|
||||
default: "true"
|
||||
|
||||
docker-images:
|
||||
description: "Remove Docker images"
|
||||
required: false
|
||||
default: "true"
|
||||
|
||||
# option inspired by:
|
||||
# https://github.com/actions/virtual-environments/issues/2875#issuecomment-1163392159
|
||||
tool-cache:
|
||||
description: "Remove image tool cache"
|
||||
required: false
|
||||
default: "false"
|
||||
|
||||
swap-storage:
|
||||
description: "Remove swap storage"
|
||||
required: false
|
||||
default: "true"
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- shell: bash
|
||||
run: |
|
||||
|
||||
# ======
|
||||
# MACROS
|
||||
# ======
|
||||
|
||||
# macro to print a line of equals
|
||||
# (silly but works)
|
||||
printSeparationLine() {
|
||||
str=${1:=}
|
||||
num=${2:-80}
|
||||
counter=1
|
||||
output=""
|
||||
while [ $counter -le $num ]
|
||||
do
|
||||
output="${output}${str}"
|
||||
counter=$((counter+1))
|
||||
done
|
||||
echo "${output}"
|
||||
}
|
||||
|
||||
# macro to compute available space
|
||||
# REF: https://unix.stackexchange.com/a/42049/60849
|
||||
# REF: https://stackoverflow.com/a/450821/408734
|
||||
getAvailableSpace() { echo $(df -a $1 | awk 'NR > 1 {avail+=$4} END {print avail}'); }
|
||||
|
||||
# macro to make Kb human readable (assume the input is Kb)
|
||||
# REF: https://unix.stackexchange.com/a/44087/60849
|
||||
formatByteCount() { echo $(numfmt --to=iec-i --suffix=B --padding=7 $1'000'); }
|
||||
|
||||
# macro to output saved space
|
||||
printSavedSpace() {
|
||||
saved=${1}
|
||||
title=${2:-}
|
||||
|
||||
echo ""
|
||||
printSeparationLine '*' 80
|
||||
if [ ! -z "${title}" ]; then
|
||||
echo "=> ${title}: Saved $(formatByteCount $saved)"
|
||||
else
|
||||
echo "=> Saved $(formatByteCount $saved)"
|
||||
fi
|
||||
printSeparationLine '*' 80
|
||||
echo ""
|
||||
}
|
||||
|
||||
# macro to print output of dh with caption
|
||||
printDH() {
|
||||
caption=${1:-}
|
||||
|
||||
printSeparationLine '=' 80
|
||||
echo "${caption}"
|
||||
echo ""
|
||||
echo "$ dh -h /"
|
||||
echo ""
|
||||
df -h /
|
||||
echo "$ dh -a /"
|
||||
echo ""
|
||||
df -a /
|
||||
echo "$ dh -a"
|
||||
echo ""
|
||||
df -a
|
||||
printSeparationLine '=' 80
|
||||
}
|
||||
|
||||
|
||||
|
||||
# ======
|
||||
# SCRIPT
|
||||
# ======
|
||||
|
||||
# Display initial disk space stats
|
||||
|
||||
AVAILABLE_INITIAL=$(getAvailableSpace)
|
||||
AVAILABLE_ROOT_INITIAL=$(getAvailableSpace '/')
|
||||
|
||||
printDH "BEFORE CLEAN-UP:"
|
||||
echo ""
|
||||
|
||||
|
||||
# Option: Remove Android library
|
||||
|
||||
if [[ ${{ inputs.android }} == 'true' ]]; then
|
||||
BEFORE=$(getAvailableSpace)
|
||||
|
||||
sudo rm -rf /usr/local/lib/android || true
|
||||
|
||||
AFTER=$(getAvailableSpace)
|
||||
SAVED=$((AFTER-BEFORE))
|
||||
printSavedSpace $SAVED "Android library"
|
||||
fi
|
||||
|
||||
# Option: Remove .NET runtime
|
||||
|
||||
if [[ ${{ inputs.dotnet }} == 'true' ]]; then
|
||||
BEFORE=$(getAvailableSpace)
|
||||
|
||||
# https://github.community/t/bigger-github-hosted-runners-disk-space/17267/11
|
||||
sudo rm -rf /usr/share/dotnet || true
|
||||
|
||||
AFTER=$(getAvailableSpace)
|
||||
SAVED=$((AFTER-BEFORE))
|
||||
printSavedSpace $SAVED ".NET runtime"
|
||||
fi
|
||||
|
||||
# Option: Remove Haskell runtime
|
||||
|
||||
if [[ ${{ inputs.haskell }} == 'true' ]]; then
|
||||
BEFORE=$(getAvailableSpace)
|
||||
|
||||
sudo rm -rf /opt/ghc || true
|
||||
sudo rm -rf /usr/local/.ghcup || true
|
||||
|
||||
AFTER=$(getAvailableSpace)
|
||||
SAVED=$((AFTER-BEFORE))
|
||||
printSavedSpace $SAVED "Haskell runtime"
|
||||
fi
|
||||
|
||||
# Option: Remove large packages
|
||||
# REF: https://github.com/apache/flink/blob/master/tools/azure-pipelines/free_disk_space.sh
|
||||
|
||||
if [[ ${{ inputs.large-packages }} == 'true' ]]; then
|
||||
BEFORE=$(getAvailableSpace)
|
||||
|
||||
sudo apt-get remove -y '^aspnetcore-.*' || echo "::warning::The command [sudo apt-get remove -y '^aspnetcore-.*'] failed to complete successfully. Proceeding..."
|
||||
sudo apt-get remove -y '^dotnet-.*' --fix-missing || echo "::warning::The command [sudo apt-get remove -y '^dotnet-.*' --fix-missing] failed to complete successfully. Proceeding..."
|
||||
sudo apt-get remove -y '^llvm-.*' --fix-missing || echo "::warning::The command [sudo apt-get remove -y '^llvm-.*' --fix-missing] failed to complete successfully. Proceeding..."
|
||||
sudo apt-get remove -y 'php.*' --fix-missing || echo "::warning::The command [sudo apt-get remove -y 'php.*' --fix-missing] failed to complete successfully. Proceeding..."
|
||||
sudo apt-get remove -y '^mongodb-.*' --fix-missing || echo "::warning::The command [sudo apt-get remove -y '^mongodb-.*' --fix-missing] failed to complete successfully. Proceeding..."
|
||||
sudo apt-get remove -y '^mysql-.*' --fix-missing || echo "::warning::The command [sudo apt-get remove -y '^mysql-.*' --fix-missing] failed to complete successfully. Proceeding..."
|
||||
sudo apt-get remove -y azure-cli google-chrome-stable firefox powershell mono-devel libgl1-mesa-dri --fix-missing || echo "::warning::The command [sudo apt-get remove -y azure-cli google-chrome-stable firefox powershell mono-devel libgl1-mesa-dri --fix-missing] failed to complete successfully. Proceeding..."
|
||||
sudo apt-get remove -y google-cloud-sdk --fix-missing || echo "::debug::The command [sudo apt-get remove -y google-cloud-sdk --fix-missing] failed to complete successfully. Proceeding..."
|
||||
sudo apt-get remove -y google-cloud-cli --fix-missing || echo "::debug::The command [sudo apt-get remove -y google-cloud-cli --fix-missing] failed to complete successfully. Proceeding..."
|
||||
sudo apt-get autoremove -y || echo "::warning::The command [sudo apt-get autoremove -y] failed to complete successfully. Proceeding..."
|
||||
sudo apt-get clean || echo "::warning::The command [sudo apt-get clean] failed to complete successfully. Proceeding..."
|
||||
|
||||
AFTER=$(getAvailableSpace)
|
||||
SAVED=$((AFTER-BEFORE))
|
||||
printSavedSpace $SAVED "Large misc. packages"
|
||||
fi
|
||||
|
||||
# Option: Remove Docker images
|
||||
|
||||
if [[ ${{ inputs.docker-images }} == 'true' ]]; then
|
||||
BEFORE=$(getAvailableSpace)
|
||||
|
||||
sudo docker image prune --all --force || true
|
||||
|
||||
AFTER=$(getAvailableSpace)
|
||||
SAVED=$((AFTER-BEFORE))
|
||||
printSavedSpace $SAVED "Docker images"
|
||||
fi
|
||||
|
||||
# Option: Remove tool cache
|
||||
# REF: https://github.com/actions/virtual-environments/issues/2875#issuecomment-1163392159
|
||||
|
||||
if [[ ${{ inputs.tool-cache }} == 'true' ]]; then
|
||||
BEFORE=$(getAvailableSpace)
|
||||
|
||||
sudo rm -rf "$AGENT_TOOLSDIRECTORY" || true
|
||||
|
||||
AFTER=$(getAvailableSpace)
|
||||
SAVED=$((AFTER-BEFORE))
|
||||
printSavedSpace $SAVED "Tool cache"
|
||||
fi
|
||||
|
||||
# Option: Remove Swap storage
|
||||
|
||||
if [[ ${{ inputs.swap-storage }} == 'true' ]]; then
|
||||
BEFORE=$(getAvailableSpace)
|
||||
|
||||
sudo swapoff -a || true
|
||||
sudo rm -f /mnt/swapfile || true
|
||||
free -h
|
||||
|
||||
AFTER=$(getAvailableSpace)
|
||||
SAVED=$((AFTER-BEFORE))
|
||||
printSavedSpace $SAVED "Swap storage"
|
||||
fi
|
||||
|
||||
|
||||
|
||||
# Output saved space statistic
|
||||
|
||||
AVAILABLE_END=$(getAvailableSpace)
|
||||
AVAILABLE_ROOT_END=$(getAvailableSpace '/')
|
||||
|
||||
echo ""
|
||||
printDH "AFTER CLEAN-UP:"
|
||||
|
||||
echo ""
|
||||
echo ""
|
||||
|
||||
echo "/dev/root:"
|
||||
printSavedSpace $((AVAILABLE_ROOT_END - AVAILABLE_ROOT_INITIAL))
|
||||
echo "overall:"
|
||||
printSavedSpace $((AVAILABLE_END - AVAILABLE_INITIAL))
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: "github-actions"
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: "weekly"
|
||||
|
|
@ -1,28 +0,0 @@
|
|||
// 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.
|
||||
{
|
||||
"problemMatcher": [
|
||||
{
|
||||
"owner": "gcc",
|
||||
"pattern": [
|
||||
{
|
||||
"regexp": "^(.*):(\\d+):(\\d+):\\s+(warning|fatal error|error):\\s+(.*)$",
|
||||
"file": 1,
|
||||
"line": 2,
|
||||
"column": 3,
|
||||
"severity": 4,
|
||||
"message": 5
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -1,354 +0,0 @@
|
|||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
# Licensed to the Apache Software Foundation (ASF) under one
|
||||
# or more contributor license agreements. See the NOTICE file
|
||||
# distributed with this work for additional information
|
||||
# regarding copyright ownership. The ASF licenses this file
|
||||
# to you 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.
|
||||
#
|
||||
|
||||
# add arch labels
|
||||
|
||||
"Arch: arm":
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: 'arch/arm/**'
|
||||
|
||||
"Arch: arm64":
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: 'arch/arm64/**'
|
||||
|
||||
"Arch: avr":
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: 'arch/avr/**'
|
||||
|
||||
"Arch: ceva":
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: 'arch/ceva/**'
|
||||
|
||||
"Arch: hc":
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: 'arch/hc/**'
|
||||
|
||||
"Arch: mips":
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: 'arch/mips/**'
|
||||
|
||||
"Arch: openrisc":
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: 'arch/or1k/**'
|
||||
|
||||
"Arch: renesas":
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: 'arch/renesas/**'
|
||||
|
||||
"Arch: risc-v":
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: 'arch/risc-v/**'
|
||||
|
||||
"Arch: simulator":
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: 'arch/sim/**'
|
||||
|
||||
"Arch: sparc":
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: 'arch/sparc/**'
|
||||
|
||||
"Arch: tricore":
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: 'arch/tricore/**'
|
||||
|
||||
"Arch: x86":
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: 'arch/x86/**'
|
||||
|
||||
"Arch: x86_64":
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: 'arch/x86_64/**'
|
||||
|
||||
"Arch: xtensa":
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: 'arch/xtensa/**'
|
||||
|
||||
"Arch: z16":
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: 'arch/z16/**'
|
||||
|
||||
"Arch: z80":
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: 'arch/z80/**'
|
||||
|
||||
# add board labels
|
||||
|
||||
"Board: arm":
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: 'boards/arm/**'
|
||||
|
||||
"Board: arm64":
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: 'boards/arm64/**'
|
||||
|
||||
"Board: avr":
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: 'boards/avr/**'
|
||||
|
||||
"Board: hc":
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: 'boards/hc/**'
|
||||
|
||||
"Board: mips":
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: 'boards/mips/**'
|
||||
|
||||
"Board: openrisc":
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: 'boards/or1k/**'
|
||||
|
||||
"Board: renesas":
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: 'boards/renesas/**'
|
||||
|
||||
"Board: risc-v":
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: 'boards/risc-v/**'
|
||||
|
||||
"Board: simulator":
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: 'boards/sim/**'
|
||||
|
||||
"Board: sparc":
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: 'boards/sparc/**'
|
||||
|
||||
"Board: tricore":
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: 'boards/tricore/**'
|
||||
|
||||
"Board: x86":
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: 'boards/x86/**'
|
||||
|
||||
"Board: x86_64":
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: 'boards/x86_64/**'
|
||||
|
||||
"Board: xtensa":
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: 'boards/xtensa/**'
|
||||
|
||||
"Board: z16":
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: 'boards/z16/**'
|
||||
|
||||
"Board: z80":
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: 'boards/z80/**'
|
||||
|
||||
# add area labels
|
||||
|
||||
"Area: Audio":
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: 'audio/**'
|
||||
- any-glob-to-any-file: 'drivers/audio/**'
|
||||
- any-glob-to-any-file: 'include/nuttx/audio/**'
|
||||
|
||||
"Area: Binfmt":
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: 'binfmt/**'
|
||||
- any-glob-to-any-file: 'include/nuttx/binfmt/**'
|
||||
|
||||
"Area: Bluetooth":
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: 'wireless/bluetooth/**'
|
||||
- any-glob-to-any-file: 'drivers/wireless/bluetooth/**'
|
||||
- any-glob-to-any-file: 'include/nuttx/wireless/bluetooth/**'
|
||||
|
||||
"Area: Build system":
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: 'Makefile'
|
||||
- any-glob-to-any-file: 'CMakeLists.txt'
|
||||
- any-glob-to-any-file: 'cmake/**'
|
||||
- any-glob-to-any-file: 'tools/*.mk'
|
||||
|
||||
"Area: CI":
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: '.github/**'
|
||||
- any-glob-to-any-file: 'tools/ci/**'
|
||||
|
||||
"Area: Crypto":
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: 'crypto/**'
|
||||
- any-glob-to-any-file: 'drivers/crypto/**'
|
||||
- any-glob-to-any-file: 'include/crypto/**'
|
||||
- any-glob-to-any-file: 'include/nuttx/crypto/**'
|
||||
|
||||
# someday this should be broken down into more precise categories
|
||||
|
||||
"Area: Drivers":
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: 'drivers/1wire/**'
|
||||
- any-glob-to-any-file: 'drivers/bch/**'
|
||||
- any-glob-to-any-file: 'drivers/can/**'
|
||||
- any-glob-to-any-file: 'drivers/devicetree/**'
|
||||
- any-glob-to-any-file: 'drivers/dma/**'
|
||||
- any-glob-to-any-file: 'drivers/dummy/**'
|
||||
- any-glob-to-any-file: 'drivers/eeprom/**'
|
||||
- any-glob-to-any-file: 'drivers/efuse/**'
|
||||
- any-glob-to-any-file: 'drivers/i2c/**'
|
||||
- any-glob-to-any-file: 'drivers/i2s/**'
|
||||
- any-glob-to-any-file: 'drivers/i3c/**'
|
||||
- any-glob-to-any-file: 'drivers/input/**'
|
||||
- any-glob-to-any-file: 'drivers/ioexpander/**'
|
||||
- any-glob-to-any-file: 'drivers/ipcc/**'
|
||||
- any-glob-to-any-file: 'drivers/lcd/**'
|
||||
- any-glob-to-any-file: 'drivers/leds/**'
|
||||
- any-glob-to-any-file: 'drivers/loops/**'
|
||||
- any-glob-to-any-file: 'drivers/math/**'
|
||||
- any-glob-to-any-file: 'drivers/misc/**'
|
||||
- any-glob-to-any-file: 'drivers/mmcsd/**'
|
||||
- any-glob-to-any-file: 'drivers/modem/**'
|
||||
- any-glob-to-any-file: 'drivers/motor/**'
|
||||
- any-glob-to-any-file: 'drivers/mtd/**'
|
||||
- any-glob-to-any-file: 'drivers/note/**'
|
||||
- any-glob-to-any-file: 'drivers/pinctrl/**'
|
||||
- any-glob-to-any-file: 'drivers/pipes/**'
|
||||
- any-glob-to-any-file: 'drivers/power/**'
|
||||
- any-glob-to-any-file: 'drivers/rc/**'
|
||||
- any-glob-to-any-file: 'drivers/regmap/**'
|
||||
- any-glob-to-any-file: 'drivers/reset/**'
|
||||
- any-glob-to-any-file: 'drivers/rf/**'
|
||||
- any-glob-to-any-file: 'drivers/rmt/**'
|
||||
- any-glob-to-any-file: 'drivers/rpmsg/**'
|
||||
- any-glob-to-any-file: 'drivers/rptun/**'
|
||||
- any-glob-to-any-file: 'drivers/segger/**'
|
||||
- any-glob-to-any-file: 'drivers/serial/**'
|
||||
- any-glob-to-any-file: 'drivers/spi/**'
|
||||
- any-glob-to-any-file: 'drivers/syslog/**'
|
||||
- any-glob-to-any-file: 'drivers/thermal/**'
|
||||
- any-glob-to-any-file: 'drivers/timers/**'
|
||||
- any-glob-to-any-file: 'drivers/usrsock/**'
|
||||
- any-glob-to-any-file: 'drivers/vhost/**'
|
||||
- any-glob-to-any-file: 'drivers/virtio/**'
|
||||
- any-glob-to-any-file: 'drivers/wireless/**'
|
||||
- any-glob-to-any-file: 'include/nuttx/1wire/**'
|
||||
- any-glob-to-any-file: 'include/nuttx/aie/**'
|
||||
- any-glob-to-any-file: 'include/nuttx/analog/**'
|
||||
- any-glob-to-any-file: 'include/nuttx/clk/**'
|
||||
- any-glob-to-any-file: 'include/nuttx/contactless/**'
|
||||
- any-glob-to-any-file: 'include/nuttx/coresight/**'
|
||||
- any-glob-to-any-file: 'include/nuttx/fdt.h'
|
||||
- any-glob-to-any-file: 'include/nuttx/dma/**'
|
||||
- any-glob-to-any-file: 'include/nuttx/drivers/**'
|
||||
- any-glob-to-any-file: 'include/nuttx/eeprom/**'
|
||||
- any-glob-to-any-file: 'include/nuttx/efuse/**'
|
||||
- any-glob-to-any-file: 'include/nuttx/i2c/**'
|
||||
- any-glob-to-any-file: 'include/nuttx/i3c/**'
|
||||
- any-glob-to-any-file: 'include/nuttx/input/**'
|
||||
- any-glob-to-any-file: 'include/nuttx/ioexpander/**'
|
||||
- any-glob-to-any-file: 'include/nuttx/ipcc.h'
|
||||
- any-glob-to-any-file: 'include/nuttx/lcd/**'
|
||||
- any-glob-to-any-file: 'include/nuttx/leds/**'
|
||||
- any-glob-to-any-file: 'include/nuttx/math/**'
|
||||
- any-glob-to-any-file: 'include/nuttx/modem/**'
|
||||
- any-glob-to-any-file: 'include/nuttx/motor/**'
|
||||
- any-glob-to-any-file: 'include/nuttx/mtd/**'
|
||||
- any-glob-to-any-file: 'include/nuttx/note/**'
|
||||
- any-glob-to-any-file: 'include/nuttx/pinctrl/**'
|
||||
- any-glob-to-any-file: 'include/nuttx/power/**'
|
||||
- any-glob-to-any-file: 'include/nuttx/rc/**'
|
||||
- any-glob-to-any-file: 'include/nuttx/regmap/**'
|
||||
- any-glob-to-any-file: 'include/nuttx/reset/**'
|
||||
- any-glob-to-any-file: 'include/nuttx/rf/**'
|
||||
- any-glob-to-any-file: 'include/nuttx/rmt/**'
|
||||
- any-glob-to-any-file: 'include/nuttx/rpmsg/**'
|
||||
- any-glob-to-any-file: 'include/nuttx/rptun/**'
|
||||
- any-glob-to-any-file: 'include/nuttx/segger/**'
|
||||
- any-glob-to-any-file: 'include/nuttx/serial/**'
|
||||
- any-glob-to-any-file: 'include/nuttx/spi/**'
|
||||
- any-glob-to-any-file: 'include/nuttx/syslog/**'
|
||||
- any-glob-to-any-file: 'include/nuttx/timers/**'
|
||||
- any-glob-to-any-file: 'include/nuttx/usrsock/**'
|
||||
- any-glob-to-any-file: 'include/nuttx/vhost/**'
|
||||
- any-glob-to-any-file: 'include/nuttx/virtio/**'
|
||||
- any-glob-to-any-file: 'include/nuttx/wireless/**'
|
||||
|
||||
"Area: Documentation":
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: 'Documentation/**'
|
||||
- any-glob-to-any-file: 'README.md'
|
||||
- any-glob-to-any-file: 'ReleaseNotes'
|
||||
- any-glob-to-any-file: 'CONTRIBUTING.md'
|
||||
- any-glob-to-any-file: 'INVIOLABLES.md'
|
||||
|
||||
"Area: File System":
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: 'fs/**'
|
||||
- any-glob-to-any-file: 'include/nuttx/fs/**'
|
||||
|
||||
"Area: Github Actions":
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: '.github/actions/**'
|
||||
|
||||
"Area: Graphics":
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: 'graphics/**'
|
||||
- any-glob-to-any-file: 'drivers/lcd/**'
|
||||
- any-glob-to-any-file: 'include/nuttx/lcd/**'
|
||||
|
||||
"Area: Memory Management":
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: 'mm/**'
|
||||
- any-glob-to-any-file: 'include/nuttx/mm/**'
|
||||
|
||||
"Area: Networking":
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: 'net/**'
|
||||
- any-glob-to-any-file: 'drivers/net/**'
|
||||
- any-glob-to-any-file: 'include/nuttx/net/**'
|
||||
|
||||
"Area: OS Components":
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: 'sched/**'
|
||||
- any-glob-to-any-file: 'syscall/**'
|
||||
- any-glob-to-any-file: 'libs/**'
|
||||
- any-glob-to-any-file: 'include/*.h'
|
||||
- any-glob-to-any-file: 'include/nuttx/*.h'
|
||||
|
||||
"Area: PCI":
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: 'drivers/pci/**'
|
||||
- any-glob-to-any-file: 'include/nuttx/pci/**'
|
||||
|
||||
"Area: Sensors":
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: 'drivers/sensors/**'
|
||||
- any-glob-to-any-file: 'include/nuttx/sensors/**'
|
||||
- any-glob-to-any-file: 'include/nuttx/uorb.h'
|
||||
|
||||
"Area: Tooling":
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: 'tools/**'
|
||||
|
||||
"Area: USB":
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: 'drivers/usbdev/**'
|
||||
- any-glob-to-any-file: 'drivers/usbhost/**'
|
||||
- any-glob-to-any-file: 'drivers/usbmisc/**'
|
||||
- any-glob-to-any-file: 'drivers/usbmonitor/**'
|
||||
- any-glob-to-any-file: 'include/nuttx/usb/**'
|
||||
|
||||
"Area: Video":
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: 'video/**'
|
||||
- any-glob-to-any-file: 'drivers/video/**'
|
||||
- any-glob-to-any-file: 'include/nuttx/video/**'
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
[flake8]
|
||||
ignore = W503,W605,E203,E704
|
||||
max-complexity = 27
|
||||
max-line-length = 125
|
||||
multi_line_output=3
|
||||
max-complexity=27
|
||||
max-line-length =125
|
||||
multi line_output=3
|
||||
show-source = True
|
||||
statistics = True
|
||||
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@
|
|||
"column": 3,
|
||||
"severity": 4,
|
||||
"message": 5
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
|
|
|
|||
|
|
@ -1,254 +0,0 @@
|
|||
# Identify the Arch for the PR and select the applicable builds
|
||||
name: Arch
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
os:
|
||||
description: "Operating System hosting the build: Linux, macOS or msys2"
|
||||
required: true
|
||||
type: string
|
||||
boards:
|
||||
description: "List of All Builds: [arm-01, risc-v-01, xtensa-01, ...]"
|
||||
required: true
|
||||
type: string
|
||||
outputs:
|
||||
skip_all_builds:
|
||||
description: "Set to 1 if all builds should be skipped"
|
||||
value: ${{ jobs.Select-Builds.outputs.skip_all_builds }}
|
||||
selected_builds:
|
||||
description: "Selected Builds for the PR: [arm-01, risc-v-01, xtensa-01, ...]"
|
||||
value: ${{ jobs.Select-Builds.outputs.selected_builds }}
|
||||
|
||||
jobs:
|
||||
Select-Builds:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
outputs:
|
||||
skip_all_builds: ${{ steps.select-builds.outputs.skip_all_builds }}
|
||||
selected_builds: ${{ steps.select-builds.outputs.selected_builds }}
|
||||
|
||||
steps:
|
||||
|
||||
# Get the Arch for the PR: arm, arm64, risc-v, xtensa, ...
|
||||
- name: Get arch
|
||||
id: get-arch
|
||||
run: |
|
||||
|
||||
# If PR is Not Created or Modified: Build all targets
|
||||
pr=${{github.event.pull_request.number}}
|
||||
if [[ "$pr" == "" ]]; then
|
||||
echo "Not a Created or Modified PR, will build all targets"
|
||||
exit
|
||||
fi
|
||||
|
||||
# Ignore the Label "Area: Documentation", because it won't affect the Build Targets
|
||||
query='.labels | map(select(.name != "Area: Documentation")) | '
|
||||
select_name='.[].name'
|
||||
select_length='length'
|
||||
|
||||
# Get the Labels for the PR: "Arch: risc-v \n Board: risc-v \n Size: XS"
|
||||
# If GitHub CLI Fails: Build all targets
|
||||
labels=$(gh pr view $pr --repo $GITHUB_REPOSITORY --json labels --jq "$query$select_name" || echo "")
|
||||
numlabels=$(gh pr view $pr --repo $GITHUB_REPOSITORY --json labels --jq "$query$select_length" || echo "")
|
||||
echo "labels=$labels"
|
||||
echo "numlabels=$numlabels" | tee -a $GITHUB_OUTPUT
|
||||
|
||||
# Identify the Size, Arch and Board Labels
|
||||
if [[ "$labels" == *"Size: "* ]]; then
|
||||
echo 'labels_contain_size=1' | tee -a $GITHUB_OUTPUT
|
||||
fi
|
||||
if [[ "$labels" == *"Arch: "* ]]; then
|
||||
echo 'labels_contain_arch=1' | tee -a $GITHUB_OUTPUT
|
||||
fi
|
||||
if [[ "$labels" == *"Board: "* ]]; then
|
||||
echo 'labels_contain_board=1' | tee -a $GITHUB_OUTPUT
|
||||
fi
|
||||
|
||||
# Get the Arch Label
|
||||
if [[ "$labels" == *"Arch: arm64"* ]]; then
|
||||
echo 'arch_contains_arm64=1' | tee -a $GITHUB_OUTPUT
|
||||
elif [[ "$labels" == *"Arch: arm"* ]]; then
|
||||
echo 'arch_contains_arm=1' | tee -a $GITHUB_OUTPUT
|
||||
elif [[ "$labels" == *"Arch: risc-v"* ]]; then
|
||||
echo 'arch_contains_riscv=1' | tee -a $GITHUB_OUTPUT
|
||||
elif [[ "$labels" == *"Arch: simulator"* ]]; then
|
||||
echo 'arch_contains_sim=1' | tee -a $GITHUB_OUTPUT
|
||||
elif [[ "$labels" == *"Arch: x86_64"* ]]; then
|
||||
echo 'arch_contains_x86_64=1' | tee -a $GITHUB_OUTPUT
|
||||
elif [[ "$labels" == *"Arch: xtensa"* ]]; then
|
||||
echo 'arch_contains_xtensa=1' | tee -a $GITHUB_OUTPUT
|
||||
fi
|
||||
|
||||
# Get the Board Label
|
||||
if [[ "$labels" == *"Board: arm64"* ]]; then
|
||||
echo 'board_contains_arm64=1' | tee -a $GITHUB_OUTPUT
|
||||
elif [[ "$labels" == *"Board: arm"* ]]; then
|
||||
echo 'board_contains_arm=1' | tee -a $GITHUB_OUTPUT
|
||||
elif [[ "$labels" == *"Board: risc-v"* ]]; then
|
||||
echo 'board_contains_riscv=1' | tee -a $GITHUB_OUTPUT
|
||||
elif [[ "$labels" == *"Board: simulator"* ]]; then
|
||||
echo 'board_contains_sim=1' | tee -a $GITHUB_OUTPUT
|
||||
elif [[ "$labels" == *"Board: x86_64"* ]]; then
|
||||
echo 'board_contains_x86_64=1' | tee -a $GITHUB_OUTPUT
|
||||
elif [[ "$labels" == *"Board: xtensa"* ]]; then
|
||||
echo 'board_contains_xtensa=1' | tee -a $GITHUB_OUTPUT
|
||||
fi
|
||||
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
# Select the Builds for the PR: arm-01, risc-v-01, xtensa-01, ...
|
||||
- name: Select builds
|
||||
id: select-builds
|
||||
run: |
|
||||
|
||||
# Skip all macOS Builds
|
||||
if [[ "${{ inputs.os }}" == "macOS" ]]; then
|
||||
echo "Skipping all macOS Builds"
|
||||
echo "skip_all_builds=1" | tee -a $GITHUB_OUTPUT
|
||||
exit
|
||||
fi
|
||||
|
||||
# Fetch the outputs from the previous step
|
||||
numlabels=${{ steps.get-arch.outputs.numlabels }}
|
||||
labels_contain_size=${{ steps.get-arch.outputs.labels_contain_size }}
|
||||
labels_contain_arch=${{ steps.get-arch.outputs.labels_contain_arch }}
|
||||
labels_contain_board=${{ steps.get-arch.outputs.labels_contain_board }}
|
||||
arch_contains_arm=${{ steps.get-arch.outputs.arch_contains_arm }}
|
||||
arch_contains_arm64=${{ steps.get-arch.outputs.arch_contains_arm64 }}
|
||||
arch_contains_riscv=${{ steps.get-arch.outputs.arch_contains_riscv }}
|
||||
arch_contains_sim=${{ steps.get-arch.outputs.arch_contains_sim }}
|
||||
arch_contains_x86_64=${{ steps.get-arch.outputs.arch_contains_x86_64 }}
|
||||
arch_contains_xtensa=${{ steps.get-arch.outputs.arch_contains_xtensa }}
|
||||
board_contains_arm=${{ steps.get-arch.outputs.board_contains_arm }}
|
||||
board_contains_arm64=${{ steps.get-arch.outputs.board_contains_arm64 }}
|
||||
board_contains_riscv=${{ steps.get-arch.outputs.board_contains_riscv }}
|
||||
board_contains_sim=${{ steps.get-arch.outputs.board_contains_sim }}
|
||||
board_contains_x86_64=${{ steps.get-arch.outputs.board_contains_x86_64 }}
|
||||
board_contains_xtensa=${{ steps.get-arch.outputs.board_contains_xtensa }}
|
||||
|
||||
# inputs.boards is a JSON Array: ["arm-01", "risc-v-01", "xtensa-01", ...]
|
||||
# We compact and remove the newlines
|
||||
boards=$( echo '${{ inputs.boards }}' | jq --compact-output ".")
|
||||
numboards=$( echo "$boards" | jq "length" )
|
||||
|
||||
# We consider only Simple PRs with:
|
||||
# Arch + Size Labels Only
|
||||
# Board + Size Labels Only
|
||||
# Arch + Board + Size Labels Only
|
||||
if [[ "$labels_contain_size" != "1" ]]; then
|
||||
echo "Size Label Missing, will build all targets"
|
||||
quit=1
|
||||
elif [[ "$numlabels" == "2" && "$labels_contain_arch" == "1" ]]; then
|
||||
echo "Arch + Size Labels Only"
|
||||
elif [[ "$numlabels" == "2" && "$labels_contain_board" == "1" ]]; then
|
||||
echo "Board + Size Labels Only"
|
||||
elif [[ "$numlabels" == "3" && "$labels_contain_arch" == "1" && "$labels_contain_board" == "1" ]]; then
|
||||
# Arch and Board must be the same
|
||||
if [[
|
||||
"$arch_contains_arm" != "$board_contains_arm" ||
|
||||
"$arch_contains_arm64" != "$board_contains_arm64" ||
|
||||
"$arch_contains_riscv" != "$board_contains_riscv" ||
|
||||
"$arch_contains_sim" != "$board_contains_sim" ||
|
||||
"$arch_contains_x86_64" != "$board_contains_x86_64" ||
|
||||
"$arch_contains_xtensa" != "$board_contains_xtensa"
|
||||
]]; then
|
||||
echo "Arch and Board are not the same, will build all targets"
|
||||
quit=1
|
||||
else
|
||||
echo "Arch + Board + Size Labels Only"
|
||||
fi
|
||||
else
|
||||
echo "Not a Simple PR, will build all targets"
|
||||
quit=1
|
||||
fi
|
||||
|
||||
# If Not a Simple PR: Build all targets
|
||||
if [[ "$quit" == "1" ]]; then
|
||||
# If PR was Created or Modified: Exclude some boards
|
||||
pr=${{github.event.pull_request.number}}
|
||||
if [[ "$pr" != "" ]]; then
|
||||
echo "Excluding arm-0[1249], arm-1[124-9], risc-v-04..06, sim-03, xtensa-02"
|
||||
boards=$(
|
||||
echo '${{ inputs.boards }}' |
|
||||
jq --compact-output \
|
||||
'map(
|
||||
select(
|
||||
test("arm-0[1249]") == false and test("arm-1[124-9]") == false and
|
||||
test("risc-v-0[4-9]") == false and
|
||||
test("sim-0[3-9]") == false and
|
||||
test("xtensa-0[2-9]") == false
|
||||
)
|
||||
)'
|
||||
)
|
||||
fi
|
||||
echo "selected_builds=$boards" | tee -a $GITHUB_OUTPUT
|
||||
exit
|
||||
fi
|
||||
|
||||
# For every board
|
||||
for (( i=0; i<numboards; i++ ))
|
||||
do
|
||||
# Fetch the board
|
||||
board=$( echo "$boards" | jq ".[$i]" )
|
||||
skip_build=0
|
||||
|
||||
# For "Arch / Board: arm": Build arm-01, arm-02, ...
|
||||
if [[ "$arch_contains_arm" == "1" || "$board_contains_arm" == "1" ]]; then
|
||||
if [[ "$board" != *"arm-"* ]]; then
|
||||
skip_build=1
|
||||
fi
|
||||
|
||||
# For "Arch / Board: arm64": Build arm64-01
|
||||
elif [[ "$arch_contains_arm64" == "1" || "$board_contains_arm64" == "1" ]]; then
|
||||
if [[ "$board" != *"arm64-"* ]]; then
|
||||
skip_build=1
|
||||
fi
|
||||
|
||||
# For "Arch / Board: risc-v": Build risc-v-01, risc-v-02, ...
|
||||
elif [[ "$arch_contains_riscv" == "1" || "$board_contains_riscv" == "1" ]]; then
|
||||
if [[ "$board" != *"risc-v-"* ]]; then
|
||||
skip_build=1
|
||||
fi
|
||||
|
||||
# For "Arch / Board: simulator": Build sim-01, sim-02
|
||||
elif [[ "$arch_contains_sim" == "1" || "$board_contains_sim" == "1" ]]; then
|
||||
if [[ "$board" != *"sim-"* ]]; then
|
||||
skip_build=1
|
||||
fi
|
||||
|
||||
# For "Arch / Board: x86_64": Build x86_64-01
|
||||
elif [[ "$arch_contains_x86_64" == "1" || "$board_contains_x86_64" == "1" ]]; then
|
||||
if [[ "$board" != *"x86_64-"* ]]; then
|
||||
skip_build=1
|
||||
fi
|
||||
|
||||
# For "Arch / Board: xtensa": Build xtensa-01, xtensa-02
|
||||
elif [[ "$arch_contains_xtensa" == "1" || "$board_contains_xtensa" == "1" ]]; then
|
||||
if [[ "$board" != *"xtensa-"* ]]; then
|
||||
skip_build=1
|
||||
fi
|
||||
|
||||
# For Other Arch: Allow the build
|
||||
else
|
||||
echo Build by default: $board
|
||||
fi
|
||||
|
||||
# Add the board to the selected builds
|
||||
if [[ "$skip_build" == "0" ]]; then
|
||||
echo Add $board to selected_builds
|
||||
if [[ "$selected_builds" == "" ]]; then
|
||||
selected_builds=$board
|
||||
else
|
||||
selected_builds=$selected_builds,$board
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
# Return the selected builds as JSON Array
|
||||
# If Selected Builds is empty: Skip all builds
|
||||
echo "selected_builds=[$selected_builds]" | tee -a $GITHUB_OUTPUT
|
||||
if [[ "$selected_builds" == "" ]]; then
|
||||
echo "skip_all_builds=1" | tee -a $GITHUB_OUTPUT
|
||||
fi
|
||||
|
|
@ -1,387 +0,0 @@
|
|||
# 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.
|
||||
#
|
||||
name: Build
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
paths-ignore:
|
||||
- 'Documentation/**'
|
||||
- 'tools/ci/docker/linux/**'
|
||||
push:
|
||||
paths-ignore:
|
||||
- 'Documentation/**'
|
||||
branches:
|
||||
- 'releases/*'
|
||||
tags:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
concurrency:
|
||||
group: build-${{ github.event.pull_request.number || github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
|
||||
# Fetch the source from nuttx and nuttx-apps repos
|
||||
Fetch-Source:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Determine Target Branches
|
||||
id: gittargets
|
||||
shell: bash
|
||||
run: |
|
||||
OS_REF=""
|
||||
APPS_REF=""
|
||||
|
||||
REF=$GITHUB_REF
|
||||
|
||||
# If a base ref is set this is a PR and we will want to use
|
||||
# the base ref instead of the ref that triggered the event
|
||||
if [ ${GITHUB_BASE_REF} ]; then
|
||||
REF=refs/heads/$GITHUB_BASE_REF
|
||||
fi
|
||||
|
||||
echo "Working with ref: $REF"
|
||||
|
||||
# We modify for all tags and release branches
|
||||
if [[ $REF =~ refs/heads/releases/*|refs/tags/* ]]; then
|
||||
if [[ $REF =~ refs/heads/* ]]
|
||||
then
|
||||
REF_NAME=${REF##refs/heads/}
|
||||
echo "Working with a branch: $REF_NAME"
|
||||
else
|
||||
REF_NAME=${REF##refs/tags/}
|
||||
echo "Working with a tag: $REF_NAME"
|
||||
fi
|
||||
|
||||
# Determine the repo and leave that unset to use the normal checkout behavior
|
||||
# of using the merge commit instead of HEAD
|
||||
case $GITHUB_REPOSITORY in
|
||||
"apache/nuttx")
|
||||
# OS
|
||||
echo "Triggered by change in OS"
|
||||
APPS_REF=$REF_NAME
|
||||
;;
|
||||
|
||||
"apache/nuttx-apps" )
|
||||
# APPS
|
||||
OS_REF=$REF_NAME
|
||||
echo "Triggered by change in APPS"
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Trigger by change on $GITHUB_REPOSITORY. This is unexpected."
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
echo "os_ref=$OS_REF" >> $GITHUB_OUTPUT
|
||||
echo "apps_ref=$APPS_REF" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Checkout nuttx repo
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: apache/nuttx
|
||||
ref: ${{ steps.gittargets.outputs.os_ref }}
|
||||
path: sources/nuttx
|
||||
fetch-depth: 1
|
||||
- name: Checkout nuttx repo tags
|
||||
run: git -C sources/nuttx fetch --tags
|
||||
|
||||
- name: Checkout apps repo
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: apache/nuttx-apps
|
||||
ref: ${{ steps.gittargets.outputs.apps_ref }}
|
||||
path: sources/apps
|
||||
fetch-depth: 1
|
||||
|
||||
- name: Tar sources
|
||||
run: tar zcf sources.tar.gz sources
|
||||
|
||||
- name: Archive Source Bundle
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: source-bundle
|
||||
path: sources.tar.gz
|
||||
|
||||
# Select the Linux Builds based on PR Arch Label
|
||||
Linux-Arch:
|
||||
uses: apache/nuttx/.github/workflows/arch.yml@master
|
||||
needs: Fetch-Source
|
||||
with:
|
||||
os: Linux
|
||||
boards: |
|
||||
[
|
||||
"arm-01", "risc-v-01", "sim-01", "xtensa-01", "arm64-01", "x86_64-01", "other",
|
||||
"arm-02", "risc-v-02", "sim-02", "xtensa-02",
|
||||
"arm-03", "risc-v-03", "sim-03",
|
||||
"arm-04", "risc-v-04",
|
||||
"arm-05", "risc-v-05",
|
||||
"arm-06", "risc-v-06",
|
||||
"arm-07", "arm-08", "arm-09", "arm-10", "arm-11", "arm-12", "arm-13", "arm-14"
|
||||
]
|
||||
|
||||
# Run the selected Linux Builds
|
||||
Linux:
|
||||
needs: Linux-Arch
|
||||
if: ${{ needs.Linux-Arch.outputs.skip_all_builds != '1' }}
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
DOCKER_BUILDKIT: 1
|
||||
|
||||
strategy:
|
||||
max-parallel: 12
|
||||
matrix:
|
||||
boards: ${{ fromJSON(needs.Linux-Arch.outputs.selected_builds) }}
|
||||
|
||||
steps:
|
||||
|
||||
- name: Download Source Artifact
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: source-bundle
|
||||
path: .
|
||||
|
||||
- name: Extract sources
|
||||
run: tar zxf sources.tar.gz
|
||||
|
||||
- name: Docker Login
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Docker Pull
|
||||
run: docker pull ghcr.io/apache/nuttx/apache-nuttx-ci-linux
|
||||
|
||||
- name: Export NuttX Repo SHA
|
||||
run: echo "nuttx_sha=`git -C sources/nuttx rev-parse HEAD`" >> $GITHUB_ENV
|
||||
|
||||
- name: Run builds
|
||||
uses: ./sources/nuttx/.github/actions/ci-container
|
||||
env:
|
||||
BLOBDIR: /tools/blobs
|
||||
with:
|
||||
run: |
|
||||
echo "::add-matcher::sources/nuttx/.github/gcc.json"
|
||||
export ARTIFACTDIR=`pwd`/buildartifacts
|
||||
git config --global --add safe.directory /github/workspace/sources/nuttx
|
||||
git config --global --add safe.directory /github/workspace/sources/apps
|
||||
cd sources/nuttx/tools/ci
|
||||
if [ "X${{matrix.boards}}" = "Xcodechecker" ]; then
|
||||
./cibuild.sh -c -A -N -R --codechecker testlist/${{matrix.boards}}.dat
|
||||
else
|
||||
./cibuild.sh -c -A -N -R -S testlist/${{matrix.boards}}.dat
|
||||
fi
|
||||
|
||||
- uses: actions/upload-artifact@v4
|
||||
if: ${{ always() }}
|
||||
with:
|
||||
name: linux-${{matrix.boards}}-builds
|
||||
path: buildartifacts/
|
||||
continue-on-error: true
|
||||
|
||||
# Select the macOS Builds based on PR Arch Label
|
||||
macOS-Arch:
|
||||
uses: apache/nuttx/.github/workflows/arch.yml@master
|
||||
needs: Fetch-Source
|
||||
with:
|
||||
os: macOS
|
||||
boards: |
|
||||
["macos", "sim-01", "sim-02", "sim-03"]
|
||||
|
||||
# Run the selected macOS Builds
|
||||
macOS:
|
||||
permissions:
|
||||
contents: none
|
||||
runs-on: macos-13
|
||||
needs: macOS-Arch
|
||||
if: ${{ needs.macOS-Arch.outputs.skip_all_builds != '1' }}
|
||||
strategy:
|
||||
max-parallel: 2
|
||||
matrix:
|
||||
boards: ${{ fromJSON(needs.macOS-Arch.outputs.selected_builds) }}
|
||||
steps:
|
||||
- name: Download Source Artifact
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: source-bundle
|
||||
path: .
|
||||
|
||||
- name: Extract sources
|
||||
run: tar zxf sources.tar.gz
|
||||
|
||||
- name: Restore Tools Cache
|
||||
id: cache-tools
|
||||
uses: actions/cache@v4
|
||||
env:
|
||||
cache-name: ${{ runner.os }}-cache-tools
|
||||
with:
|
||||
path: ./sources/tools
|
||||
key: ${{ runner.os }}-tools-${{ hashFiles('./sources/nuttx/tools/ci/platforms/darwin.sh') }}
|
||||
|
||||
- name: Export NuttX Repo SHA
|
||||
run: echo "nuttx_sha=`git -C sources/nuttx rev-parse HEAD`" >> $GITHUB_ENV
|
||||
|
||||
# Released version of Cython has issues with Python 11. Set runner to use Python 3.10
|
||||
# https://github.com/cython/cython/issues/4500
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.10'
|
||||
- name: Run Builds
|
||||
run: |
|
||||
echo "::add-matcher::sources/nuttx/.github/gcc.json"
|
||||
export ARTIFACTDIR=`pwd`/buildartifacts
|
||||
cd sources/nuttx/tools/ci
|
||||
./cibuild.sh -i -c -A -R testlist/${{matrix.boards}}.dat
|
||||
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: macos-${{matrix.boards}}-builds
|
||||
path: buildartifacts/
|
||||
continue-on-error: true
|
||||
|
||||
# Select the msys2 Builds based on PR Arch Label
|
||||
msys2-Arch:
|
||||
uses: apache/nuttx/.github/workflows/arch.yml@master
|
||||
needs: Fetch-Source
|
||||
with:
|
||||
os: msys2
|
||||
boards: |
|
||||
["msys2"]
|
||||
|
||||
# Run the selected msys2 Builds
|
||||
msys2:
|
||||
needs: msys2-Arch
|
||||
if: ${{ needs.msys2-Arch.outputs.skip_all_builds != '1' }}
|
||||
runs-on: windows-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
max-parallel: 1
|
||||
matrix:
|
||||
boards: ${{ fromJSON(needs.msys2-Arch.outputs.selected_builds) }}
|
||||
|
||||
defaults:
|
||||
run:
|
||||
shell: msys2 {0}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: msys2/setup-msys2@v2
|
||||
with:
|
||||
msystem: MSYS
|
||||
update: false
|
||||
install: >-
|
||||
base-devel
|
||||
gcc
|
||||
gperf
|
||||
automake
|
||||
autoconf
|
||||
git
|
||||
python3
|
||||
ncurses-devel
|
||||
unzip
|
||||
zip
|
||||
tio
|
||||
zlib-devel
|
||||
cmake
|
||||
ninja
|
||||
python-pip
|
||||
vim
|
||||
|
||||
- name: pip3 install
|
||||
run: |
|
||||
python3 -m venv --system-site-packages /usr/local
|
||||
pip3 install --root-user-action=ignore --no-cache-dir pyelftools cxxfilt kconfiglib
|
||||
|
||||
- run: git config --global core.autocrlf false
|
||||
|
||||
- name: Download Source Artifact
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: source-bundle
|
||||
path: .
|
||||
|
||||
- name: Extract sources
|
||||
run: tar zxf sources.tar.gz
|
||||
|
||||
- name: Export NuttX Repo SHA
|
||||
run: echo "nuttx_sha=`git -C sources/nuttx rev-parse HEAD`" >> $GITHUB_ENV
|
||||
|
||||
- name: Run Builds
|
||||
run: |
|
||||
echo "::add-matcher::sources/nuttx/.github/gcc.json"
|
||||
export ARTIFACTDIR=`pwd`/buildartifacts
|
||||
git config --global --add safe.directory /github/workspace/sources/nuttx
|
||||
git config --global --add safe.directory /github/workspace/sources/apps
|
||||
cd sources/nuttx/tools/ci
|
||||
./cibuild.sh -g -i -A -C -R testlist/${{matrix.boards}}.dat
|
||||
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: msys2-${{matrix.boards}}-builds
|
||||
path: buildartifacts/
|
||||
continue-on-error: true
|
||||
|
||||
# Select the msvc Builds based on PR Arch Label
|
||||
msvc-Arch:
|
||||
uses: apache/nuttx/.github/workflows/arch.yml@master
|
||||
needs: Fetch-Source
|
||||
with:
|
||||
os: msvc
|
||||
boards: |
|
||||
["msvc_placeholder_with_sim_keyword"]
|
||||
|
||||
# Build with MSVC in Windows native
|
||||
msvc:
|
||||
needs: msvc-Arch
|
||||
if: ${{ needs.msvc-Arch.outputs.skip_all_builds != '1' }}
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
# Set up Python environment and install kconfiglib
|
||||
- name: Set up Python and install kconfiglib
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.10'
|
||||
- name: Install kconfiglib
|
||||
run: |
|
||||
pip install kconfiglib
|
||||
|
||||
- run: git config --global core.autocrlf false
|
||||
|
||||
- name: Download Source Artifact
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: source-bundle
|
||||
path: .
|
||||
|
||||
- name: Extract sources
|
||||
run: |
|
||||
7z x sources.tar.gz -y
|
||||
7z x sources.tar -y
|
||||
|
||||
# Build the project using the given CMake commands
|
||||
- name: Configure and build with CMake
|
||||
run: |
|
||||
cd sources/nuttx
|
||||
cmake -B vs2022 -DBOARD_CONFIG=sim/windows -G"Visual Studio 17 2022" -A Win32
|
||||
cmake --build vs2022
|
||||
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: msvc-builds
|
||||
path: buildartifacts/
|
||||
continue-on-error: true
|
||||
|
|
@ -1,49 +0,0 @@
|
|||
# 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.
|
||||
#
|
||||
name: Check
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
paths-ignore:
|
||||
- 'Documentation/**'
|
||||
|
||||
concurrency:
|
||||
group: check-${{ github.event.pull_request.number || github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
check:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout nuttx repo
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: apache/nuttx
|
||||
path: nuttx
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Check Pull Request
|
||||
run: |
|
||||
echo "::add-matcher::nuttx/.github/nxstyle.json"
|
||||
python3 -m venv .venv
|
||||
source .venv/bin/activate
|
||||
pip install cmake-format black isort flake8
|
||||
cd nuttx
|
||||
commits="${{ github.event.pull_request.base.sha }}..HEAD"
|
||||
git log --oneline $commits
|
||||
echo "../nuttx/tools/checkpatch.sh -u -m -g $commits"
|
||||
../nuttx/tools/checkpatch.sh -u -m -g $commits
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
# This is a basic workflow to help you get started with Actions
|
||||
|
||||
name: checkpatch
|
||||
|
||||
# Controls when the workflow will run
|
||||
on:
|
||||
pull_request:
|
||||
types: [opened, reopened, synchronize]
|
||||
|
||||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
|
||||
jobs:
|
||||
checkpatch:
|
||||
uses: open-vela/public-actions/.github/workflows/checkpatch.yml@dev
|
||||
secrets: inherit
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
# This is a basic workflow to help you get started with Actions
|
||||
|
||||
name: CI
|
||||
|
||||
# Controls when the workflow will run
|
||||
on:
|
||||
pull_request_target:
|
||||
types: [opened, reopened, synchronize]
|
||||
issue_comment:
|
||||
types: [created]
|
||||
|
||||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
|
||||
jobs:
|
||||
ci:
|
||||
uses: open-vela/public-actions/.github/workflows/ci.yml@dev
|
||||
secrets: inherit
|
||||
|
|
@ -1,53 +0,0 @@
|
|||
# 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.
|
||||
#
|
||||
---
|
||||
name: "Build Documentation"
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
paths:
|
||||
- 'Documentation/**'
|
||||
|
||||
pull_request:
|
||||
paths:
|
||||
- 'Documentation/**'
|
||||
|
||||
concurrency:
|
||||
group: docs-${{ github.event.pull_request.number || github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
build-html:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.8'
|
||||
- name: Generate Documentation
|
||||
run: |
|
||||
cd Documentation/
|
||||
pip3 install pipenv
|
||||
pipenv install
|
||||
pipenv run make html
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: sphinx-docs
|
||||
path: |
|
||||
Documentation/_build/html/
|
||||
Documentation/_build/latex/*.pdf
|
||||
|
|
@ -1,90 +0,0 @@
|
|||
# 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.
|
||||
#
|
||||
name: Docker-Linux
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
# Publish `master` as Docker `latest` image.
|
||||
branches:
|
||||
- master
|
||||
paths:
|
||||
- 'tools/ci/docker/linux/**'
|
||||
- '.github/workflows/docker_linux.yml'
|
||||
|
||||
# Run builds for any PRs.
|
||||
pull_request:
|
||||
paths:
|
||||
- 'tools/ci/docker/linux/**'
|
||||
- '.github/workflows/docker_linux.yml'
|
||||
|
||||
env:
|
||||
IMAGE_NAME: apache-nuttx-ci-linux
|
||||
|
||||
concurrency:
|
||||
group: docker-${{ github.event.pull_request.number || github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
permissions:
|
||||
packages: write
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
# Push image to GitHub Packages.
|
||||
push:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
IMAGE_TAG: ghcr.io/${{ github.repository }}/apache-nuttx-ci-linux
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Free Disk Space (Ubuntu)
|
||||
uses: ./.github/actions/free-disk-space
|
||||
with:
|
||||
# this might remove tools that are actually needed,
|
||||
# if set to "true" but frees about 6 GB
|
||||
tool-cache: false
|
||||
|
||||
# all of these default to true, but feel free to set to
|
||||
# "false" if necessary for your workflow
|
||||
android: true
|
||||
dotnet: true
|
||||
haskell: true
|
||||
large-packages: true
|
||||
docker-images: true
|
||||
swap-storage: true
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Log into registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
- name: Pre-build Disk Stats
|
||||
run: |
|
||||
df -h
|
||||
- name: Push Linux image
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: tools/ci/docker/linux
|
||||
platforms: linux/amd64
|
||||
push: ${{ github.ref == 'refs/heads/master' }}
|
||||
tags: ${{ env.IMAGE_TAG }}
|
||||
- name: Post-build Disk Stats
|
||||
if: always()
|
||||
run: |
|
||||
df -h
|
||||
|
|
@ -1,54 +0,0 @@
|
|||
# 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.
|
||||
#
|
||||
name: Issue Labeler
|
||||
|
||||
on:
|
||||
issues:
|
||||
types: [opened]
|
||||
|
||||
jobs:
|
||||
label:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
issues: write
|
||||
steps:
|
||||
- name: Add labels issues automatically based on their body.
|
||||
uses: actions/github-script@v7
|
||||
with:
|
||||
script: |
|
||||
const body = context.payload.issue.body;
|
||||
const bodySplit = body.split(/\[|\]/).map(e => e.toLowerCase());
|
||||
const oskeywords = ['os: other', 'os: bsd', 'os: linux', 'os: mac', 'os: windows'];
|
||||
const archkeywords1 = ['arch: all', 'arch: arm', 'arch: arm64', 'arch: avr', 'arch: ceva'];
|
||||
const archkeywords2 = ['arch: hc', 'arch: mips', 'arch: misoc', 'arch: openrisc', 'arch:renesas'];
|
||||
const archkeywords3 = ['arch: risc-v', 'arch: simulator', 'arch: sparc', 'arch: tricore'];
|
||||
const archkeywords4 = ['arch: x86', 'arch: x86_64', 'arch: xtensa', 'arch: z16', 'arch: z80', 'arch:renesas'];
|
||||
const areakeywords1 = ['area: applications', 'area: api', 'area: board support', 'area: build system'];
|
||||
const areakeywords2 = ['area: configuring', 'area: debugging', 'area: drivers', 'area: file system', 'area: installing', 'area: kconfig'];
|
||||
const areakeywords3 = ['area: kernel', 'area: memory management', 'area: native port', 'area: networking'];
|
||||
const areakeywords4 = ['area: os components', 'area: posix', 'area: sensors', 'area: specific peripheral'];
|
||||
const keywords = [...oskeywords, ...archkeywords1, ...archkeywords2, ...archkeywords3, ...archkeywords4, ...areakeywords1, ...areakeywords2, ...areakeywords3, ...areakeywords4];
|
||||
var keywordsfound = new Set();
|
||||
for (const keyword of keywords) {
|
||||
if (bodySplit.includes(keyword)) {
|
||||
keywordsfound.add(keyword)
|
||||
}
|
||||
}
|
||||
if (keywordsfound.size !== 0) {
|
||||
github.rest.issues.addLabels({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
issue_number: context.issue.number,
|
||||
labels: Array.from(keywordsfound)
|
||||
})
|
||||
}
|
||||
|
|
@ -1,45 +0,0 @@
|
|||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
name: "Pull Request Labeler"
|
||||
on:
|
||||
- pull_request_target
|
||||
|
||||
jobs:
|
||||
labeler:
|
||||
permissions:
|
||||
contents: read
|
||||
pull-requests: write
|
||||
issues: write
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Assign labels based on paths
|
||||
uses: actions/labeler@main
|
||||
with:
|
||||
repo-token: "${{ secrets.GITHUB_TOKEN }}"
|
||||
sync-labels: true
|
||||
|
||||
- name: Assign labels based on the PR's size
|
||||
uses: codelytv/pr-size-labeler@v1.10.1
|
||||
with:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
ignore_file_deletions: true
|
||||
xs_label: 'Size: XS'
|
||||
s_label: 'Size: S'
|
||||
m_label: 'Size: M'
|
||||
l_label: 'Size: L'
|
||||
xl_label: 'Size: XL'
|
||||
|
|
@ -1,34 +0,0 @@
|
|||
name: Lint
|
||||
|
||||
on: [pull_request]
|
||||
|
||||
concurrency:
|
||||
group: lint-${{ github.event.pull_request.number || github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
permissions:
|
||||
contents: read # for actions/checkout to fetch code
|
||||
statuses: write # for github/super-linter to mark status of each linter run
|
||||
name: Lint
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- run: mkdir super-linter.report
|
||||
- name: Lint
|
||||
uses: github/super-linter@v7
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
VALIDATE_ALL_CODEBASE: false
|
||||
VALIDATE_PYTHON_BLACK: true
|
||||
VALIDATE_PYTHON_FLAKE8: true
|
||||
PYTHON_FLAKE8_CONFIG_FILE: setup.cfg
|
||||
VALIDATE_PYTHON_ISORT: true
|
||||
PYTHON_ISORT_CONFIG_FILE: setup.cfg
|
||||
VALIDATE_YAML: true
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
name: 'Close stale issues and PR'
|
||||
on:
|
||||
schedule:
|
||||
- cron: '30 1 * * *'
|
||||
workflow_dispatch: # 允许手动触发
|
||||
|
||||
jobs:
|
||||
stale:
|
||||
uses: open-vela/public-actions/.github/workflows/stale.yml@dev
|
||||
secrets: inherit
|
||||
|
||||
Loading…
Reference in New Issue