forked from dials/dials
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.travis.yml
152 lines (125 loc) · 4.37 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
addons:
apt:
packages:
- libjpeg62
language: python
python:
- "2.7"
cache:
directories:
- $HOME/build_dials
timeout: 1000
jobs:
include:
- stage: build
install:
# Setup a base installation
- ./.travis/setup-base
# Inject DIALS
- rm -rf $HOME/build_dials/modules/dials
- mv $HOME/build/dials/dials $HOME/build_dials/modules/dials
# Update CCTBX
- $HOME/build_dials/modules/dials/.travis/clean-cctbx-dxtbx
- $HOME/build_dials/modules/dials/.travis/update-cctbx-dxtbx
before_script:
# Enter CCTBX environment
- cd $HOME/build_dials/build
- cat setpaths.sh
- . setpaths.sh
# Prepare for the build step
- libtbx.configure .
script:
# Parallel builds do not work. Only spend at most 40 minutes on a build.
# This allows incremental building, so if the build can't be finished within the allotted time
# it will be resumed from that point in the next build.
- $HOME/build_dials/modules/dials/.travis/build-for 40m
- name: "Syntax validation - Python 2.7"
addons: false
cache: false
before_cache: false
script:
- python -m compileall -q *
- name: "Syntax validation - Python 3.7"
addons: false
cache: false
before_cache: false
dist: xenial
python: 3.7
script:
- python3 -m compileall -q *
- name: "Build - Python 3.6"
# Same as above really, but on Python 3 this time
python: 3.6
install:
# Setup a base installation
- ./.travis/setup-base3
# Inject DIALS
- rm -rf $HOME/build_dials/modules/dials
- mv $HOME/build/dials/dials $HOME/build_dials/modules/dials
# Update CCTBX
- $HOME/build_dials/modules/dials/.travis/clean-cctbx-dxtbx
- $HOME/build_dials/modules/dials/.travis/update-cctbx-dxtbx
before_script:
# Enter CCTBX environment
- cd $HOME/build_dials/build
- cat setpaths.sh
- . setpaths.sh
# Prepare for the build step
- libtbx.configure .
script:
# Parallel builds do not work. Only spend at most 40 minutes on a build.
# This allows incremental building, so if the build can't be finished within the allotted time
# it will be resumed from that point in the next build.
- $HOME/build_dials/modules/dials/.travis/build-for 40m
- stage: test
before_script:
# Inject DIALS. Again.
- rm -rf $HOME/build_dials/modules/dials
- mv $HOME/build/dials/dials $HOME/build_dials/modules/dials
# Enter CCTBX environment
- cd $HOME/build_dials/build
- . setpaths.sh
# If needed allow up to further 30 minutes worth of building time
- $HOME/build_dials/modules/dials/.travis/build-for 30m if_required
script:
# Finally. Do what we are here for. Run tests. Yay.
- cd $HOME/build_dials/modules/dials
- pytest -ra -n 2 --runslow
- .travis/check-working-directory-is-clean
- name: "Test - Python 3.6"
# Same as above really, but on Python 3 this time
python: 3.6
before_script:
# Inject DIALS. Again.
- rm -rf $HOME/build_dials/modules/dials
- mv $HOME/build/dials/dials $HOME/build_dials/modules/dials
# Enter CCTBX environment
- cd $HOME/build_dials/build
- . setpaths.sh
# If needed allow up to further 30 minutes worth of building time
- $HOME/build_dials/modules/dials/.travis/build-for 30m if_required
script:
# Finally. Do what we are here for. Run tests. Yay.
- cd $HOME/build_dials/modules/dials
- pytest -ra -n 2 --runslow --disable-warnings
- .travis/check-working-directory-is-clean
- name: "Flake8 - Python 2.7"
addons: false
cache: false
before_cache: false
script:
- .travis/run-flake8
if: type = pull_request
- name: "Flake8 - Python 3.7"
addons: false
cache: false
before_cache: false
dist: xenial
python: 3.7
script:
- .travis/run-flake8
if: type = pull_request
before_cache:
- $HOME/build_dials/modules/dials/.travis/clean-cctbx-dxtbx
- cd $HOME
- rm -rf $HOME/build_dials/modules/dials