diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5a428645..90d97014 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -63,6 +63,11 @@ jobs: with: submodules: true + - name: ccache + uses: hendrikmuhs/ccache-action@v1.2 + with: + key: ${{ matrix.gcc_ver }} + - name: Create LFS file hash list run: git -C third_party/silabs/gecko_sdk lfs ls-files -l | cut -d' ' -f1 | sort > .lfs-assets-id diff --git a/script/bootstrap b/script/bootstrap index e2694c2c..9b64de4a 100755 --- a/script/bootstrap +++ b/script/bootstrap @@ -48,6 +48,7 @@ install_packages_apt() # Install dependencies sudo apt-get update apt_packages=( + ccache coreutils git git-lfs @@ -77,6 +78,7 @@ install_packages_brew() echo 'Installing script dependencies...' brew_packages=( + ccache coreutils git git-lfs diff --git a/script/build b/script/build index 7793bc41..488f225d 100755 --- a/script/build +++ b/script/build @@ -220,7 +220,9 @@ build_soc() -DOT_APP_RCP=OFF \ -DOT_COMPILE_WARNING_AS_ERROR=ON \ "$@" "${repo_dir}" \ - --graphviz=graph.dot + --graphviz=graph.dot \ + -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ + -DCMAKE_C_COMPILER_LAUNCHER=ccache ninja "${soc_targets[@]}"