Renato Golin | 94cc104 | 2016-04-26 11:02:23 +0100 | [diff] [blame] | 1 | #!/usr/bin/env bash |
| 2 | |
| 3 | syntax="Syntax: $0 REL RC" |
| 4 | |
| 5 | if [[ $1 = '' ]]; then |
Renato Golin | 673e982 | 2016-06-08 12:29:54 +0100 | [diff] [blame] | 6 | echo "$syntax" |
Renato Golin | 94cc104 | 2016-04-26 11:02:23 +0100 | [diff] [blame] | 7 | exit 1 |
| 8 | fi |
Renato Golin | 673e982 | 2016-06-08 12:29:54 +0100 | [diff] [blame] | 9 | REL="$1" |
Renato Golin | 94cc104 | 2016-04-26 11:02:23 +0100 | [diff] [blame] | 10 | shift |
| 11 | if [[ $1 = 'final' ]]; then |
| 12 | RC="-final" |
Renato Golin | 673e982 | 2016-06-08 12:29:54 +0100 | [diff] [blame] | 13 | elif [[ $1 != '' ]]; then |
Renato Golin | 94cc104 | 2016-04-26 11:02:23 +0100 | [diff] [blame] | 14 | RC="-rc $1" |
| 15 | else |
| 16 | echo "Syntax: $0 REL RC" |
| 17 | exit 1 |
Renato Golin | 673e982 | 2016-06-08 12:29:54 +0100 | [diff] [blame] | 18 | fi |
Renato Golin | 94cc104 | 2016-04-26 11:02:23 +0100 | [diff] [blame] | 19 | |
Renato Golin | 673e982 | 2016-06-08 12:29:54 +0100 | [diff] [blame] | 20 | aarch64=$(egrep '(AArch64|asimd)' /proc/cpuinfo) |
| 21 | armv7=$(grep ARMv7 /proc/cpuinfo) |
| 22 | intel=$(grep Intel /proc/cpuinfo) |
| 23 | cores=$(grep -c processor /proc/cpuinfo) |
Renato Golin | 94cc104 | 2016-04-26 11:02:23 +0100 | [diff] [blame] | 24 | |
| 25 | if [[ $aarch64 = '' && $armv7 = '' && $intel = '' ]]; then |
| 26 | echo "This is neither of ARMv7, AArch64, Intel" |
| 27 | exit 1 |
| 28 | fi |
Renato Golin | 673e982 | 2016-06-08 12:29:54 +0100 | [diff] [blame] | 29 | triple="armv7a-linux-gnueabihf" |
Renato Golin | 94cc104 | 2016-04-26 11:02:23 +0100 | [diff] [blame] | 30 | if [[ $aarch64 != '' ]]; then |
Renato Golin | 673e982 | 2016-06-08 12:29:54 +0100 | [diff] [blame] | 31 | triple="aarch64-linux-gnu" |
Renato Golin | 94cc104 | 2016-04-26 11:02:23 +0100 | [diff] [blame] | 32 | fi |
| 33 | if [[ $intel != '' ]]; then |
Renato Golin | 673e982 | 2016-06-08 12:29:54 +0100 | [diff] [blame] | 34 | triple="x86_64-linux-gnu" |
Renato Golin | 94cc104 | 2016-04-26 11:02:23 +0100 | [diff] [blame] | 35 | fi |
| 36 | |
Renato Golin | f8b1483 | 2017-01-19 14:51:26 +0000 | [diff] [blame] | 37 | ./test-release.sh -release $REL $RC -triple $triple -j$cores -openmp |