7373
7474 # https://github.com/Open-CMSIS-Pack/devtools-build-action
7575 - name : Build
76- uses : Open-CMSIS-Pack/devtools-build-action@1f131b70796337c98d4f680632bb4135d90f17f0 # arm64
76+ uses : Open-CMSIS-Pack/devtools-build-action@b65bc4de97d7911296c566858f0087a7bbee0508 # tool-install
7777 id : devtools-build
7878 with :
7979 target : cbuildgen
@@ -366,10 +366,20 @@ jobs:
366366 - name : Install macos deps
367367 if : ${{ startsWith(matrix.runs_on, 'macos') }}
368368 run : |
369- brew install \
370- dos2unix \
371- ninja \
372- wget
369+ # Installing dos2unix, ninja, wget (Only when missing)
370+ missing=()
371+ for pkg in dos2unix ninja wget; do
372+ brew list --formula "$pkg" >/dev/null 2>&1 || missing+=("$pkg")
373+ done
374+
375+ if [ "${#missing[@]}" -gt 0 ]; then
376+ if ! brew install "${missing[@]}"; then
377+ echo "::error::Failed to install Homebrew packages: ${missing[*]}"
378+ exit 1
379+ fi
380+ else
381+ echo "All required Homebrew packages are already installed."
382+ fi
373383
374384 - name : Install linux deps
375385 if : ${{ startsWith(matrix.runs_on, 'ubuntu') }}
@@ -389,11 +399,11 @@ jobs:
389399 with :
390400 submodules : true
391401
392- - name : Cache ARM GCC
393- uses : actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
394- with :
395- key : " ${{ matrix.arm_gcc_install_base }}/${{ matrix.installer_name }}"
396- path : ${{ matrix.installer_name }}
402+ # - name: Cache ARM GCC
403+ # uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
404+ # with:
405+ # key: "${{ matrix.arm_gcc_install_base }}/${{ matrix.installer_name }}"
406+ # path: ${{ matrix.installer_name }}
397407
398408 - name : Setup ARM GCC for Ubuntu and macOS
399409 if : ${{ startsWith(matrix.runs_on, 'macos') || startsWith(matrix.runs_on, 'ubuntu') }}
@@ -438,7 +448,7 @@ jobs:
438448
439449 # https://github.com/Open-CMSIS-Pack/devtools-build-action
440450 - name : Build CbuildUnitTests
441- uses : Open-CMSIS-Pack/devtools-build-action@1f131b70796337c98d4f680632bb4135d90f17f0 # arm64
451+ uses : Open-CMSIS-Pack/devtools-build-action@b65bc4de97d7911296c566858f0087a7bbee0508 # tool-install
442452 with :
443453 target : CbuildUnitTests
444454 build_type : Debug
@@ -460,7 +470,7 @@ jobs:
460470
461471 # https://github.com/Open-CMSIS-Pack/devtools-build-action
462472 - name : Build CbuildIntegTests
463- uses : Open-CMSIS-Pack/devtools-build-action@1f131b70796337c98d4f680632bb4135d90f17f0 # arm64
473+ uses : Open-CMSIS-Pack/devtools-build-action@b65bc4de97d7911296c566858f0087a7bbee0508 # tool-install
464474 with :
465475 target : CbuildIntegTests
466476 build_type : Debug
@@ -548,13 +558,13 @@ jobs:
548558 test -f ${{ env.installer_name }} || wget -q ${{ env.arm_gcc_install_base }}/${{ env.installer_name }}
549559 tar -xvf ${{ env.installer_name }}
550560
551- - name : Cache CMSIS Pack
552- uses : actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
553- env :
554- CACHE_NAME : cmsis_pack
555- with :
556- key : ${{ env.CACHE_NAME }}-${{ runner.os }}
557- path : ${{ env.CMSIS_PACK_ROOT }}
561+ # - name: Cache CMSIS Pack
562+ # uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
563+ # env:
564+ # CACHE_NAME: cmsis_pack
565+ # with:
566+ # key: ${{ env.CACHE_NAME }}-${{ runner.os }}
567+ # path: ${{ env.CMSIS_PACK_ROOT }}
558568
559569 - name : Build and run buildmgr tests
560570 run : |
0 commit comments