Skip to content

Commit

Permalink
gha: move ccache command invocation to container
Browse files Browse the repository at this point in the history
The host doesn't have ccache installed anymore

Signed-off-by: Ivo Jimenez <[email protected]>
  • Loading branch information
ivotron committed Nov 1, 2021
1 parent 210e311 commit 4534358
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
13 changes: 3 additions & 10 deletions .github/workflows/redpanda-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,20 +43,13 @@ jobs:

- name: build & test
run: |
export CCACHE_COMPRESS=true
export CCACHE_COMPRESSLEVEL=6
export CCACHE_MAXSIZE=200M
ccache -p # print the config
ccache -s # print the stats before reusing
ccache -z # zero the stats
docker run --rm \
-e CCACHE_COMPRESS=true \
-e CCACHE_COMPRESSLEVEL=6 \
-e CCACHE_MAXSIZE=200M \
--privileged \
--ipc=host \
-v $PWD:$PWD \
-w $PWD \
rp-toolchain \
./build.sh
ccache -s # print the stats after the build
10 changes: 9 additions & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ if [[ -z ${CCACHE_DIR} && -e /dev/shm ]]; then
export CCACHE_DIR=/dev/shm/redpanda
fi

ccache -p # print the config
ccache -s # print the stats before reusing
ccache -z # zero the stats

# Change Debug via -DCMAKE_BUILD_TYPE=Debug
cmake -DCMAKE_BUILD_TYPE=Release \
-B$root/build \
Expand All @@ -28,4 +32,8 @@ cmake -DCMAKE_BUILD_TYPE=Release \
-DDEPOT_TOOLS_DIR=$DEPOT_TOOLS_DIR \
"$@"

(cd $root/build && ninja && ctest --output-on-failure -R _rpunit)
(cd $root/build && ninja)

ccache -s # print the stats after the build

(cd $root/build && ctest --output-on-failure -R _rpunit)

0 comments on commit 4534358

Please sign in to comment.