Skip to content

Commit b18591e

Browse files
committed
Add support for travis integration
Fully fledged checks, builds, and tests on Linux, non-voting native builds and unit tests on OS X. JerryScript-DCO-1.0-Signed-off-by: Akos Kiss [email protected]
1 parent 0d7ea70 commit b18591e

File tree

3 files changed

+82
-0
lines changed

3 files changed

+82
-0
lines changed

.travis.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
language: c
2+
3+
os: linux
4+
dist: trusty
5+
sudo: required
6+
7+
before_install:
8+
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then tools/apt-get-install-deps.sh; fi
9+
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then tools/brew-install-deps.sh; fi
10+
11+
install: make prerequisites
12+
13+
script: "make -j VERBOSE=1 NINJA=1 $TARGET"
14+
15+
env:
16+
- TARGET="check-signed-off check-vera check-cpp"
17+
- TARGET="build.linux test-js-precommit"
18+
- TARGET=build.mcu_stm32f3
19+
- TARGET=build.mcu_stm32f4
20+
- TARGET=test-unit
21+
22+
matrix:
23+
include:
24+
- os: osx
25+
env: TARGET="build.darwin test-js-precommit"
26+
- os: osx
27+
env: TARGET=test-unit
28+
allow_failures:
29+
- os: osx

tools/apt-get-install-deps.sh

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#!/bin/bash
2+
3+
# Copyright 2016 Samsung Electronics Co., Ltd.
4+
# Copyright 2016 University of Szeged
5+
#
6+
# Licensed under the Apache License, Version 2.0 (the "License");
7+
# you may not use this file except in compliance with the License.
8+
# You may obtain a copy of the License at
9+
#
10+
# http://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
# Unless required by applicable law or agreed to in writing, software
13+
# distributed under the License is distributed on an "AS IS" BASIS
14+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
# See the License for the specific language governing permissions and
16+
# limitations under the License.
17+
18+
sudo apt-get update -q
19+
sudo apt-get install -q -y \
20+
make cmake ninja-build \
21+
gcc gcc-arm-none-eabi \
22+
cppcheck vera++

tools/brew-install-deps.sh

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
#!/bin/bash
2+
3+
# Copyright 2016 Samsung Electronics Co., Ltd.
4+
# Copyright 2016 University of Szeged
5+
#
6+
# Licensed under the Apache License, Version 2.0 (the "License");
7+
# you may not use this file except in compliance with the License.
8+
# You may obtain a copy of the License at
9+
#
10+
# http://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
# Unless required by applicable law or agreed to in writing, software
13+
# distributed under the License is distributed on an "AS IS" BASIS
14+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
# See the License for the specific language governing permissions and
16+
# limitations under the License.
17+
18+
brew update
19+
20+
PKGS="
21+
cmake ninja
22+
cppcheck vera++
23+
"
24+
25+
for pkg in $PKGS
26+
do
27+
if ! ( brew list -1 | grep -q "^${pkg}\$" )
28+
then
29+
brew install $pkg
30+
fi
31+
done

0 commit comments

Comments
 (0)