@@ -733,16 +733,19 @@ 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' ,
737
- SCCACHE_REGION: 'us-east-1' ,
738
- SCCACHE_S3_USE_SSL: 'true' ,
739
- SCCACHE_S3_KEY_PREFIX: result + branch + server + arch + '${DRONE_PULL_REQUEST}' ,
740
- //SCCACHE_ERROR_LOG: '/tmp/sccache_log.txt',
741
- //SCCACHE_LOG: 'debug',
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
739
+ // SCCACHE_REGION: 'us-east-1',
740
+ // SCCACHE_S3_USE_SSL: 'true',
741
+ // SCCACHE_S3_KEY_PREFIX: result + branch + server + arch + '${DRONE_PULL_REQUEST}',
742
+ SCCACHE_ERROR_LOG: '/tmp/sccache_log.txt' ,
743
+ SCCACHE_LOG: 'sccache_debug.txt' ,
742
744
},
743
745
commands: [
744
746
'export CLICOLOR_FORCE=1' ,
745
747
get_sccache,
748
+ 'mkdir -p /tmp/sccache' ,
746
749
'mkdir /mdb/' + builddir + '/' + result,
747
750
748
751
'bash -c "set -o pipefail && bash /mdb/' + builddir + '/storage/columnstore/columnstore/build/bootstrap_mcs.sh ' +
@@ -752,7 +755,13 @@ local Pipeline(branch, platform, event, arch='amd64', server='10.6-enterprise')
752
755
'--server-version ' + server + ' | ' +
753
756
'/mdb/' + builddir + '/storage/columnstore/columnstore/build/ansi2txt.sh ' +
754
757
'/mdb/' + builddir + '/' + result + '/build.log"' ,
755
- 'sccache --show-stats' ,
758
+ 'sccache --show-adv-stats' ,
759
+
760
+ // if this is a nightly build, archive local sccache dir and upload it to S3
761
+ 'du -hs /tmp/sccache' ,
762
+ 'time tar -I pzstd -cf sccache.tar.zst /tmp/sccache' ,
763
+ 'time aws s3 cp sccache.tar.zst s3://cspkg/nightly-sccache/stable-23.10-' + server + '-' + arch + '-' + std.strReplace (platform, ':' , '-' ) + '/sccache.tar.zst' ,
764
+ 'echo "Nightly build cache uploaded to: s3://cspkg/nightly-sccache/stable-23.10-' + server + '-' + arch + '-' + std.strReplace (platform, ':' , '-' ) + '/sccache.tar.zst"' ,
756
765
757
766
// move engine and cmapi packages to one dir and make a repo
758
767
if (pkg_format == 'rpm' ) then "mv -v -t ./" + result + "/ /mdb/" + builddir + "/*.rpm /drone/src/cmapi/" + result + "/*.rpm && createrepo ./" + result
0 commit comments