forked from HaxeFoundation/hxcpp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
63 lines (58 loc) · 1.95 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
language: cpp
os:
- linux
- osx
sudo: required
dist: trusty
install:
# install dependencies
- if [ "${TRAVIS_OS_NAME}" = "linux" ]; then
travis_retry sudo add-apt-repository ppa:haxe/ocaml -y;
travis_retry sudo apt-get update -y;
travis_retry sudo apt-get install pkg-config libgc-dev libssl-dev libpcre3-dev zlib1g-dev apache2-dev libmysqlclient-dev libsqlite3-dev libgtk2.0-dev ocaml-native-compilers camlp4 gcc-multilib g++-multilib -y;
fi
- if [ "${TRAVIS_OS_NAME}" = "osx" ]; then
travis_retry brew update;
travis_retry brew install bdw-gc pcre mariadb mbedtls ocaml camlp4;
fi
# Install neko
- travis_retry git clone https://github.com/HaxeFoundation/neko.git ~/neko;
- mkdir -p ~/neko/build;
- pushd ~/neko/build;
- if [ "${TRAVIS_OS_NAME}" = "linux" ]; then
cmake -DSTATIC_DEPS=MbedTLS ..;
elif [ "${TRAVIS_OS_NAME}" = "osx" ]; then
cmake ..;
fi
- make -s;
- sudo make install;
- popd;
- neko -version
# build haxe
- git clone --recursive https://github.com/HaxeFoundation/haxe.git ~/haxe
- pushd ~/haxe
- make OCAMLOPT=ocamlopt.opt ADD_REVISION=1 && sudo make install INSTALL_DIR=/usr/local
- popd
- haxe -version
# setup haxelib
- mkdir ~/haxelib && haxelib setup ~/haxelib
- haxelib dev hxcpp $TRAVIS_BUILD_DIR
- haxelib install record-macros
env:
- HXCPP_COMPILE_CACHE=~/hxcache
script:
- cd ${TRAVIS_BUILD_DIR}/tools/run
- haxe compile.hxml
- cd ${TRAVIS_BUILD_DIR}/tools/hxcpp
- haxe compile.hxml
- cd ${TRAVIS_BUILD_DIR}/project
- haxe compile-cppia.hxml
- cd ${TRAVIS_BUILD_DIR}/test
- haxe --run RunTests cffi
- haxe --run RunTests haxe
- haxe --run RunTests std32
- haxe --run RunTests std64
- cd ~/haxe/tests/unit
- haxe compile-cpp.hxml -D HXCPP_M32 && ./bin/cpp/TestMain-debug && rm -rf bin/cpp
- haxe compile-cpp.hxml -D HXCPP_M64 && ./bin/cpp/TestMain-debug
- haxe compile-cppia.hxml -debug && haxelib run hxcpp ./bin/unit.cppia