forked from Github/frigate
Integrate ccache into libusb and nginx build scripts for improved build speed (#6886)
* Add ccache to libusb and nginx build scripts * Add ccache support to Dockerfile for faster builds * Add ccache to PATH and use it for compiling nginx with Makefile in build_nginx.sh script
This commit is contained in:
committed by
GitHub
parent
d51197eaa2
commit
b6fce8f0bb
@@ -15,6 +15,10 @@ apt-get -yqq build-dep nginx
|
||||
|
||||
apt-get -yqq install --no-install-recommends ca-certificates wget
|
||||
update-ca-certificates -f
|
||||
apt install -y ccache
|
||||
|
||||
export PATH="/usr/lib/ccache:$PATH"
|
||||
|
||||
mkdir /tmp/nginx
|
||||
wget -nv https://nginx.org/download/nginx-${NGINX_VERSION}.tar.gz
|
||||
tar -zxf nginx-${NGINX_VERSION}.tar.gz -C /tmp/nginx --strip-components=1
|
||||
@@ -62,5 +66,5 @@ cd /tmp/nginx
|
||||
--add-module=../nginx-rtmp-module \
|
||||
--with-cc-opt="-O3 -Wno-error=implicit-fallthrough"
|
||||
|
||||
make -j$(nproc) && make install
|
||||
make CC="ccache gcc" -j$(nproc) && make install
|
||||
rm -rf /usr/local/nginx/html /usr/local/nginx/conf/*.default
|
||||
|
||||
Reference in New Issue
Block a user