Clean up vpp jenkins scripts & docker dir
[ci-management.git] / jjb / scripts / vpp / gcc-build.sh
1 #!/bin/bash
2
3 # Copyright (c) 2020 Cisco and/or its affiliates.
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 # You may obtain a copy of the License at:
7 #
8 #     http://www.apache.org/licenses/LICENSE-2.0
9 #
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
15
16 echo "---> jjb/scripts/vpp/gcc-build.sh"
17
18 set -xe -o pipefail
19
20 OS_ID=$(grep '^ID=' /etc/os-release | cut -f2- -d= | sed -e 's/\"//g')
21 OS_VERSION_ID=$(grep '^VERSION_ID=' /etc/os-release | cut -f2- -d= | sed -e 's/\"//g')
22 OS_ARCH=$(uname -m)
23
24 echo "sha1sum of this script: ${0}"
25 sha1sum $0
26 export CC=gcc
27
28 make UNATTENDED=yes install-dep
29 make UNATTENDED=yes install-ext-deps
30 make UNATTENDED=yes build
31 # TODO: Add 'smoke test' env var to select smoke test cases
32 #       then update this accordingly.  For now pick a few basic suites...
33 MAKE_TEST_SUITES="vlib vppinfra vpe_api vapi vom bihash"
34 for suite in $MAKE_TEST_SUITES ; do
35     make UNATTENDED=yes GCOV_TESTS=1 TEST_JOBS=auto TEST=$suite test
36     make UNATTENDED=yes GCOV_TESTS=1 TEST_JOBS=auto TEST=$suite test-debug
37 done
38
39 echo "*******************************************************************"
40 echo "* VPP GCC on ${OS_ID^^}-${OS_VERSION}-${OS_ARCH^^} BUILD SUCCESSFULLY COMPLETED"
41 echo "*******************************************************************"