-
Notifications
You must be signed in to change notification settings - Fork 51
/
.travis.yml
46 lines (40 loc) · 1.47 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
language: python
python:
- "2.6"
- "2.7"
- "3.2"
- "3.3"
env:
- SBOX_HOME="$(readlink -f ~)/.sbox" PATH="$PATH:$SBOX_HOME/bin" PYTHONPATH="$PYTHONPATH:$SBOX_HOME/lib/python"
before_install:
- mkdir -p $SBOX_HOME/bin
- mkdir -p $SBOX_HOME/include
- mkdir -p $SBOX_HOME/lib
- sudo apt-get update -qq
# gcc
- sudo apt-get install -qq gcc libc-dev
- if [[ "$(uname -m)" == 'x86_64' ]]; then sudo apt-get install -qq -m gcc-multilib libc6-dev-i386; fi
- gcc --version
# python
- sudo apt-get install -qq python-dev
- pip install pep8 --use-mirrors
- if [[ $TRAVIS_PYTHON_VERSION == '2.6' ]]; then pip install unittest2 --use-mirrors; fi
- pep8 --ignore E128,E501 .
install:
# core
- cd ./libsandbox/ && ./configure --prefix=$SBOX_HOME --libdir=$SBOX_HOME/lib --enable-chkvsc && cd ..
- make -C ./libsandbox install
# python
- cd ./pysandbox && env CFLAGS="-I$SBOX_HOME/include" LDFLAGS="-L$SBOX_HOME/lib -Wl,-rpath,$SBOX_HOME/lib" python setup.py install --home=$SBOX_HOME && cd ..
# samples
- gcc -I$SBOX_HOME/include -o sample2.exe sample2.c -L$SBOX_HOME/lib -Wl,-rpath,$SBOX_HOME/lib -lsandbox
- install -c -D sample2.exe $SBOX_HOME/bin/sample2.exe
- install -c -D sample2.py $SBOX_HOME/bin/sample2.py
script:
# native tests
- python -m testsuite.__main__
# multiarch tests
- if [[ "$(uname -m)" == 'x86_64' ]]; then env CFLAGS="-Wall --static -m32" python -m testsuite.__main__; fi
notifications:
email: