Skip to content

Commit

Permalink
MISC: use ccache to speedup building
Browse files Browse the repository at this point in the history
Signed-off-by: Stefan Westerfeld <[email protected]>
  • Loading branch information
swesterfeld committed Jun 20, 2024
1 parent f46ac08 commit 8861ece
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion misc/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ FROM gcc:latest
RUN wget https://launchpad.net/~kxstudio-debian/+archive/kxstudio/+files/kxstudio-repos_11.1.0_all.deb
RUN dpkg -i kxstudio-repos_11.1.0_all.deb
RUN apt-get update && apt-get install -y \
libsndfile1-dev libfftw3-dev libao-dev autoconf-archive clang \
libsndfile1-dev libfftw3-dev libao-dev autoconf-archive clang ccache \
qtbase5-dev qtbase5-dev-tools qttools5-dev-tools \
lv2-dev libjack-jackd2-dev lv2lint gettext python3-scipy

Expand Down
2 changes: 1 addition & 1 deletion misc/Dockerfile-arch
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ RUN pacman -Syu --noconfirm
RUN pacman -S --noconfirm \
gcc clang make automake autoconf libtool pkg-config \
libsndfile fftw autoconf-archive qt5-base libao \
jack2 cairo lv2lint python3 python-scipy
jack2 cairo lv2lint python3 python-scipy ccache

ADD . /spectmorph
WORKDIR /spectmorph
7 changes: 5 additions & 2 deletions misc/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,11 @@ build()
# fail in make check if UB sanitizer produces error
export UBSAN_OPTIONS=halt_on_error=1

export CCACHE_DIR=/output/ccache
export CCACHE_MAXSIZE=1G

# Tests using gcc
export CC=gcc CXX=g++
export CC="ccache gcc" CXX="ccache g++"

build "$@" --enable-debug-cxx

Expand All @@ -43,7 +46,7 @@ fi
make -j `nproc` distcheck

# Tests clang
export CC=clang CXX=clang++
export CC="ccache clang" CXX="ccache clang++"

build "$@"

Expand Down

0 comments on commit 8861ece

Please sign in to comment.