Skip to content

Commit 71372a6

Browse files
committed
Cleanup and refactored ccache steps
1 parent c27aacf commit 71372a6

File tree

1 file changed

+5
-29
lines changed

1 file changed

+5
-29
lines changed

.github/workflows/build-riscv-native.yml

Lines changed: 5 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -23,29 +23,18 @@ jobs:
2323
g++-14-riscv64-linux-gnu \
2424
ccache \
2525
cmake
26-
27-
- name: Setup ccache build environment
26+
27+
- name: Setup ccache
2828
run: |
29+
mkdir -p $HOME/.ccache
30+
ccache -M 5G -d $HOME/.ccache
2931
export CCACHE_LOGFILE=/home/runneruser/ccache_debug/ccache.log
3032
export CCACHE_DEBUGDIR="/home/runneruser/ccache_debug"
3133
echo "$GITHUB_WORKSPACE"
3234
echo "CCACHE_LOGFILE=$CCACHE_LOGFILE" >> $GITHUB_ENV
3335
echo "CCACHE_DEBUGDIR=$CCACHE_DEBUGDIR" >> $GITHUB_ENV
3436
echo "CCACHE_BASEDIR=$GITHUB_WORKSPACE" >> $GITHUB_ENV
35-
36-
- name: Setup ccache
37-
run: |
38-
mkdir -p $HOME/.ccache
39-
ccache -M 5G -d $HOME/.ccache
4037
echo "CCACHE_DIR=$HOME/.ccache" >> $GITHUB_ENV
41-
42-
- name: Zero the ccache stats
43-
run: |
44-
ccache -z
45-
46-
- name: Show ccache stats
47-
run: |
48-
ccache -s
4938
5039
- name: Build
5140
run: |
@@ -68,17 +57,4 @@ jobs:
6857
-DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY=ONLY \
6958
-DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=BOTH
7059
71-
cmake --build build --config Release -j $(nproc)
72-
73-
- name: Show ccache stats
74-
run: |
75-
ccache -s
76-
77-
- name: Print ccache log file
78-
run: |
79-
if [ -f $CCACHE_LOGFILE ]; then
80-
echo "CCACHE_LOGFILE content:"
81-
cat $CCACHE_LOGFILE
82-
else
83-
echo "CCACHE_LOGFILE does not exist."
84-
fi
60+
cmake --build build --config Release -j $(nproc)

0 commit comments

Comments
 (0)