@@ -733,12 +733,14 @@ local Pipeline(branch, platform, event, arch='amd64', server='10.6-enterprise')
733
733
AWS_SECRET_ACCESS_KEY: {
734
734
from_secret: 'aws_secret_access_key' ,
735
735
},
736
- SCCACHE_BUCKET: 'cs-sccache' ,
736
+ SCCACHE_DIR: '/tmp/sccache' , // local cache for sccache
737
+ SCCACHE_CACHE_SIZE: '20G' ,
738
+ SCCACHE_BUCKET: 'cs-sccache' , // remote S3 cache in case we have a local miss
737
739
SCCACHE_REGION: 'us-east-1' ,
738
740
SCCACHE_S3_USE_SSL: 'true' ,
739
741
SCCACHE_S3_KEY_PREFIX: result + branch + server + arch + '${DRONE_PULL_REQUEST}' ,
740
- // SCCACHE_ERROR_LOG: '/tmp/sccache_log.txt',
741
- // SCCACHE_LOG: 'debug ',
742
+ SCCACHE_ERROR_LOG: '/tmp/sccache_log.txt' ,
743
+ SCCACHE_LOG: '/tmp/sccache_debug.txt ' ,
742
744
},
743
745
commands: [
744
746
'export CLICOLOR_FORCE=1' ,
@@ -752,7 +754,13 @@ local Pipeline(branch, platform, event, arch='amd64', server='10.6-enterprise')
752
754
'--server-version ' + server + ' | ' +
753
755
'/mdb/' + builddir + '/storage/columnstore/columnstore/build/ansi2txt.sh ' +
754
756
'/mdb/' + builddir + '/' + result + '/build.log"' ,
755
- 'sccache --show-stats' ,
757
+ 'sccache --show-adv-stats' ,
758
+
759
+ // if this is a nightly build, archive local sccache dir and upload it to S3
760
+ 'du -hs /tmp/sccache' ,
761
+ 'time tar -I pzstd -cf sccache.tar.zst /tmp/sccache' ,
762
+ 'time aws s3 cp sccache.tar.zst s3://cspkg/nightly-sccache/stable-23.10-' + server + '-' + arch + '-' + std.strReplace (platform, ':' , '-' ) + '/sccache.tar.zst' ,
763
+ 'echo "Nightly build cache uploaded to: s3://cspkg/nightly-sccache/stable-23.10-' + server + '-' + arch + '-' + std.strReplace (platform, ':' , '-' ) + '/sccache.tar.zst"' ,
756
764
757
765
// move engine and cmapi packages to one dir and make a repo
758
766
if (pkg_format == 'rpm' ) then "mv -v -t ./" + result + "/ /mdb/" + builddir + "/*.rpm /drone/src/cmapi/" + result + "/*.rpm && createrepo ./" + result
0 commit comments