forked from kosarev/z80
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtravis.py
executable file
·49 lines (43 loc) · 1.23 KB
/
travis.py
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
#!/usr/bin/env python3
print('''
matrix:
include:''')
def language_cpp(**kwargs):
print('''\
- language: cpp
compiler: {compiler}
install:
- DEPS_DIR="${{TRAVIS_BUILD_DIR}}/deps"
- mkdir ${{DEPS_DIR}} && cd ${{DEPS_DIR}}
- |
if [[ "${{TRAVIS_OS_NAME}}" == "linux" ]]; then
CMAKE_URL="http://www.cmake.org/files/v3.5/cmake-3.5.1-Linux-x86_64.tar.gz"
mkdir cmake && travis_retry wget --no-check-certificate --quiet -O - ${{CMAKE_URL}} | tar --strip-components=1 -xz -C cmake
export PATH=${{DEPS_DIR}}/cmake/bin:${{PATH}}
fi
- cd ..
script:
- mkdir build
- cd build
- ${{DEPS_DIR}}/cmake/bin/cmake ..
- make
- make test
- make examples'''.format(**kwargs))
language_cpp(compiler='gcc')
language_cpp(compiler='clang')
def language_python(**kwargs):
print('''\
- language: python
python: {version}
install:
- python setup.py install
script:
- cd examples
- ./exercisers.py'''.format(**kwargs))
PYTHON_VERSIONS = [
'3.4',
'3.5', '3.5-dev',
'3.6', '3.6-dev',
]
for version in PYTHON_VERSIONS:
language_python(version=version)