-
Notifications
You must be signed in to change notification settings - Fork 93
/
ci-benchmark-upload-report.sh
28 lines (22 loc) · 1.09 KB
/
ci-benchmark-upload-report.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
#!/usr/bin/env bash
set -e
PROJECT_PATH="$(pwd)/unity-renderer"
echo "Uploading Benchmark Report for $PROJECT_PATH"
wget https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
dpkg -i packages-microsoft-prod.deb
rm packages-microsoft-prod.deb
apt-get update; \
apt-get install -y apt-transport-https && \
apt-get update && \
apt-get install -y dotnet-sdk-3.1 unzip
cd ${PROJECT_PATH}
mkdir -p reporter && cd reporter
wget https://github.com/Unity-Technologies/PerformanceBenchmarkReporter/releases/download/1.2.0/UnityPerformanceBenchmarkReporter_1_2_0.zip -O UnityPerformanceBenchmarkReporter.zip
unzip UnityPerformanceBenchmarkReporter.zip
rm UnityPerformanceBenchmarkReporter.zip
dotnet UnityPerformanceBenchmarkReporter.dll --results="$PROJECT_PATH/benchmark-results.xml" --reportdirpath=output
mkdir -p output
cp "$PROJECT_PATH/benchmark-results.xml" output/UnityPerformanceBenchmark/
cd output/UnityPerformanceBenchmark/
mv UnityPerformanceBenchmark*.html index.html
aws s3 sync ./ "s3://${S3_BUCKET}/branch-benchmark/${CIRCLE_BRANCH}" --acl public-read