aboutsummaryrefslogtreecommitdiff
path: root/release/run.sh
blob: db4cf7b1a4c11028d4f9e99fc0d5bb38b8e9e4d8 (plain)
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
#!/usr/bin/env bash

syntax="Syntax: $0 REL RC"

if [[ $1 = '' ]]; then
  echo "$syntax"
  exit 1
fi
REL="$1"
shift
if [[ $1 = 'final' ]]; then
  RC="-final"
elif [[ $1 != '' ]]; then
  RC="-rc $1"
else
  echo "Syntax: $0 REL RC"
  exit 1
fi

aarch64=$(egrep '(AArch64|asimd)' /proc/cpuinfo)
armv7=$(grep ARMv7 /proc/cpuinfo)
intel=$(grep Intel /proc/cpuinfo)
cores=$(grep -c processor /proc/cpuinfo)

if [[ $aarch64 = '' && $armv7 = '' && $intel = '' ]]; then
  echo "This is neither of ARMv7, AArch64, Intel"
  exit 1
fi
triple="armv7a-linux-gnueabihf"
if [[ $aarch64 != '' ]]; then
  triple="aarch64-linux-gnu"
fi
if [[ $intel != '' ]]; then
  triple="x86_64-linux-gnu"
fi

./test-release.sh -release $REL $RC -triple $triple -j$cores -openmp