diff --git a/Jenkinsfile.gitian b/Jenkinsfile.gitian index f695706fb9..793d488071 100644 --- a/Jenkinsfile.gitian +++ b/Jenkinsfile.gitian @@ -117,6 +117,8 @@ for(int i = 0; i < targets.size(); i++) { archiveArtifacts artifacts: 'dashcore-binaries/*', fingerprint: true } + // TODO remove this in a few days (only needed to prune the old compressed file from Jenkins caches) + sh "cd gitian-builder/cache && find -name ccache.tar.gz | xargs rm -f" sh "cd gitian-builder/cache && tar czfv ../../cache-${gitianDescriptor.name}.tar.gz common ${gitianDescriptor.name}" archiveArtifacts artifacts: "cache-${gitianDescriptor.name}.tar.gz", fingerprint: true } diff --git a/contrib/gitian-descriptors/gitian-linux.yml b/contrib/gitian-descriptors/gitian-linux.yml index 6fcda56465..39523dfc31 100755 --- a/contrib/gitian-descriptors/gitian-linux.yml +++ b/contrib/gitian-descriptors/gitian-linux.yml @@ -61,12 +61,15 @@ script: | export CCACHE_DIR=${GBUILD_PACKAGE_CACHE}/ccache # As we later wrap the gcc binaries, this is fast export CCACHE_COMPILERCHECK="content" - if [ -f ${GBUILD_PACKAGE_CACHE}/ccache.tar.gz ]; then + if [ -f ${GBUILD_PACKAGE_CACHE}/ccache.tar ]; then pushd ${GBUILD_PACKAGE_CACHE} - tar xzf ccache.tar.gz - rm ccache.tar.gz + tar xf ccache.tar + rm ccache.tar popd fi + # instead of compressing ccache.tar, we let ccache handle it by itself + # Otherwise we end up uncompressing/compressing a lot of cache files which we actually never use + export CCACHE_COMPRESS=1 else CONFIGFLAGS="${CONFIGFLAGS} --disable-ccache" fi @@ -212,7 +215,7 @@ script: | # Compress ccache (otherwise the assert file will get too huge) if [ "$CCACHE_DIR" != "" ]; then pushd ${GBUILD_PACKAGE_CACHE} - tar czf ccache.tar.gz ccache + tar cf ccache.tar ccache rm -rf ccache popd fi diff --git a/contrib/gitian-descriptors/gitian-osx.yml b/contrib/gitian-descriptors/gitian-osx.yml index 80fba15d85..5c17c5b466 100644 --- a/contrib/gitian-descriptors/gitian-osx.yml +++ b/contrib/gitian-descriptors/gitian-osx.yml @@ -55,12 +55,15 @@ script: | # Setup ccache to use correct cache directories CONFIGFLAGS="${CONFIGFLAGS} --enable-ccache" export CCACHE_DIR=${GBUILD_PACKAGE_CACHE}/ccache - if [ -f ${GBUILD_PACKAGE_CACHE}/ccache.tar.gz ]; then + if [ -f ${GBUILD_PACKAGE_CACHE}/ccache.tar ]; then pushd ${GBUILD_PACKAGE_CACHE} - tar xzf ccache.tar.gz - rm ccache.tar.gz + tar xf ccache.tar + rm ccache.tar popd fi + # instead of compressing ccache.tar, we let ccache handle it by itself + # Otherwise we end up uncompressing/compressing a lot of cache files which we actually never use + export CCACHE_COMPRESS=1 else CONFIGFLAGS="${CONFIGFLAGS} --disable-ccache" fi @@ -176,7 +179,7 @@ script: | # Compress ccache (otherwise the assert file will get too huge) if [ "$CCACHE_DIR" != "" ]; then pushd ${GBUILD_PACKAGE_CACHE} - tar czf ccache.tar.gz ccache + tar cf ccache.tar ccache rm -rf ccache popd fi diff --git a/contrib/gitian-descriptors/gitian-win.yml b/contrib/gitian-descriptors/gitian-win.yml index ccb36c7bbc..6d1b673a37 100755 --- a/contrib/gitian-descriptors/gitian-win.yml +++ b/contrib/gitian-descriptors/gitian-win.yml @@ -53,12 +53,15 @@ script: | export CCACHE_DIR=${GBUILD_PACKAGE_CACHE}/ccache # As we later wrap the gcc binaries, this is fast export CCACHE_COMPILERCHECK="content" - if [ -f ${GBUILD_PACKAGE_CACHE}/ccache.tar.gz ]; then + if [ -f ${GBUILD_PACKAGE_CACHE}/ccache.tar ]; then pushd ${GBUILD_PACKAGE_CACHE} - tar xzf ccache.tar.gz - rm ccache.tar.gz + tar xf ccache.tar + rm ccache.tar popd fi + # instead of compressing ccache.tar, we let ccache handle it by itself + # Otherwise we end up uncompressing/compressing a lot of cache files which we actually never use + export CCACHE_COMPRESS=1 else CONFIGFLAGS="${CONFIGFLAGS} --disable-ccache" fi @@ -200,7 +203,7 @@ script: | # Compress ccache (otherwise the assert file will get too huge) if [ "$CCACHE_DIR" != "" ]; then pushd ${GBUILD_PACKAGE_CACHE} - tar czf ccache.tar.gz ccache + tar cf ccache.tar ccache rm -rf ccache popd fi