This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git
The following commit(s) were added to refs/heads/master by this push:
new 5080ab7818 tools/ci/platforms/darwin.sh: Port NuttX CI Job to macOS-14
5080ab7818 is described below
commit 5080ab7818b17f4cbea70a680e1d10e3f04c56ed
Author: simbit18 <[email protected]>
AuthorDate: Thu Nov 7 11:52:10 2024 +0100
tools/ci/platforms/darwin.sh: Port NuttX CI Job to macOS-14
also runs old CI Job macOS-13
---
tools/ci/platforms/darwin.sh | 30 ++++++++++++++++++++++++------
1 file changed, 24 insertions(+), 6 deletions(-)
diff --git a/tools/ci/platforms/darwin.sh b/tools/ci/platforms/darwin.sh
index b300d94b2f..a435d39d0e 100755
--- a/tools/ci/platforms/darwin.sh
+++ b/tools/ci/platforms/darwin.sh
@@ -31,6 +31,7 @@
set -e
set -o xtrace
+osarch=$(uname -m)
add_path() {
PATH=$1:${PATH}
@@ -80,16 +81,29 @@ avr_gcc_toolchain() {
command avr-gcc --version
}
+autoconf_brew() {
+ if ! type autoconf > /dev/null 2>&1; then
+ brew install autoconf
+ fi
+
+ command autoconf --version
+}
+
binutils() {
- mkdir -p "${NUTTXTOOLS}"/bintools/bin
add_path "${NUTTXTOOLS}"/bintools/bin
if ! type objcopy > /dev/null 2>&1; then
brew install binutils
+ mkdir -p "${NUTTXTOOLS}"/bintools/bin
# It is possible we cached prebuilt but did brew install so recreate
# symlink if it exists
- rm -f "${NUTTXTOOLS}"/bintools/bin/objcopy
- ln -s /usr/local/opt/binutils/bin/objcopy
"${NUTTXTOOLS}"/bintools/bin/objcopy
+ if [ "X$osarch" == "Xarm64" ]; then
+ rm -f "${NUTTXTOOLS}"/bintools/bin/objcopy
+ ln -s /opt/homebrew/opt/binutils/bin/objcopy
"${NUTTXTOOLS}"/bintools/bin/objcopy
+ else
+ rm -f "${NUTTXTOOLS}"/bintools/bin/objcopy
+ ln -s /usr/local/opt/binutils/bin/objcopy
"${NUTTXTOOLS}"/bintools/bin/objcopy
+ fi
fi
command objcopy --version
@@ -105,7 +119,7 @@ bloaty() {
# https://github.com/google/bloaty/pull/326
git checkout 52948c107c8f81045e7f9223ec02706b19cfa882
mkdir -p "${NUTTXTOOLS}"/bloaty
- cmake -B build/bloaty -D BLOATY_PREFER_SYSTEM_CAPSTONE=NO -D
CMAKE_INSTALL_PREFIX="${NUTTXTOOLS}"/bloaty
+ cmake -B build/bloaty -GNinja -D BLOATY_PREFER_SYSTEM_CAPSTONE=NO -D
CMAKE_INSTALL_PREFIX="${NUTTXTOOLS}"/bloaty
cmake --build build/bloaty
cmake --build build/bloaty --target install
cd "${NUTTXTOOLS}"
@@ -205,7 +219,11 @@ python_tools() {
echo "export PIP_USER=yes" >> "${NUTTXTOOLS}"/env.sh
echo "export PYTHONUSERBASE=${NUTTXTOOLS}/pylocal" >> "${NUTTXTOOLS}"/env.sh
add_path "${PYTHONUSERBASE}"/bin
-
+
+ if [ "X$osarch" == "Xarm64" ]; then
+ python3 -m venv --system-site-packages /opt/homebrew
+ fi
+
# workaround for Cython issue
# https://github.com/yaml/pyyaml/pull/702#issuecomment-1638930830
pip3 install "Cython<3.0"
@@ -361,7 +379,7 @@ install_build_tools() {
mkdir -p "${NUTTXTOOLS}"
echo "#!/usr/bin/env sh" > "${NUTTXTOOLS}"/env.sh
- install="arm_gcc_toolchain arm64_gcc_toolchain avr_gcc_toolchain binutils
bloaty elf_toolchain gen_romfs gperf kconfig_frontends mips_gcc_toolchain
ninja_brew python_tools riscv_gcc_toolchain rust dlang zig
xtensa_esp32_gcc_toolchain u_boot_tools util_linux wasi_sdk c_cache"
+ install="ninja_brew autoconf_brew arm_gcc_toolchain arm64_gcc_toolchain
avr_gcc_toolchain binutils bloaty elf_toolchain gen_romfs gperf
kconfig_frontends mips_gcc_toolchain python_tools riscv_gcc_toolchain rust
dlang zig xtensa_esp32_gcc_toolchain u_boot_tools util_linux wasi_sdk c_cache"
mkdir -p "${NUTTXTOOLS}"/homebrew
export HOMEBREW_CACHE=${NUTTXTOOLS}/homebrew