diff --git a/.azure-pipelines/azure-pipelines-osx.yml b/.azure-pipelines/azure-pipelines-osx.yml index 17c354e0..8937a317 100755 --- a/.azure-pipelines/azure-pipelines-osx.yml +++ b/.azure-pipelines/azure-pipelines-osx.yml @@ -5,7 +5,7 @@ jobs: - job: osx pool: - vmImage: macOS-12 + vmImage: macOS-13 strategy: matrix: osx_64_mpimpichpython3.10.____cpythonscalarcomplex: diff --git a/azure-pipelines.yml b/azure-pipelines.yml index e5306da9..32da3d0c 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -2,7 +2,32 @@ # update the conda-forge.yml and/or the recipe/meta.yaml. # -*- mode: yaml -*- -jobs: - - template: ./.azure-pipelines/azure-pipelines-linux.yml - - template: ./.azure-pipelines/azure-pipelines-osx.yml - - template: ./.azure-pipelines/azure-pipelines-win.yml \ No newline at end of file +stages: +- stage: Check + jobs: + - job: Skip + pool: + vmImage: 'ubuntu-22.04' + variables: + DECODE_PERCENTS: 'false' + RET: 'true' + steps: + - checkout: self + fetchDepth: '2' + - bash: | + git_log=`git log --max-count=1 --skip=1 --pretty=format:"%B" | tr "\n" " "` + echo "##vso[task.setvariable variable=log]$git_log" + displayName: Obtain commit message + - bash: echo "##vso[task.setvariable variable=RET]false" + condition: or(contains(variables.log, '[skip azp]'), contains(variables.log, '[azp skip]'), contains(variables.log, '[skip ci]'), contains(variables.log, '[ci skip]')) + displayName: Skip build? + - bash: echo "##vso[task.setvariable variable=start_main;isOutput=true]$RET" + name: result + displayName: Export result +- stage: Build + condition: and(succeeded(), eq(dependencies.Check.outputs['Skip.result.start_main'], 'true')) + dependsOn: Check + jobs: + - template: ./.azure-pipelines/azure-pipelines-linux.yml + - template: ./.azure-pipelines/azure-pipelines-osx.yml + - template: ./.azure-pipelines/azure-pipelines-win.yml \ No newline at end of file diff --git a/recipe/build-dolfinx.sh b/recipe/build-dolfinx.sh index 671fb0ab..60015633 100644 --- a/recipe/build-dolfinx.sh +++ b/recipe/build-dolfinx.sh @@ -8,6 +8,14 @@ if [[ "$target_platform" == "linux-aarch64" || "$target_platform" == "linux-ppc6 export CMAKE_BUILD_PARALLEL_LEVEL=1 fi +# cross-compiled linux produces wrong wheel tags +# causing pip check to fail +if [[ "${target_platform}" == "linux-aarch64" ]]; then + export _PYTHON_HOST_PLATFORM=linux_aarch64 +elif [[ "${target_platform}" == "linux-ppc64le" ]]; then + export _PYTHON_HOST_PLATFORM=linux_ppc64le +fi + if [[ "${CONDA_BUILD_CROSS_COMPILATION:-0}" == "1" ]]; then # needed for cross-compile openmpi export OPAL_CC="$CC" diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 588b2b52..d1071a22 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -7,7 +7,7 @@ {% set major_minor = version.rsplit(".", 1)[0] %} {% set ufl_version = "2024.2" %} -{% set build = 1 %} +{% set build = 2 %} {%- if scalar is not defined %} {%- set scalar = "" %} @@ -24,6 +24,10 @@ package: source: url: https://github.com/fenics/dolfinx/archive/refs/tags/v{{ version }}{{ extra }}.tar.gz sha256: b266c74360c2590c5745d74768c04568c965b44739becca4cd6b5aa58cdbbbd1 + patches: + # cffi is pinned down for a bug + # but 1.17 is needed for Windows, CPython 3.13 + - unpin-cffi.patch # [win or py>=313] build: number: {{ build }} @@ -137,6 +141,7 @@ outputs: - python - {{ pin_subpackage("fenics-libdolfinx", exact=True) }} - cffi + - cffi <1.17 # [not (win or py>=313)] - mpi4py - numpy >=1.21 - petsc4py # [not win] diff --git a/recipe/test-dolfinx.bat b/recipe/test-dolfinx.bat index cdde761f..40f171db 100644 --- a/recipe/test-dolfinx.bat +++ b/recipe/test-dolfinx.bat @@ -1,8 +1,8 @@ setlocal EnableDelayedExpansion @echo on -:: pip check -:: if errorlevel 1 exit 1 +pip check +if errorlevel 1 exit 1 :: test packaging pytest -vs test_dolfinx.py diff --git a/recipe/test-dolfinx.sh b/recipe/test-dolfinx.sh index d2d09593..3f614ff5 100644 --- a/recipe/test-dolfinx.sh +++ b/recipe/test-dolfinx.sh @@ -1,6 +1,6 @@ set -ex -pip check || echo "pip check failed! if it's petsc4py objecting to numpy 1, that's ok" +pip check TEST_DIR=$PWD diff --git a/recipe/unpin-cffi.patch b/recipe/unpin-cffi.patch new file mode 100644 index 00000000..e75de274 --- /dev/null +++ b/recipe/unpin-cffi.patch @@ -0,0 +1,13 @@ +diff --git a/python/pyproject.toml b/python/pyproject.toml +index a2a4eddcf6..85804a9cc9 100644 +--- a/python/pyproject.toml ++++ b/python/pyproject.toml +@@ -21,7 +21,7 @@ authors = [ + ] + dependencies = [ + "numpy>=1.21", +- "cffi<1.17", # See https://github.com/FEniCS/dolfinx/issues/3340 ++ "cffi", + "mpi4py", + "fenics-basix>=0.10.0.dev0,<0.11.0", + "fenics-ffcx>=0.10.0.dev0,<0.11.0",