From 21572864e73f38db10d3a3b08e52ee0d060ecf70 Mon Sep 17 00:00:00 2001 From: simbit18 <101105604+simbit18@users.noreply.github.com> Date: Thu, 14 Mar 2024 15:54:47 +0100 Subject: [PATCH] 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. --- .github/workflows/build.yml | 2 +- tools/ci/platforms/darwin.sh | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index fe741f142c..62d156b1f9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -197,7 +197,7 @@ jobs: cache-name: ${{ runner.os }}-cache-tools with: path: ./sources/tools - key: ${{ runner.os }}-tools-${{ hashFiles('./sources/nuttx/tools/ci/cibuild.sh') }} + 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 diff --git a/tools/ci/platforms/darwin.sh b/tools/ci/platforms/darwin.sh index f613a4de04..347c97e165 100755 --- a/tools/ci/platforms/darwin.sh +++ b/tools/ci/platforms/darwin.sh @@ -103,10 +103,12 @@ bloaty() { # https://github.com/google/bloaty/pull/326 git checkout 52948c107c8f81045e7f9223ec02706b19cfa882 mkdir -p "${NUTTXTOOLS}"/bloaty - cmake -D BLOATY_PREFER_SYSTEM_CAPSTONE=NO -DCMAKE_SYSTEM_PREFIX_PATH="${NUTTXTOOLS}"/bloaty - make install -j 4 + cmake -B build/bloaty -D BLOATY_PREFER_SYSTEM_CAPSTONE=NO -D CMAKE_INSTALL_PREFIX="${NUTTXTOOLS}"/bloaty + cmake --build build/bloaty + cmake --build build/bloaty --target install cd "${NUTTXTOOLS}" rm -rf bloaty-src + ls -a "${NUTTXTOOLS}"/bloaty fi command bloaty --version