Commit Graph

223 Commits

Author SHA1 Message Date
Alin Jerpelea c9eef2d697 tools: migrate to SPDX identifier
Most tools used for compliance and SBOM generation use SPDX identifiers
This change brings us a step closer to an easy SBOM generation.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2024-09-10 23:11:11 +08:00
shizhenghui d285e5bc31 Dockerfile: add subversion to final images
Add subversion to install list ensure linux docker
can use svn command to download source code.

Signed-off-by: shizhenghui <shizhenghui@xiaomi.com>
2024-09-10 12:17:20 +08:00
shizhenghui af19a22b11 ci-docker: add subversion to linux dockerfile
Add subversion to install list ensure linux docker
can use svn command to download source code.

Signed-off-by: shizhenghui <shizhenghui@xiaomi.com>
2024-09-05 21:25:46 +08:00
Matheus Catarino 1936e68f40 risc-v/qemu-rv: Add Build Config for leds64_zig
This PR adds a new Build Config `rv-virt:leds64_zig` that builds the Zig App `leds_zig` for QEMU RISC-V 64-bit.
ref.: https://github.com/apache/nuttx-apps/pull/2534
2024-09-05 11:28:12 +08:00
Alexander Merkle 39937c9685 tools/ci/docker/linux/Dockerfile: fix ccache when running container as user
Normally ccache places the temporary files in `~/.ccache`, when invoking the container with
  `-u <uid>:<gid>`
as e.g. Jenkins does, this might result in a invalid/unknown home folder.
Thus ccache tries to write to `/.ccache` which doesn't exist and the user doesn't have any permissions.

Explicitly set `CCACHE_DIR` to a folder with appropriate permissions.
2024-09-05 10:09:57 +08:00
Alexander Merkle c95a1cc98b tools/ci/docker/linux/Dockerfile: fix cmake download
remove the leftover `wget` as curl is used
triggers a host not found on my machine

Signed-off-by: Alexander Merkle <alexander.merkle@lauterbach.com>
2024-09-04 09:09:50 +02:00
simbit18 ccb20feb25 tools/ci/docker/linux/Dockerfile: Restarting the Docker-Linux workflow a new attempt
tools/ci/docker/linux/Dockerfile

revert from --strip-components=1 to --strip-components 1

.github/workflows/docker_linux.yml

   added -> workflow_dispatch:

Manual execution of a workflow
https://docs.github.com/en/actions/managing-workflow-runs-and-deployments/managing-workflow-runs/manually-running-a-workflow
2024-09-02 14:11:51 -04:00
simbit18 63ed723d93 tools/ci/docker/linux/Dockerfile: Restarting the Docker-Linux workflow
The docker image has not been updated we currently use that one
from 22 days ago.

It seems that the error encountered is due to an incomplete download. It will probably work fine if downloaded again..

 https://github.com/apache/nuttx/actions/runs/10619683045/job/29437799464#step:7:1339

28.31
28.31 gzip: stdin: unexpected end of file
28.31 tar: Unexpected EOF in archive
28.32 tar: Unexpected EOF in archive
28.32 tar: Error is not recoverable: exiting now
2024-09-02 10:27:57 +08:00
YAMAMOTO Takashi 8e5f6de7e5 CI: drop stm3240g-eval:knxwm for now
cf. https://github.com/apache/nuttx/issues/13246
2024-08-30 21:03:08 +08:00
simbit18 75eea1b74e tools/ci/docker/linux/Dockerfile: image cleaned of unnecessary files and folders
Trying to reduce the size of the docker image, I found files and folders to be deleted.

For now, I have commented Swift from the  Dockerfile because the package is too large.
2024-08-30 01:19:55 +08:00
simbit18 1661a66843 [cmake]: added initial support for MSYS2
Currently concerns only arm.

tools/ci/testlist/msys2.dat:
At the moment I only added the board nucleo-l152re:nsh

.github/workflows/build.yml:
Enabled cmake for msys2
2024-08-27 21:36:12 +08:00
Matheus Catarino 25bd3be167 tools/ci: add zig, ldc and swift
The main objective is to determine if the examples really work or if they have been obsoleted.
The languages included in the list promote good interoperability with the NuttX API (C predominant).

This will show if they are worth integrating in NuttX.

**FFI method**

- Rust: bindgen or c2rust
- D: importC
- Swift: Bridging header or clang modulemap.
- Zig: `@cImport/@cInclude` or translate-c
2024-08-26 10:25:54 +08:00
Lup Yuen Lee 52583fc17e tools/ci: Add Rust Target for QEMU RISC-V 64-bit
This PR updates the Docker Image for NuttX CI, so that it builds Rust Apps correctly for QEMU RISC-V 64-bit. We add the Rust Target for `riscv64gc-unknown-none-elf` to the Docker Image.

In the next PR, we will call the Updated Docker Image to [compile the Rust App `leds_rust`](https://github.com/apache/nuttx/pull/12852), at every run of NuttX CI. This will validate whether Rust Apps are built correctly for QEMU RISC-V 64-bit.

Modified Files:

`tools/ci/docker/linux/Dockerfile`: Add Rust Target `riscv64gc-unknown-none-elf` for Docker CI

`tools/ci/platforms/ubuntu.sh`: Same as above, but for Ubuntu CI

`tools/ci/platforms/msys2.sh`: Same as above, but for MSYS2 CI
2024-08-07 19:59:56 +08:00
simbit18 3637040d73 tools/ci/testlist: Added jobs to speed up CI checks.
Divided jobs risc-v and xtensa to finish workflow under 2 hours.
2024-07-30 01:43:29 +08:00
simbit18 2f8560e838 tools/ci: enable avr32dev1 build
removed in the tools/ci/testlist/other.dat file the entries
 -avr32dev1:nsh
 -avr32dev1:ostest

avr32_bringup.c
Fix  Error: ./avr32_bringup.c:54:4: error: #warning "Not Implemented"

comment out directive '#warning'
/* #warning "Not Implemented" */

avr_doirq.c

fix avr32/avr_doirq.c:117: error: assignment discards qualifiers from pointer target type
  regs = g_current_regs; -> regs = (uint32_t *)g_current_regs;
2024-07-12 00:39:21 +08:00
Almir Okato 457f9d3dce ci: update required esptool version to 4.8.dev4
This esptool version is required when building the
default Simple Boot for Espressif chips.

Signed-off-by: Almir Okato <almir.okato@espressif.com>
2024-07-04 18:22:24 -03:00
simbit18 a3828c08da tools/ci/docker/linux/Dockerfile: add AVR32 GCC toolchain
Add prebuilt AVR32 GCC toolchain
2024-06-18 23:15:39 +08:00
simbit18 3b2faa31e8 tools/ci/testlist: msys2.dat add qemu-v8a:nsh_smp
add build board qemu-v8a:nsh_smp 64-bit Arm Cortex-A53 with Multiple Cores
2024-05-28 16:29:06 -03:00
simbit18 d0f893dfba tools/ci/platforms: linux.sh and ubuntu.sh fix mkdir: wamrc: File exists
mkdir wamrc -> mkdir -p wamrc
2024-05-28 10:22:34 -03:00
Yanfeng Liu 4b2b26c0b0 ci/ltp: enlarge timeout for LTP test
This increases timeout value for `ltp_interfaces_pthread_once_2_1`.

Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
2024-05-22 16:40:13 +08:00
yinshengkai a517f12f3d tools/docker: install file/tclsh tools
fix CI compilation errors:
github/workspace/sources/apps/database/sqlite/sqlite/configure: line 5204: /usr/bin/file: No such file or directory
/github/workspace/sources/apps/database/sqlite/sqlite/configure: line 10376: tclsh: command not found
/github/workspace/sources/apps/database/sqlite/sqlite/configure: line 10812: tclsh: command not found
/github/workspace/sources/apps/database/sqlite/sqlite/configure: line 10826: tclsh: command not found
configure: WARNING: Can't find Tcl configuration definitions
configure: WARNING: *** Without Tcl the regression tests cannot be executed ***
configure: WARNING: *** Consider using --with-tcl=... to define location of Tcl ***
make[4]: warning: -j0 forced in submake: resetting jobserver mode.
/github/workspace/sources/apps/database/sqlite/sqlite/tool/cktclsh.sh: 5: tclsh: not found
make[4]: *** [Makefile:793: has_tclsh84] Error 1
make[4]: Target 'sqlite3.c' not remade because of errors.
make[3]: *** [Makefile:52: context] Error 2
make[2]: *** [Makefile:53: /github/workspace/sources/apps/database/sqlite_context] Error 2
make[2]: Target 'context_all' not remade because of errors.
make[1]: *** [Makefile:175: context] Error 2
make: *** [tools/Unix.mk:452: /github/workspace/sources/apps/.context] Error 2

Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2024-05-20 10:12:04 +08:00
vela-mib 9a4afbcb62 add drivertest test cases on sim for CI
Signed-off-by: vela-mib <vela-mib@xiaomi.com>
2024-04-11 10:33:15 -03:00
vela-mib 9847c6219d add libuv and cmocka test cases with file system on sim and qemu on CI
Signed-off-by: vela-mib <vela-mib@xiaomi.com>
2024-04-10 14:46:53 +08:00
chao an e552a3faa5 ci/darwin: remove codechecker from install list
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
codechecker 6.23.1 requires PyYAML==6.0.1, but you have pyyaml 5.4.1 which is incompatible.

Signed-off-by: chao an <anchao@lixiang.com>
2024-04-02 15:42:32 +08:00
simbit18 391badcb24 tools/ci/testlist/macos.dat: fix path esp32c3-legacy
find: boards/risc-v/esp32c3/esp32c3-devkit/configs/cxx: No such file or directory
find: boards/risc-v/esp32c3/esp32c3-devkit/configs/wifi: No such file or directory
2024-03-22 13:20:02 +08:00
vela-mib 8ff3b90742 add open posix test cases on qemu and sim on CI
Signed-off-by: vela-mib <vela-mib@xiaomi.com>
2024-03-21 18:42:47 +08:00
simbit18 e622e95d5b tools/ci/platforms/darwin.sh: Removed pyyaml folder
add rm -rf pyyaml
2024-03-20 16:22:26 +08:00
simbit18 21572864e7 Minor improvement for tools/ci: Fixed cmake build of bloaty and installation in darwin.sh script.
function bloaty() Add  -D CMAKE_INSTALL_PREFIX="${NUTTXTOOLS}"/bloaty.
Improves workflow execution time because it is now cached.

Changed reference file to calculate the hash for key of actions/cache@v4. Now it is darwin.sh.
2024-03-19 20:52:40 +08:00
Marco Casaroli 9af8299af5 arch/esp32 add config for qemu-openeth 2024-03-12 08:31:06 -03:00
simbit18 1cd8413d19 tools/ci/platforms/darwin.sh: fix mkdir: wamrc: File exists
mkdir wamrc -> mkdir -p wamrc
2024-03-03 02:30:54 +08:00
simbit18 fd86cf70cc tools/ci: Modify cibuild.sh to adapt to new platforms.
cibuild.sh -> modify scripts
platforms -> new folder +scripts
add header

tools/ci/platforms: Set the execute permissions on the updated files.

tools/ci/platforms/linux.sh: fix header

Corrected Apache Foundation copyright header.

tools/ci: Modify cibuild.sh to adapt to new platforms.

cibuild.sh -> modify scripts
platforms -> new folder +scripts
add header

tools/ci/platforms: Set the execute permissions on the updated files.

tools/ci: Modify cibuild.sh to adapt to new platforms.

cibuild.sh -> modify scripts
platforms -> new folder +scripts
add header

tools/ci/platforms: Set the execute permissions on the updated files.

tools/ci: Kept the common code in cibuild.sh.

Kept the common code in cibuild.sh.

tools/ci: Storing all Environment Variables in env.sh script.

Added in cibuild.sh this command "source "${CIWORKSPACE}"/tools/env.sh" to activate installed tools.

tools/ci: shared the tools path in cibuild.sh

Added in cibuild.sh enviroment variable "NUTTXTOOLS" for installed tools.

Removed bashisms from scripts darwin.sh, linux.sh, msys2.sh and ubuntu.sh.

tools/ci: Fixed build problems with macOS

Fix Error: /Users/runner/work/nuttx/nuttx/sources/tools/bloaty-src/build is not a directory
2024-03-01 21:30:03 +08:00
Petro Karashchenko 9feac3b644 Revert "citest/sim01: disable sim:libcxxtest on macOS"
This reverts commit 1ecd78f5cc.
2024-02-16 10:42:23 -08:00
Yanfeng Liu 1ecd78f5cc citest/sim01: disable sim:libcxxtest on macOS
There have been errors like below on macOS for sim:libcxxtest

```
Error: /Applications/Xcode.../include/mach/vm_page_size.h:59:44:
error: expected ';' after top level declarator
```
This patch tries to disable that check on macOS.

Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
2024-02-15 06:15:24 -08:00
zhanghongyu b3dcebce07 linux/Dockerfile: Add the python3 coloredlogs package for the matter build
Depend on this package when we compile using the build_examples.py script that comes with matter.

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2024-01-10 09:47:54 -08:00
fangxinyong f2bcb0d2d8 tools/ci: revert tmp change
for apache/nuttx#11498 to pass ci, need revert after all commits are merged

Signed-off-by: fangxinyong <fangxinyong@xiaomi.com>
2024-01-10 01:58:53 -08:00
fangxinyong c479ccb8aa sched: move etc romfs mount from nsh to sched/init
Usually the startup script is placed under /etc. The contents of the etc directory
are compiled and linked with Nuttx binary in the form of romfs. After startup,
it will be  mounted by Nsh.

etc is generated by the different boards, that use genromfs and xxd tools to generate
and compile it into the Nuttx, for example: boards/arm/at32/at32f437-mini/tool/mkromfs.sh
The more common method is etc image generated from the content in the corresponding
board/arch/board/board/src/etc directory, and added by Makefile for example:
boards/sim/sim/sim/src/etc.

But in kernel/protected mode, Nuttx kernel and apps are run in different privileged/
non-privileged mode or the isolated binarys, so as that nsh should use syscall to
access Nuttx kernel by exported API. In this scenario, nsh can not mount the etc image
content, because that is generated in board and as a part of Nuttx kernel.

changes:

- move etc romfs mount from nsh to Nuttx, but keep the script to parse and execute.
- move and rename the related CONFIG, move customized nsh_romfsimg.h to etc_romfs.c
  in boards, and no need declaration for romfs_img/romfs_img_len.

This commit changes and updates all configurations in Nuttx arch/board as much as possible,
but if any missing, please refer to the following simple guide:

- rename CONFIG_NSH_ROMFSETC to CONFIG_ETC_ROMFS, and delete CONFIG_NSH_ARCHROMFS in defconfig
- rename the etc romfs mount configs, for example CONFIG_NSH_FATDEVNO to CONFIG_ETC_FATDEVNO
- move customized nsh_romfsimg.h to etc_romfs.c in board/arch/board/board/src and no need
  declaration for romfs_img/romfs_img_len.
- delete default nsh_romfsimg.h, if ROMFSETC is enabled, should generate and compile etc_romfs.c
  in board/arch/board/board/src.

Signed-off-by: fangxinyong <fangxinyong@xiaomi.com>
2024-01-09 21:29:46 -03:00
simbit18 eaf1d07809 tools/ci: add initial support for MSYS2
removed uname from msys2 job
2024-01-09 05:50:09 -08:00
xuxin19 7207e5d1e9 tools/ci:enable arm64 CMake ci build
Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2023-12-27 07:27:17 -08:00
xuxin19 1c9fab65d8 Revert "testlist: Disable sim:matter ci temporarily"
restart sim:matter ci

This reverts commit 17458c7dba.
2023-12-18 20:38:10 -08:00
Xiang Xiao b68aa89e56 tools/ci: Upgrade riscv toolchain to v13.2.0
from https://github.com/xpack-dev-tools/riscv-none-elf-gcc-xpack/releases/tag/v13.2.0-2

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-12-17 18:25:24 +01:00
Xiang Xiao dc1a2135de tools/ci: Upgrade arm/arm64 toolchain to 13.2.Rel1
from https://developer.arm.com/downloads/-/arm-gnu-toolchain-downloads

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-12-17 17:33:08 +01:00
Xiang Xiao 17458c7dba testlist: Disable sim:matter ci temporarily
utils cmake build file can work with libcxx 17.0.6

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-12-17 03:39:26 -08:00
zhanghongyu 404616d621 linux_Dockerfile: only copy gn binary into docker
Minimize the size of the docker image

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2023-12-11 10:46:47 +01:00
Xiang Xiao 69e413c678 ci/docker: Revert the change about gn to unblock ci
Revert "ci/docker: Fix " Could not find GN_EXECUTABLEXX using the following names: gn""
This reverts commit d6ac9e1aed.

Revert "tools/ci: Skip copy gn temporary files"
This reverts commit 4673fccece.
2023-12-10 06:39:30 -08:00
Xiang Xiao d6ac9e1aed ci/docker: Fix " Could not find GN_EXECUTABLEXX using the following names: gn"
report here:
https://github.com/apache/nuttx-apps/actions/runs/7149109828/job/19470959712?pr=2225
regression by:
https://github.com/apache/nuttx/pull/11345

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-12-08 22:57:35 -08:00
Xiang Xiao 4673fccece tools/ci: Skip copy gn temporary files
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-12-08 16:10:17 +01:00
zhanghongyu bc2dfe49f4 ci_sim: add matter build to the test list sim-01.dat and support cmake compilation
in order to maintain the completeness of the matter related functional code, the build of matter is added to testlist.

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2023-12-06 07:56:17 -08:00
ThomasNS b0f245b33f upgrade to gcc 12 in docker 2023-12-06 07:47:34 -08:00
zhanghongyu 4087e21dea ci_sim01: install g++-multilib into docker to support libcxx
fix build break:
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/11/libstdc++.so when searching for -lstdc++
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/11/libstdc++.a when searching for -lstdc++
/usr/bin/ld: cannot find -lstdc++: No such file or directory
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/11/libstdc++.so when searching for -lstdc++
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2023-12-06 06:20:05 +01:00
zhanghongyu c17fcb5ddd ci_sim: the version of nodejs obtained by apt install is too low
so using npm to upgrade the nodejs tool to the latest

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2023-12-04 11:25:40 -08:00