Skip to content

Commit 3289e6e

Browse files
committed
Optimize ccache configuration for faster Node.js builds
- Increase ccache max size from default to 10GB - Enable aggressive hash matching with hash_dir=false - Configure sloppiness settings for improved cache hit rates - Display cache configuration for debugging purposes These settings reduce cache misses and improve build performance for Node.js static compilation.
1 parent 8796300 commit 3289e6e

2 files changed

Lines changed: 16 additions & 0 deletions

File tree

.github/workflows/dockerimage.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,14 @@ jobs:
3636
uses: hendrikmuhs/ccache-action@v1.2
3737
with:
3838
key: ${{ matrix.os }}-${{ matrix.platform }}
39+
max-size: 10G
40+
41+
- name: Configure ccache
42+
run: |
43+
ccache --set-config=max_size=10G
44+
ccache --set-config=sloppiness=time_macros,locale,include_file_ctime,include_file_mtime
45+
ccache --set-config=hash_dir=false
46+
ccache -p
3947
4048
- name: Get latest node version
4149
run: echo "LATEST_VERSION=$(curl -fsSLo- --compressed https://nodejs.org/dist/index.json | jq '.[].version' | tr -d '"' | tr -d 'v' | head -1)" >> $GITHUB_ENV

.github/workflows/update-current-image.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,14 @@ jobs:
6565
uses: hendrikmuhs/ccache-action@v1.2
6666
with:
6767
key: ${{ matrix.os }}-${{ matrix.platform }}
68+
max-size: 10G
69+
70+
- name: Configure ccache
71+
run: |
72+
ccache --set-config=max_size=10G
73+
ccache --set-config=sloppiness=time_macros,locale,include_file_ctime,include_file_mtime
74+
ccache --set-config=hash_dir=false
75+
ccache -p
6876
6977
- name: Show NODE_VERSION
7078
run: echo $NODE_VERION

0 commit comments

Comments
 (0)