Skip to content
This repository has been archived by the owner on Jan 7, 2022. It is now read-only.

Commit

Permalink
buildbot: Archive successful builds.
Browse files Browse the repository at this point in the history
Successful builds are tarred up and placed in /opt/ykrustc-bin-snapshots
on the build master.

For now, store at most one archive, but we might change that in the
future.
  • Loading branch information
vext01 committed Apr 23, 2019
1 parent 6e62d50 commit 51e7587
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .buildbot.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,23 @@
#
# Build script for continuous integration.

set -e

# Ensure the build fails if it uses excessive amounts of memory.
ulimit -d $((1024 * 1024 * 8)) # 8 GiB

# Note that the gdb must be Python enabled.
/usr/bin/time -v env PATH=/opt/gdb-8.2/bin:${PATH} \
RUST_BACKTRACE=1 ./x.py test --config .buildbot.toml

# Archive the build and put it in /opt
TARBALL_TOPDIR=ykrustc-stage2
TARBALL_NAME=ykrustc-stage2-latest.tar.bz2
SNAP_DIR=/opt/ykrustc-bin-snapshots

cd build/x86_64-unknown-linux-gnu
ln -sf stage2 ${TARBALL_TOPDIR}
git show -s HEAD > ${TARBALL_TOPDIR}/VERSION
tar hjcvf ${TARBALL_NAME} ${TARBALL_TOPDIR}
chmod 775 ${TARBALL_NAME}
mv ${TARBALL_NAME} ${SNAP_DIR} # Overwrites any old archive.

0 comments on commit 51e7587

Please sign in to comment.