Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
microsoft
GitHub Repository: microsoft/CyberBattleSim
Path: blob/main/notebooks/publish_benchmarks.sh
597 views
1
# Push the latest benchmark run to git under the tag 'latest_benchmark'
2
# and a daily tag with the date
3
set -ex
4
5
THIS_DIR=$(dirname "$0")
6
7
BENCHMARK_DIR=$THIS_DIR/benchmarks
8
9
10
mkdir -p $BENCHMARK_DIR
11
12
cp -r $THIS_DIR/output/benchmark/* $BENCHMARK_DIR/
13
14
git add $BENCHMARK_DIR
15
16
# if there are no changes, push to git
17
if [ -z "$(git status --porcelain)" ]; then
18
echo "No changes to commit"
19
else
20
git commit -m "latest benchmark"
21
fi
22
23
# push the changes to git under tag 'latest_benchmark'
24
git tag -f latest_benchmark
25
git push -f origin latest_benchmark
26
27
# create a daily tag with the date
28
tagname=benchmark-$(date +%Y-%m-%d)
29
git tag -f $tagname
30
git push -f origin $tagname
31
32