Skip to content

Commit a89af2d

Browse files
authored
Merge pull request HypothesisWorks#2063 from Zac-HD/faster-build
Faster build on Azure Pipelines
2 parents d9a550a + 7d06a24 commit a89af2d

File tree

3 files changed

+16
-5
lines changed

3 files changed

+16
-5
lines changed

azure-pipelines.yml

+6
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,9 @@ jobs:
6363
check-pandas25:
6464
TASK: check-pandas25
6565
steps:
66+
- task: UsePythonVersion@0
67+
inputs:
68+
versionSpec: '3.6'
6669
- script: sudo apt-get update && sudo apt-get install libreadline-dev libsqlite3-dev shellcheck
6770
displayName: Install apt dependencies
6871
- script: ./build.sh check-installed
@@ -132,6 +135,9 @@ jobs:
132135
check-py36:
133136
TASK: check-py36
134137
steps:
138+
- task: UsePythonVersion@0
139+
inputs:
140+
versionSpec: '3.6'
135141
- script: |
136142
brew update
137143
brew install readline xz ncurses

build.sh

+8-3
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,14 @@ SCRIPTS="$ROOT/tooling/scripts"
1717
# shellcheck source=tooling/scripts/common.sh
1818
source "$SCRIPTS/common.sh"
1919

20-
"$SCRIPTS/ensure-python.sh" 3.6.5
21-
22-
PYTHON=$(pythonloc 3.6.5)/bin/python
20+
if [ -n "${PIPELINE_WORKSPACE-}" ] ; then
21+
# We're on Azure Pipelines and already set up a suitable Python
22+
PYTHON=$(command -v python)
23+
else
24+
# Otherwise, we install it from scratch
25+
"$SCRIPTS/ensure-python.sh" 3.6.8
26+
PYTHON=$(pythonloc 3.6.8)/bin/python
27+
fi
2328

2429
TOOL_REQUIREMENTS="$ROOT/requirements/tools.txt"
2530

tooling/src/hypothesistooling/__main__.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,7 @@ def run_tox(task, version):
377377

378378
PY27 = "2.7.14"
379379
PY35 = "3.5.5"
380-
PY36 = "3.6.5"
380+
PY36 = "3.6.8"
381381
PY37 = "3.7.0"
382382
PYPY2 = "pypy2.7-5.10.0"
383383
PYPY3 = "pypy3.5-5.10.1"
@@ -477,7 +477,7 @@ def check_examples2():
477477

478478
@examples_task
479479
def check_examples3():
480-
run_tox("examples2", PY36)
480+
run_tox("examples3", PY36)
481481

482482

483483
@python_tests

0 commit comments

Comments
 (0)