Skip to content

Commit

Permalink
build: save ramdisk space on workers
Browse files Browse the repository at this point in the history
- move output files instead of copying them
- split build into two separately uploaded phases
  • Loading branch information
pktpls committed Nov 7, 2024
1 parent 9df4c78 commit 460b137
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions build/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ EOF
|& tee "bin/targets/$target/faillogs/$p.log" >&2

# if build resulted in image files, we can delete the log
cnt="$(find "bin/targets/$target" -name '*.bin' -or -name '*.img' -or -name '*.gz' | wc -l)"
cnt="$(find "bin/targets/$target" -name '*.bin' -or -name '*.img' -or -name '*.gz' -or -name '*.zst' -or -name '*.xz' | wc -l)"
if [ "$cnt" -gt 0 ] ; then
rm -v "bin/targets/$target/faillogs/$p.log"
fi
Expand All @@ -258,6 +258,7 @@ EOF
|& tee "$destdir/build.log" >&2


find "$ibdir/bin/targets/$target" \( -name '*.bin' -or -name '*.img' -or -name '*.gz' -or -name 'profiles.json' -or -name 'faillogs' \) -exec cp -avx '{}' "$destdir/" \;
find "$ibdir/bin/targets/$target" \( -name '*.bin' -or -name '*.img' -or -name '*.gz' -or -name '*.zst' -or -name '*.xz' -or -name 'profiles.json' \) -exec mv -v '{}' "$destdir/" \;
mv "$ibdir/bin/targets/$target/faillogs" "$destdir/"

echo "Done."

0 comments on commit 460b137

Please sign in to comment.