forked from WasmVM/WasmVM
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
46 lines (40 loc) · 1.46 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
language: c
os:
- linux
sudo: required
dist: trusty
notifications:
email: false
git:
submodules: false
depth: 1
services:
- docker
cache:
directories:
- build-cmake/SkyPat
jobs:
include:
- stage: "Style Check"
before_install:
- sudo apt-get install -y astyle
addons:
apt:
update: true
script:
- cp -r ${TRAVIS_BUILD_DIR} ${TRAVIS_BUILD_DIR}-check
- cd ${TRAVIS_BUILD_DIR}-check
- astyle --style=kr --exclude=build-cmake --indent=spaces=4 --indent-switches --suffix=none --recursive *.c *.h *.hpp
- diff -qr --exclude=build-cmake ${TRAVIS_BUILD_DIR} ${TRAVIS_BUILD_DIR}-check
- cd ${TRAVIS_BUILD_DIR} && rm -rf ${TRAVIS_BUILD_DIR}-check
- stage: "Test"
before_install:
- sudo docker pull wasmvm/develop:CI &&
sudo docker create --privileged=true -t --name wasmvm-ci --volume ${TRAVIS_BUILD_DIR}:/root wasmvm/develop:CI &&
sudo docker start wasmvm-ci
script:
- sudo docker exec -t wasmvm-ci /bin/bash -c "mkdir -p ~/build-cmake" &&
sudo docker exec -t wasmvm-ci /bin/bash -c "cd ~/build-cmake && cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=../install-cmake .." &&
sudo docker exec -t wasmvm-ci /bin/bash -c "cd ~/build-cmake && make -j8 install" &&
sudo docker exec -t wasmvm-ci /bin/bash -c "ldconfig" &&
sudo docker exec -t wasmvm-ci /bin/bash -c "cd ~/build-cmake && ctest"