forked from rust-lang/rustc-perf
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcollect.sh
executable file
·30 lines (22 loc) · 849 Bytes
/
collect.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/bash
# This script expects SITE_URL and DATABASE to be defined in the environment
set -u -o pipefail
echo "Running collector targeting $SITE_URL"
export RUST_LOG=collector=trace,collector::sysroot=debug
export PATH="/home/collector/.cargo/bin:$PATH"
while : ; do
# Update and rebuild the collector.
git pull
git reset --hard @{upstream}
# Make sure we have a recent build, so that we can successfully build
# the collector.
rustup update
cargo +nightly build --release -p collector
target/release/collector bench_next $SITE_URL --self-profile --bench-rustc --db $DATABASE
STATUS=$?
echo finished run at `date` with exit code $STATUS
# Wait a bit if the command has failed.
if [ $STATUS -ne 0 ]; then
sleep 120
fi
done