From f295e39066ce6742cdfab6515cf3acb3681e377f Mon Sep 17 00:00:00 2001 From: Nicholas Devenish Date: Thu, 10 Feb 2022 15:59:22 +0000 Subject: [PATCH] Move Azure Pipelines CI to use the CMake build (#482) --- .azure-pipelines/unix-build.yml | 34 ++++++--------------------------- newsfragments/482.misc | 1 + 2 files changed, 7 insertions(+), 28 deletions(-) create mode 100644 newsfragments/482.misc diff --git a/.azure-pipelines/unix-build.yml b/.azure-pipelines/unix-build.yml index 163eae650..e2ca35f64 100644 --- a/.azure-pipelines/unix-build.yml +++ b/.azure-pipelines/unix-build.yml @@ -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 @@ -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) @@ -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) diff --git a/newsfragments/482.misc b/newsfragments/482.misc new file mode 100644 index 000000000..f2402015f --- /dev/null +++ b/newsfragments/482.misc @@ -0,0 +1 @@ +Use CMake to build dxtbx for Azure Pipelines CI.