Commit Graph

102 Commits

Author SHA1 Message Date
simbit18 791d7c97d0 cmake: Renamed savedefconfig with refreshsilent
Renamed savedefconfig -> refreshsilent name more consistent with the refresh stage for cmake on github.

Added new savedefconfig to fix
https://github.com/apache/nuttx/issues/14281
2024-10-18 22:14:50 +08:00
simbit18 b3107a1f1b tools/testbuild.sh: Improved speed in the skipping phase 2024-10-03 08:59:04 +08:00
simbit18 6a0c0722e2 CI: Improvement to speed up compilation and reduce download errors.
The simple improvement is designed to speed up compilation and reduce download errors on github and local.

Added a folder nxtmpdir for storing third-party packages

nuttxworkspace
|
|- nuttx
|- apps
|- nxtmpdir

tools/Unix.mk:
added export NXTMPDIR := $(WSDIR)/nxtmpdir

tools/configure.sh:
added option -S creates the nxtmpdir folder for third-party packages.

tools/Config.mk:
added macro
CLONE - Git clone repository.
CHECK_COMMITSHA - Check if the branch contains the commit SHA-1.

tools/testbuild.sh:
added option -S

For now I added in the folder this package

ESP_HAL_3RDPARTY_URL = https://github.com/espressif/esp-hal-3rdparty.git

ARCH
arch/xtensa/src/esp32/Make.defs
arch/xtensa/src/esp32s2/Make.defs
arch/xtensa/src/esp32s3/Make.defs
arch/risc-v/src/common/espressif/Make.defs
arch/risc-v/src/esp32c3-legacy/Make.defs

but you can also add other packages (maybe also of apps)
2024-09-20 11:26:01 +08:00
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
simbit18 c4efab7eea tools/testbuild.sh: added store compilation artifacts for cmake
Added the ability to store compilation artifacts for cmake after a job.
2024-07-30 21:36:26 +08:00
simbit18 1540dc2d67 tools/testbuild.sh: add option -N use CMake with Ninja
tools/testbuild.sh
     added option -N Use CMake with Ninja as the backend.

    updated help.

    added date to print startup board

   added HOST=Msys

github/workflows/build.yml

   added option -N job docker
2024-07-18 13:40:20 +08:00
chao an 99c29bda70 tools/testbuild: restore the original toolchain configuration before refresh
Signed-off-by: chao an <anchao@xiaomi.com>
2023-07-20 09:09:32 +02:00
chao an dc6f1406d1 tools/ci: migrate some ci build configurations to CMake
Signed-off-by: chao an <anchao@xiaomi.com>
2023-07-15 23:32:36 +08:00
Xiang Xiao 2c5f653bfd Remove the tail spaces from all files except Documentation
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-02-26 13:24:24 -08:00
xinbingnan d8cff7d17a tools/ci/docker/linux/Dockerfile: Install CodeChecker and requirements(clang, clang-tidy)
.github/workflows/build.yml: added CodeChecker support for GitHub Workflow
tools/testbuild.sh: added support for CodeChecker checks

- Added support for CodeChecker checks.
- Generate inspection reports and summaries.
- After the task is executed, the logs are compressed and the database is packaged.

Signed-off-by: xinbingnan <xinbingnan@xiaomi.com>
2022-10-12 16:23:43 +08:00
Masayuki Ishikawa 5633e38da2 tools: testbuild.sh: Add exportandimport func
Summary:
- This commit adds exportandimport func for CONFIG_BUILD_KERNEL=y

Impact:
- ci with CONFIG_BUILD_KERNEL=y only

Testing:
- Tested with sabre-6quad:netknsh (will be updated later)

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2022-07-27 23:22:23 +08:00
Xiang Xiao 05ff19d17b tools/testbuild.sh: Don't skip configure and distclean
to improve the test coverage

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-05-01 09:50:50 +03:00
YAMAMOTO Takashi 3aa83d6146 tools/testbuild.sh: Add an optional step to run NuttX
I plan to use this to run sim:ostest (and probably other tests later)
on the CI.

The script indirection might allow future non-sim usage as well.
(like running it with qemu, or even on the real hardware.)
I have no plan to do it by myself right now though.
2022-02-22 13:30:57 +08:00
Xiang Xiao 33d5f923b6 tools/testbuild.sh: Quote the parameter expansion pattern by "
to enable the exact match(disable glob match)

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-04-03 20:38:45 -03:00
Alin Jerpelea 7ff60d7c5b tools: Author Gregory Nutt: update licenses to Apache
Gregory Nutt has submitted the SGA and we can migrate the licenses
 to Apache.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-02-18 11:26:21 -08:00
YAMAMOTO Takashi fc7cddee39 Deal with "sed -i" portability
An empty extension for sed -i is not widely available.

* Where it isn't available (eg. macOS's sed) "sed -i -e" will
  create a backup file with the "-e" suffix.

* Even GNU sed documentation says it's "not recommended".

This commit deals with it by:

* Replace it with a more appropriate tool (kconfig-tweak)

* Or, specify the extension (.bak)
2021-01-11 08:38:19 +01:00
YAMAMOTO Takashi 5dd5174722 testbuild.sh: Add -C option to skip tree cleanness check
Build-testing a dirty tree is convenient during development.
2020-11-10 18:07:51 -08:00
Brennan Ashton e56a7146c2 build: Fix testbuild.sh artifact copy on macOS
xargs for macOS does not support the '-a/--file-arg' flag so
build artifacts were not getting stored.  This change passes it in
via stdin which is more portable.

Signed-off-by: Brennan Ashton <bashton@brennanashton.com>
2020-10-29 00:14:19 -07:00
Brennan Ashton 162da1169e CI: Store artifacts durring build
Add new option -A is added to tools/testbuild.sh that will take the
created build executable and store it in a folder for the config
that generated it under $ARTIFACTDIR which can be set via an
environment variable or defaulted to $(TOPDIR)/buildartifacts

This is also helpful for local testing because you can now run
tools/testbuild.sh -A sim.dat and have all of the simulation
targets generated without having to rebuild along the way.

In the GitHub Actions workflow the artifacs are uploaded
two two bundles one for macOS and one for Linux

Signed-off-by: Brennan Ashton <bashton@brennanashton.com>
2020-10-28 11:32:21 -07:00
Xiang Xiao 7901ad6959 tools/testbuild.sh: Support regular expression in blacklist
and prepend 'uname -s' to config for filtering config by host

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-10-28 00:18:03 -07:00
Xiang Xiao 1aed34182a tools/testbuild.sh: Don't support to change size_t type in datlist
since it doesn't need anymore with the follow patch:
commit e7d9260014
Author: Xiang Xiao <xiaoxiang@xiaomi.com>
Date:   Mon Feb 17 20:19:25 2020 +0800

    arch: Customize the typedef of size_t instead of intptr_t

    To ensure size_t same as toolchain definition in the first place and
    rename CXX_NEWLONG to ARCH_SIZET_LONG.  The change also check whether
    __SIZE_TYPE__ exist before CONFIG_ARCH_SIZET_LONG so our definition
    can align with toolchain(gcc/clang) definition automatically.

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-10-26 21:45:11 -07:00
Xiang Xiao a49a3eae51 tools: Remove the special handle for Ubuntu under Windows 10
since the Native Linux support could be reused for this case:
https://lists.apache.org/thread.html/r315682ed20bbeb2f1403cf592f892ef009274423189ffc5b3841a6a9%40%3Cdev.nuttx.apache.org%3E

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-10-18 11:48:19 -07:00
Matias N 7d16090d11 Fix testbuild.sh to actually fail when using -x. Leave -x out for CI
so that we detect all possible build errors for a job.
2020-09-13 10:29:13 -07:00
liuhaitao fc2e785165 testbuild.sh: suppress logs from configure stage in testbuild.sh
Since testbuild.sh called by nightly build and check build, it should
suppress logs from configure stage to keep all output clean.

Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
2020-07-16 15:40:46 +01:00
liuhaitao 102c4c25e2 tools/testbuild.sh: Call makefunc with JOPTION directly
Also call configure.sh with JOPTION to enable parallel build

Change-Id: I32c4e77fb30c40d8d424159cc0871b8c3e3f10b6
Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
2020-05-28 20:01:45 +08:00
liuhaitao 6a9b3de0bb tools/testbuild.sh: fix testbuild.sh called without -e option fail issue
As in https://github.com/apache/incubator-nuttx/issues/1114 discuss, let
EXTRA_FLAGS="EXTRAFLAGS=" defaultly to avoid testbuild.sh called without
-e option fail issue. It also works well with -e "-Wno-cpp -Werror".

Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
2020-05-26 07:03:21 -06:00
Xiang Xiao f2f1d4de85 toots/testbuild.sh: Remove .version manually after distclean
since distclean has to keep this file for the release package

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-04-28 21:28:15 -07:00
Xiang Xiao fc8522cc97 tools/testbuild.sh: check status after make distclean
ensure the distclean remove all generated stuff

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-04-21 16:15:48 -06:00
Xiang Xiao 95e5506637 tools/testbuild.sh: Verify nuttx/apps folder clean after build
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-04-20 07:07:32 -06:00
Xiang Xiao 48e6b97ca7 tools/testbuild.sh: Check defconfig in the canonical format
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-04-20 07:07:32 -06:00
Xiang Xiao 5c1497aeb1 tools: Remove the temp variable in checking program exit code
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-04-20 07:07:32 -06:00
liuhaitao ed7d1dc611 tools/testbuild.sh: update makefunc to hardcode make/extra flags options and redirection
Aim to let makefunc caller just pass in the target. So update makefunc to hardcode make/extra
flags options and redirection, meanwhile avoid the case in which makefunc would remove the quotes
for EXTRAFLAGS. Note that JOPTIONS should also hardcode once parallel build break finally fixed.

Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
2020-04-15 11:10:55 +08:00
liuhaitao 2427febba9 tools/testbuild.sh: add -e option to append extra c/c++ flags build support
Call 'tools/testbuild.sh -e -Wno-cpp testlist' would pass "EXTRAFLAGS=-Wno-cpp"
to make command line. Then it could suppress the warnings with pre-processor
directive #warning in GCC.

Change-Id: I61e5f9b3774149f64bdd625677cc9aabaa2fea90
Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
2020-04-11 08:31:08 -06:00
YAMAMOTO Takashi 8851d3a7d3 testbuild.sh: Make the use of "git clean" optional
Also, update the list of command line options in the help text.
2020-04-03 12:43:05 +08:00
YAMAMOTO Takashi 27142b2e3c testbuild.sh: Use git clean instead of make distclean
As the former is considerably faster.
2020-04-02 13:40:05 +08:00
YAMAMOTO Takashi 03715743a3 testbuild.sh: Add an option to show the list of configs
This was useful for me when tweaking testlists.
2020-04-01 14:04:37 +08:00
YAMAMOTO Takashi 4c0783353a tools/testbuild.sh: Make blacklist work on macOS
I couldn't find where "\b" was documented.
I guess it's a zero-width word boundary or something like that.
Anyway, it doesn't seem to work on macOS.
2020-03-29 09:39:11 +01:00
YAMAMOTO Takashi 35e1aa82cb tools/testbuild.sh: Allow spaces in comments 2020-03-28 11:23:42 -05:00
liuhaitao 272a1460c5 Revert "tools/testbuild.sh: suppress lots of stdout log from configure.sh"
f6fc87bc36 commit silence configure.sh
make output defautly, so revert it.

This reverts commit f0267aff33.
2020-03-23 22:04:27 -05:00
liuhaitao f0267aff33 tools/testbuild.sh: suppress lots of stdout log from configure.sh
Redirect configure.sh stdout to /dev/null to suppress lots of log
since configure.sh behaviour updated.

Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
2020-03-21 22:45:02 -05:00
Xiang Xiao 0456b70cd5 tools: Remove ; after break for all shell script
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-03-21 09:48:57 -07:00
Xiang Xiao 0d02168d28 toos/testbuild.sh: Remove the below warnning in nightly build
====================================================================================
Configuration/Tool: lm3s6432-s2e/nsh,CONFIG_ARMV7M_TOOLCHAIN_GNU_EABIL

Change-Id: I95cd6f0c00f68c68f9175574d44e75e24c41bc12
------------------------------------------------------------------------------------
  Cleaning...
  Configuring...
  Copy files
  Select CONFIG_HOST_LINUX=y
  Refreshing...
  Disabling CONFIG_ARMV7M_TOOLCHAIN_CODESOURCERYL
  Enabling CONFIG_ARMV7M_TOOLCHAIN_GNU_EABIL
  Refreshing...
.config:1542:warning: override: reassigning to symbol ARMV7M_TOOLCHAIN_GNU_EABIL
  Building NuttX...
------------------------------------------------------------------------------------
2020-03-07 09:32:39 -06:00
liuhaitao 58318bbc28 tools/testbuild.sh: prevent grep from exiting in case of nomatch
Prevent grep from exiting in case of nomatch for blacklist when testbuild.sh called
with -x option which set -e in bash.
2020-03-03 08:06:40 -06:00
liuhaitao ba265e90d6 tools/testbuild.sh: select size_t to different type by testlist
testbuild.sh select size_t to different type by testlist in which
CONFIG_ARCH_SIZET_LONG defined for ulong and -CONFIG_ARCH_SIZET_LONG
for uint.
2020-02-18 08:34:36 -06:00
Xiang Xiao e7d9260014 arch: Customize the typedef of size_t instead of intptr_t
To ensure size_t same as toolchain definition in the first place and rename CXX_NEWLONG to ARCH_SIZET_LONG.  The change also check whether __SIZE_TYPE__ exist before CONFIG_ARCH_SIZET_LONG so our definition can align with toolchain(gcc/clang) definition automatically.
2020-02-18 07:15:19 -06:00
liuhaitao 7ec66ccf94 Get the full directory name of the testbuild.sh no matter where called from
Change-Id: I00cab8d97acb8e436622c0bdd4bc4bfe7374bca3
Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
2020-02-10 09:01:35 -06:00
Gregory Nutt 20f29e60e3 tools/testbuild.sh: Remove bad line from usage help. 2020-02-09 20:05:44 +01:00
liuhaitao 48f1793a60 tools/testbuild.sh: make sure fail get the real return error value 2020-02-08 07:33:54 -06:00
liuhaitao 3b311ab895 tools/testbuild.sh: use function to call make and fail handle in common
Change-Id: I50cbc335254be0f2388b4bb6af8a874e74ba98c2
Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
2020-02-07 13:56:23 +01:00
liuhaitao 57099fe441 tools/testbuild.sh: update fail to return the error value instead 2020-02-02 08:13:15 -06:00