Skip to content

Commit cfd2c13

Browse files
galakstephanosio
authored andcommitted
ci: implement simple package cache
sync tarball of sources on S3 to use as a simple cache of these packages so we don't have to download them from the internet everytime. We have to special case xtensa because of how the build dirs for it work. Signed-off-by: Kumar Gala <[email protected]>
1 parent c003a39 commit cfd2c13

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

.buildkite/download.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,10 @@ steps:
55
command:
66
- buildkite-agent artifact download crosstool.linux.x86_64.tar.bz2 .
77
- tar xf crosstool.linux.x86_64.tar.bz2
8+
- aws s3 sync s3://builds.zephyrproject.org/sdk/cache/ build/output/sources
89
- export CT_ONLY_DOWNLOAD=y
910
- ./go.sh arm
10-
- buildkite-agent artifact upload "build/output/sources/*"
11+
- aws s3 sync build/output/sources s3://builds.zephyrproject.org/sdk/cache/
1112
env:
1213
BUILDKITE_CLEAN_CHECKOUT: "true"
1314
plugins:

.buildkite/pipeline-template.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,16 @@ steps:
4141
16) TARGET="arc64";;
4242
esac
4343
- buildkite-agent artifact download crosstool.$OS.$MACHINE.tar.bz2 .
44-
- buildkite-agent artifact download build/output/sources/* .
44+
- >
45+
case "$${TARGET}" in
46+
xtensa_*)
47+
TARGET_DIR="xtensa/$${TARGET#xtensa_}/"
48+
aws s3 sync s3://builds.zephyrproject.org/sdk/cache/ build/output/$${TARGET_DIR}/sources
49+
;;
50+
*)
51+
aws s3 sync s3://builds.zephyrproject.org/sdk/cache/ build/output/sources
52+
;;
53+
esac
4554
- tar xf crosstool.$OS.$MACHINE.tar.bz2
4655
- ./go.sh $${TARGET}
4756
- >

0 commit comments

Comments
 (0)