1#!/bin/bash 2 3# Copyright JS Foundation and other contributors, http://js.foundation 4# 5# Licensed under the Apache License, Version 2.0 (the "License"); 6# you may not use this file except in compliance with the License. 7# You may obtain a copy of the License at 8# 9# http://www.apache.org/licenses/LICENSE-2.0 10# 11# Unless required by applicable law or agreed to in writing, software 12# distributed under the License is distributed on an "AS IS" BASIS 13# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14# See the License for the specific language governing permissions and 15# limitations under the License. 16 17if [[ "${TRAVIS_REPO_SLUG}" == "jerryscript-project/jerryscript" 18 && ${TRAVIS_BRANCH} == "master" 19 && ${TRAVIS_EVENT_TYPE} == "push" ]] 20then 21 git fetch --unshallow 22 build-wrapper-linux-x86-64 --out-dir bw-output \ 23 ./tools/build.py --error-messages=on \ 24 --jerry-cmdline-snapshot=on \ 25 --jerry-debugger=on \ 26 --line-info=on \ 27 --mem-stats=on \ 28 --profile=es2015-subset \ 29 --snapshot-save=on \ 30 --snapshot-exec=on \ 31 --valgrind=on \ 32 --vm-exec-stop=on 33 sonar-scanner -Dsonar.projectVersion="${TRAVIS_COMMIT}" 34else 35 # SonarQube analysis works only on the master branch. 36 # Ensure the build works with the options used for the analysis. 37 ./tools/build.py --error-messages=on \ 38 --jerry-cmdline-snapshot=on \ 39 --jerry-debugger=on \ 40 --line-info=on \ 41 --mem-stats=on \ 42 --profile=es2015-subset \ 43 --snapshot-save=on \ 44 --snapshot-exec=on \ 45 --valgrind=on \ 46 --vm-exec-stop=on 47fi 48