Skip to content

Commit

Permalink
[script] add ccache to build script to speed up builds when possible
Browse files Browse the repository at this point in the history
  • Loading branch information
lmnotran committed May 28, 2024
1 parent eaf5110 commit 30b4ef5
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,11 @@ jobs:
with:
submodules: true

- name: ccache
uses: hendrikmuhs/[email protected]
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

Expand Down
2 changes: 2 additions & 0 deletions script/bootstrap
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ install_packages_apt()
# Install dependencies
sudo apt-get update
apt_packages=(
ccache
coreutils
git
git-lfs
Expand Down Expand Up @@ -77,6 +78,7 @@ install_packages_brew()
echo 'Installing script dependencies...'

brew_packages=(
ccache
coreutils
git
git-lfs
Expand Down
4 changes: 3 additions & 1 deletion script/build
Original file line number Diff line number Diff line change
Expand Up @@ -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[@]}"

Expand Down

0 comments on commit 30b4ef5

Please sign in to comment.