-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathbuild-and-test-in-docker.sh
More file actions
45 lines (39 loc) · 1.77 KB
/
build-and-test-in-docker.sh
File metadata and controls
45 lines (39 loc) · 1.77 KB
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#!/usr/bin/env bash
export SKIP_POSIXRESOURCESUSAGE_ASSERTS=True
set -e
apt-get update -q; apt-get install -y wget p7zip-full sudo procps bsdutils util-linux lshw;
script=https://raw.githubusercontent.com/devizer/test-and-build/master/install-build-tools-bundle.sh; (wget -q -nv --no-check-certificate -O - $script 2>/dev/null || curl -ksSL $script) | bash;
Say "ENVIRONMENT"; printenv | sort
Say "MEMORY INFO"; free -m;
Say "BLOCK STORAGE DEVICES"; sudo fdisk -l || true;
Say "MOUNTS"; df -h -T
Say "LS CPU"; lscpu || true
Say "7Z BENCHMARK";
if [[ $(uname -m) == armv7* ]]; then
7z -mmt1 b || true
else
7z b || true
fi
if [[ $(uname -m) == armv8l ]]; then
Say "ABORT! armel arch is not supported by .NET CORE"
exit 0;
fi
apt-get install -yq locales systemd apt-utils apt-transport-https ca-certificates curl libcurl3 gnupg2 software-properties-common htop mc lsof unzip net-tools bsdutils sudo p7zip-full wget git time ncdu tree procps p7zip-full jq pv;
apt-get clean;
if [[ $(uname -m) != armv8l ]]; then
script=https://raw.githubusercontent.com/devizer/test-and-build/master/lab/install-DOTNET.sh; (wget -q -nv --no-check-certificate -O - $script 2>/dev/null || curl -ksSL $script) | bash;
else
Say "net core for arm?"
DOTNET_Url=https://dot.net/v1/dotnet-install.sh;
try-and-retry curl -o /tmp/_dotnet-install.sh -ksSL $DOTNET_Url
for v in 2.1 2.2 3.0 3.1; do
Say ".NET Core $v for arm 32 bit"
time try-and-retry timeout 666 sudo -E bash /tmp/_dotnet-install.sh -c $v -i /usr/share/dotnet --architecture arm
done
fi
sudo ln -f -s /usr/share/dotnet/dotnet /usr/local/bin/dotnet || true
file /usr/share/dotnet/dotnet || true
file /usr/local/bin/dotnet || true
Say "TESTING Universe.CpuUsage"
dotnet test -f netcoreapp2.2
Show-System-Stat