Debian Codegraph @

devtools/check-platform.sh

raw symbols SCIP
1 #!/bin/sh -e
2
3 case $1 in
4 ubuntu-*-arm) expected=arm ;;
5 macos-13) expected=x86_64 ;;
6 ubuntu-*) expected=x86_64 ;;
7 macos-*) expected=arm ;;
8 windows-*) expected=x86_64 ;;
9 *)
10 echo Unknown platform $1 >&2
11 exit 2
12 ;;
13 esac
14
15 arch=$(uname -m)
16 case $arch in
17 arm*|aarch*) actual=arm ;;
18 x86*) actual=x86_64 ;;
19 *)
20 echo Unrecognized uname result $arch >&2
21 exit 2
22 ;;
23 esac
24
25 if test $actual = $expected
26 then
27 echo Running on $arch as expected
28 exit 0
29 else
30 echo Platform $arch is not the expected $expected >&2
31 exit 1
32 fi