Skip to content

Commit

Permalink
Move Azure Pipelines CI to use the CMake build (#482)
Browse files Browse the repository at this point in the history
  • Loading branch information
ndevenish authored Feb 10, 2022
1 parent 5cf1b92 commit f295e39
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 28 deletions.
34 changes: 6 additions & 28 deletions .azure-pipelines/unix-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,32 +13,11 @@ steps:
fetchDepth: 1
displayName: Checkout $(Build.SourceBranch)

# Download other source repositories
- bash: |
set -eux
# Extract the version of cctbx-base from the conda environment file
[[ "$(cat modules/dxtbx/.azure-pipelines/ci-conda-env.txt)" =~ cctbx-base==([^:space:]+) ]]
cctbx_version="$(echo "${BASH_REMATCH[1]}" | xargs)"
echo "Using cctbx conda release ${cctbx_version}"
python3 modules/dxtbx/.azure-pipelines/bootstrap.py update --branch cctbx_project@"v${cctbx_version}"
displayName: Repository checkout
workingDirectory: $(Pipeline.Workspace)

# Download additional source repositories required by cctbx-base (but not dxtbx)
# cf. /~https://github.com/conda-forge/cctbx-base-feedstock/issues/12
- bash: |
set -eux
git clone /~https://github.com/dials/annlib.git modules/annlib
git clone /~https://github.com/dials/annlib_adaptbx.git modules/annlib_adaptbx
displayName: Repository checkout (additional cctbx)
workingDirectory: $(Pipeline.Workspace)

# Create a new conda environment using the bootstrap script
# Extract the dials-data version so we can correctly cache regression data.
- bash: |
set -eux
echo pycbf >> modules/dxtbx/.azure-pipelines/ci-conda-env.txt
python3 modules/dxtbx/.azure-pipelines/bootstrap.py base --clean --python $(PYTHON_VERSION)
set +ux
Expand All @@ -59,8 +38,9 @@ steps:
set -ux
mkdir build
cd build
libtbx.configure dxtbx cbflib_adaptbx
make reconf
cmake ../modules/dxtbx
cmake --build . --target install
pip install ../modules/dxtbx
displayName: Build dxtbx
workingDirectory: $(Pipeline.Workspace)

Expand All @@ -86,14 +66,12 @@ steps:
- bash: |
set -e
. conda_base/bin/activate
set -x
. build/setpaths.sh
set -u
set -ux
export DIALS_DATA=${PWD}/data
cd modules/dxtbx
export PYTHONDEVMODE=1
pytest -v -ra -n auto --basetemp="$(Pipeline.Workspace)/tests" --durations=10 \
--cov=$(pwd) --cov-report=html --cov-report=xml --cov-branch \
--cov=dxtbx --cov-report=html --cov-report=xml --cov-branch \
--timeout=5400 --regression || echo "##vso[task.complete result=Failed;]Some tests failed"
displayName: Run tests
workingDirectory: $(Pipeline.Workspace)
Expand Down
1 change: 1 addition & 0 deletions newsfragments/482.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Use CMake to build dxtbx for Azure Pipelines CI.

0 comments on commit f295e39

Please sign in to comment.