forked from equinor/komodo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
63 lines (52 loc) · 1.87 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
dist: bionic
language: python
python: 3.6
addons:
apt:
packages:
- cmake
matrix:
fast_finish: true
include:
- name: Python 2.7.18 target
env:
- TARGET_PYTHON_URL=https://repo.anaconda.com/miniconda/Miniconda2-py27_4.8.3-Linux-x86_64.sh
- 'TARGET_PYTHON_VERSION="Python 2.7.18 :: Anaconda, Inc."'
- RELEASE=release-py27.yml
- name: Python 3.7.7 target
env:
- TARGET_PYTHON_URL=https://repo.anaconda.com/miniconda/Miniconda3-py37_4.8.3-Linux-x86_64.sh
- TARGET_PYTHON_VERSION="Python 3.7.7"
- RELEASE=release-py37.yml
install:
# Prepare target python
- wget -O miniconda.sh $TARGET_PYTHON_URL
- chmod +x miniconda.sh
- ./miniconda.sh -b -p/tmp/target-python
# Bootstrap Komodo environment
- ./bootstrap.sh /tmp/target-python/bin/python
- KMD_PYTHON=$PWD/boot/kmd-env/bin/python
script:
# Unit tests
- $KMD_PYTHON -m pytest tests
# Lint tests
- $KMD_PYTHON -m komodo.lint examples/releases/unstable.yml examples/repository.yml
- $KMD_PYTHON -m komodo.lint examples/releases/ecl.yml examples/repository.yml
# Full integration test
- |
./runkmd.sh ci/travis/${RELEASE} ci/travis/repository.yml \
--workspace /tmp/kmd-ws \
--cache /tmp/kmd-cache \
--prefix /tmp/pfx \
--release travis \
--renamer rename.ul
# Build libkmd.so for testing
- ci/travis/build_lib.sh /tmp/pfx/travis
- source /tmp/pfx/travis/enable
- which python
- python --version
- python -c "import numpy;print(numpy.__file__)"
- ci/travis/test_import_lib.py
# Test that everything makes sense
- '[[ "$(which python)" == "/tmp/pfx/travis/root/bin/python" ]]'
- '[[ "$(python --version 2>&1)" == "${TARGET_PYTHON_VERSION}" ]]'