Debian Codegraph @

crt/s2n/.github/s2n_bsd.sh

raw symbols SCIP
1 #!/bin/shscip-shell filesystem . . `/bin/sh`.
2 # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3 #
4 # Licensed under the Apache License, Version 2.0 (the "License").
5 # You may not use this file except in compliance with the License.
6 # A copy of the License is located at
7 #
8 # http://aws.amazon.com/apache2.0
9 #
10 # or in the "license" file accompanying this file. This file is distributed
11 # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12 # express or implied. See the License for the specific language governing
13 # permissions and limitations under the License.
14 #
15 set -eu
16 export CTEST_OUTPUT_ON_FAILURE=1
17
18 # FreeBSD and OpenBSD have different ways of getting CPU count
19 # see https://serverfault.com/questions/203207/how-do-i-count-the-number-of-processors-on-an-openbsd-system
20 if [scip-shell system . . `[`. "$(unamescip-shell system . . uname.)" = 'FreeBSD' ]; then
21 export CTEST_PARALLEL_LEVEL=$(sysctlscip-shell system . . sysctl. hw.ncpu | awkscip-shell system . . awk. '{print $2}')
22 else
23 export CTEST_PARALLEL_LEVEL=$(sysctlscip-shell system . . sysctl. -n hw.ncpuonline)
24 fi
25
26 errors=0
27 onerrorscip-shell shell shell-project 0.0.0 onerror().() {
28 errors=$(($errors+1))
29 }
30
31 mkdirscip-shell system . . mkdir. -p output
32
33 cmakescip-shell system . . cmake. . -Brelease -GNinja -DCMAKE_BUILD_TYPE=Release
34 cmakescip-shell system . . cmake. --build ./release -j $CTEST_PARALLEL_LEVEL
35 ninjascip-shell system . . ninja. -C release test || onerrorscip-shell shell shell-project 0.0.0 onerror().
36 mvscip-shell system . . mv. release/Testing/Temporary output/release
37 # reduce the number of files to copy back
38 rmscip-shell system . . rm. -rf release
39
40 cmakescip-shell system . . cmake. . -Bbuild -GNinja -DCMAKE_BUILD_TYPE=Debug
41 cmakescip-shell system . . cmake. --build ./build -j $CTEST_PARALLEL_LEVEL
42 ninjascip-shell system . . ninja. -C build test || onerrorscip-shell shell shell-project 0.0.0 onerror().
43 mvscip-shell system . . mv. build/Testing/Temporary output/debug
44 # reduce the number of files to copy back
45 rmscip-shell system . . rm. -rf build
46
47 exit $errors