-
Notifications
You must be signed in to change notification settings - Fork 208
/
.travis.yml
49 lines (47 loc) · 1.53 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
47
language: cpp
sudo: true
compiler:
- g++
language: node_js
node_js:
- 10
os:
- linux
dist: bionic
addons:
apt:
packages:
- xvfb
- cppcheck
before_install:
- sudo apt-get update && sudo apt-get install libglfw3-dev libgles2-mesa-dev libcurl4-openssl-dev
- sudo apt-get install libboost-all-dev
- npm install -g cmake-js
- |
if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then
mkdir -p external/cmake
pushd external/cmake
wget https://cmake.org/files/v3.8/cmake-3.8.0-Linux-x86_64.sh
chmod +x cmake-*-Linux-x86_64.sh
./cmake-*-Linux-x86_64.sh --exclude-subdir --skip-license
export PATH="${PWD}/bin:$PATH"
cmake -version
popd
else
if ! brew ls --version cmake &>/dev/null; then brew update; brew install cmake; fi
fi
install:
- export DISPLAY=':99.0'
- Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
before_script:
- cd ./core/test/w3c &&mkdir build
- npm i && node app.js
- cd ../../../
script:
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then cppcheck --error-exitcode=0 --enable=warning,style,unusedFunction --std=c++11 --verbose --language=c++ core/src; fi
- cd ./core/test/linux && mkdir build && cd build && cmake ../ && make
- mkdir -p ~/.gAssets/fonts/ && cp ../util/font/wqy-microhei.ttc ~/.gAssets/fonts/wqy-microhei.ttc && cp ../util/font/.fontcache ~/.gAssets/fonts/.fontcache
- "./gcanvasTest"
- cat result.txt | awk '{printf "%-30s| %-18s| %-20s\n",$1,$2,$3}'| column -t
- cd ../../../../ && npm install cmake-js -g && cd ./node/ && local=true npm install && npm run dev
- case=app.js npm run test