diff --git a/.azure-pipelines/azure-pipelines-linux.yml b/.azure-pipelines/azure-pipelines-linux.yml deleted file mode 100755 index 10fd842..0000000 --- a/.azure-pipelines/azure-pipelines-linux.yml +++ /dev/null @@ -1,73 +0,0 @@ -# This file was generated automatically from conda-smithy. To update this configuration, -# update the conda-forge.yml and/or the recipe/meta.yaml. -# -*- mode: yaml -*- - -jobs: -- job: linux - pool: - vmImage: ubuntu-latest - strategy: - matrix: - linux_64_python3.10.____cpython: - CONFIG: linux_64_python3.10.____cpython - UPLOAD_PACKAGES: 'True' - DOCKER_IMAGE: quay.io/condaforge/linux-anvil-x86_64:alma9 - linux_64_python3.11.____cpython: - CONFIG: linux_64_python3.11.____cpython - UPLOAD_PACKAGES: 'True' - DOCKER_IMAGE: quay.io/condaforge/linux-anvil-x86_64:alma9 - linux_64_python3.12.____cpython: - CONFIG: linux_64_python3.12.____cpython - UPLOAD_PACKAGES: 'True' - DOCKER_IMAGE: quay.io/condaforge/linux-anvil-x86_64:alma9 - linux_64_python3.13.____cp313: - CONFIG: linux_64_python3.13.____cp313 - UPLOAD_PACKAGES: 'True' - DOCKER_IMAGE: quay.io/condaforge/linux-anvil-x86_64:alma9 - linux_64_python3.14.____cp314: - CONFIG: linux_64_python3.14.____cp314 - UPLOAD_PACKAGES: 'True' - DOCKER_IMAGE: quay.io/condaforge/linux-anvil-x86_64:alma9 - timeoutInMinutes: 360 - variables: {} - - steps: - - script: | - SWAPFILE=/swapfile - # If there is already a swapfile, disable it and remove it - if swapon --show | grep -q $SWAPFILE; then - echo "Disabling existing swapfile..." - sudo swapoff $SWAPFILE || true - fi - [ -f "$SWAPFILE" ] && sudo rm -f $SWAPFILE - sudo fallocate -l 10GiB $SWAPFILE - sudo chmod 600 $SWAPFILE - sudo mkswap $SWAPFILE - sudo swapon $SWAPFILE - displayName: Create swap file - # configure qemu binfmt-misc running. This allows us to run docker containers - # embedded qemu-static - - script: | - docker run --rm --privileged multiarch/qemu-user-static:register --reset --credential yes - ls /proc/sys/fs/binfmt_misc/ - condition: not(startsWith(variables['CONFIG'], 'linux_64')) - displayName: Configure binfmt_misc - - - script: | - export CI=azure - export flow_run_id=azure_$(Build.BuildNumber).$(System.JobAttempt) - export remote_url=$(Build.Repository.Uri) - export sha=$(Build.SourceVersion) - export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME - export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) - if [[ "${BUILD_REASON:-}" == "PullRequest" ]]; then - export IS_PR_BUILD="True" - else - export IS_PR_BUILD="False" - fi - .scripts/run_docker_build.sh - displayName: Run docker build - env: - BINSTAR_TOKEN: $(BINSTAR_TOKEN) - FEEDSTOCK_TOKEN: $(FEEDSTOCK_TOKEN) - STAGING_BINSTAR_TOKEN: $(STAGING_BINSTAR_TOKEN) diff --git a/.azure-pipelines/azure-pipelines-osx.yml b/.azure-pipelines/azure-pipelines-osx.yml index 7871044..8bd74f0 100755 --- a/.azure-pipelines/azure-pipelines-osx.yml +++ b/.azure-pipelines/azure-pipelines-osx.yml @@ -5,39 +5,49 @@ jobs: - job: osx pool: - vmImage: macOS-15 + vmImage: $(VMIMAGE) strategy: matrix: osx_64_python3.10.____cpython: CONFIG: osx_64_python3.10.____cpython UPLOAD_PACKAGES: 'True' + VMIMAGE: macOS-15 osx_64_python3.11.____cpython: CONFIG: osx_64_python3.11.____cpython UPLOAD_PACKAGES: 'True' + VMIMAGE: macOS-15 osx_64_python3.12.____cpython: CONFIG: osx_64_python3.12.____cpython UPLOAD_PACKAGES: 'True' + VMIMAGE: macOS-15 osx_64_python3.13.____cp313: CONFIG: osx_64_python3.13.____cp313 UPLOAD_PACKAGES: 'True' + VMIMAGE: macOS-15 osx_64_python3.14.____cp314: CONFIG: osx_64_python3.14.____cp314 UPLOAD_PACKAGES: 'True' + VMIMAGE: macOS-15 osx_arm64_python3.10.____cpython: CONFIG: osx_arm64_python3.10.____cpython UPLOAD_PACKAGES: 'True' + VMIMAGE: macOS-15 osx_arm64_python3.11.____cpython: CONFIG: osx_arm64_python3.11.____cpython UPLOAD_PACKAGES: 'True' + VMIMAGE: macOS-15 osx_arm64_python3.12.____cpython: CONFIG: osx_arm64_python3.12.____cpython UPLOAD_PACKAGES: 'True' + VMIMAGE: macOS-15 osx_arm64_python3.13.____cp313: CONFIG: osx_arm64_python3.13.____cp313 UPLOAD_PACKAGES: 'True' + VMIMAGE: macOS-15 osx_arm64_python3.14.____cp314: CONFIG: osx_arm64_python3.14.____cp314 UPLOAD_PACKAGES: 'True' + VMIMAGE: macOS-15 timeoutInMinutes: 360 variables: {} diff --git a/.github/workflows/conda-build.yml b/.github/workflows/conda-build.yml index a948c6c..3e1fda7 100644 --- a/.github/workflows/conda-build.yml +++ b/.github/workflows/conda-build.yml @@ -1,15 +1,130 @@ -# This file was added automatically by admin-migrations. Do not modify. -# It ensures that Github Actions can run once rerendered for the first time. +# This file was generated automatically from conda-smithy. To update this configuration, +# update the conda-forge.yml and/or the recipe/meta.yaml. # -*- mode: yaml -*- name: Build conda package on: - workflow_dispatch: + push: + + pull_request: + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} + cancel-in-progress: true jobs: build: - name: Disabled build - runs-on: ubuntu-slim - if: false + name: ${{ matrix.CONFIG }} + runs-on: ${{ matrix.runs_on }} + timeout-minutes: 360 + strategy: + fail-fast: false + max-parallel: 50 + matrix: + include: + - CONFIG: linux_64_python3.10.____cpython + UPLOAD_PACKAGES: True + os: ubuntu + runs_on: ['ubuntu-latest'] + DOCKER_IMAGE: quay.io/condaforge/linux-anvil-x86_64:alma9 + - CONFIG: linux_64_python3.11.____cpython + UPLOAD_PACKAGES: True + os: ubuntu + runs_on: ['ubuntu-latest'] + DOCKER_IMAGE: quay.io/condaforge/linux-anvil-x86_64:alma9 + - CONFIG: linux_64_python3.12.____cpython + UPLOAD_PACKAGES: True + os: ubuntu + runs_on: ['ubuntu-latest'] + DOCKER_IMAGE: quay.io/condaforge/linux-anvil-x86_64:alma9 + - CONFIG: linux_64_python3.13.____cp313 + UPLOAD_PACKAGES: True + os: ubuntu + runs_on: ['ubuntu-latest'] + DOCKER_IMAGE: quay.io/condaforge/linux-anvil-x86_64:alma9 + - CONFIG: linux_64_python3.14.____cp314 + UPLOAD_PACKAGES: True + os: ubuntu + runs_on: ['ubuntu-latest'] + DOCKER_IMAGE: quay.io/condaforge/linux-anvil-x86_64:alma9 steps: - - run: exit 0 + + - name: Checkout code + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + + - name: Build on Linux + id: build-linux + if: matrix.os == 'ubuntu' + env: + CONFIG: ${{ matrix.CONFIG }} + UPLOAD_PACKAGES: ${{ matrix.UPLOAD_PACKAGES }} + DOCKER_IMAGE: ${{ matrix.DOCKER_IMAGE }} + CI: github_actions + CONDA_FORGE_DOCKER_RUN_ARGS: "${{ matrix.CONDA_FORGE_DOCKER_RUN_ARGS }}" + BINSTAR_TOKEN: ${{ secrets.BINSTAR_TOKEN }} + FEEDSTOCK_TOKEN: ${{ secrets.FEEDSTOCK_TOKEN }} + STAGING_BINSTAR_TOKEN: ${{ secrets.STAGING_BINSTAR_TOKEN }} + shell: bash + run: | + if [[ "$(uname -m)" == "x86_64" ]]; then + echo "::group::Configure binfmt_misc" + docker run --rm --privileged multiarch/qemu-user-static:register --reset --credential yes + fi + export flow_run_id="github_$GITHUB_RUN_ID" + export remote_url="https://github.com/$GITHUB_REPOSITORY" + export sha="$GITHUB_SHA" + export FEEDSTOCK_NAME="$(basename $GITHUB_REPOSITORY)" + export GIT_BRANCH="$(basename $GITHUB_REF)" + if [[ "${GITHUB_EVENT_NAME}" == "pull_request" ]]; then + export IS_PR_BUILD="True" + else + export IS_PR_BUILD="False" + fi + echo "::endgroup::" + ./.scripts/run_docker_build.sh + + - name: Build on macOS + id: build-macos + if: matrix.os == 'macos' + env: + CONFIG: ${{ matrix.CONFIG }} + UPLOAD_PACKAGES: ${{ matrix.UPLOAD_PACKAGES }} + CI: github_actions + BINSTAR_TOKEN: ${{ secrets.BINSTAR_TOKEN }} + FEEDSTOCK_TOKEN: ${{ secrets.FEEDSTOCK_TOKEN }} + STAGING_BINSTAR_TOKEN: ${{ secrets.STAGING_BINSTAR_TOKEN }} + shell: bash + run: | + export flow_run_id="github_$GITHUB_RUN_ID" + export remote_url="https://github.com/$GITHUB_REPOSITORY" + export sha="$GITHUB_SHA" + export FEEDSTOCK_NAME="$(basename $GITHUB_REPOSITORY)" + export GIT_BRANCH="$(basename $GITHUB_REF)" + if [[ "${GITHUB_EVENT_NAME}" == "pull_request" ]]; then + export IS_PR_BUILD="True" + else + export IS_PR_BUILD="False" + fi + ./.scripts/run_osx_build.sh + + - name: Build on windows + id: build-windows + if: matrix.os == 'windows' + shell: cmd + run: | + set "flow_run_id=github_%GITHUB_RUN_ID%" + set "remote_url=https://github.com/%GITHUB_REPOSITORY%" + set "sha=%GITHUB_SHA%" + call ".scripts\run_win_build.bat" + env: + # default value; make it explicit, as it needs to match with artefact + # generation below. Not configurable for now, can be revisited later + CONDA_BLD_DIR: C:\bld + MINIFORGE_HOME: ${{ contains(runner.arch, 'ARM') && 'C' || 'D' }}:\Miniforge + PYTHONUNBUFFERED: 1 + CONFIG: ${{ matrix.CONFIG }} + CI: github_actions + UPLOAD_PACKAGES: ${{ matrix.UPLOAD_PACKAGES }} + BINSTAR_TOKEN: ${{ secrets.BINSTAR_TOKEN }} + FEEDSTOCK_TOKEN: ${{ secrets.FEEDSTOCK_TOKEN }} + STAGING_BINSTAR_TOKEN: ${{ secrets.STAGING_BINSTAR_TOKEN }} \ No newline at end of file diff --git a/.scripts/build_steps.sh b/.scripts/build_steps.sh index 780a358..be060cb 100755 --- a/.scripts/build_steps.sh +++ b/.scripts/build_steps.sh @@ -20,6 +20,7 @@ export PYTHONUNBUFFERED=1 export RECIPE_ROOT="${RECIPE_ROOT:-/home/conda/recipe_root}" export CI_SUPPORT="${FEEDSTOCK_ROOT}/.ci_support" export CONFIG_FILE="${CI_SUPPORT}/${CONFIG}.yaml" +export RATTLER_CACHE_DIR="${FEEDSTOCK_ROOT}/build_artifacts/pkg_cache" cat >~/.condarc <=2 # [build_platform != target_platform] - cython >=3 # [build_platform != target_platform] + - pip # [build_platform != target_platform] + - python-build # [build_platform != target_platform] + - wheel # [build_platform != target_platform] + - scikit-build-core # [build_platform != target_platform] + - ninja + - cmake >=3.27 host: - python - numpy >=2 - cython >=3 - - setuptools + - python-build + - scikit-build-core + - wheel - pip - tbb - tbb-devel - libboost-devel + - cgal-cpp + - gmp + - mpfr + - eigen + - llvm-openmp # [osx] + - libgomp # [linux] + - intel-openmp # [win] run: - python - tbb - - numpy + - {{ pin_compatible('numpy') }} - gudhi >=3.8 - tqdm - scipy @@ -43,6 +64,9 @@ requirements: - matplotlib-base - scikit-learn - pot + - llvm-openmp # [osx] + - libgomp # [linux] + - intel-openmp # [win] test: @@ -56,7 +80,7 @@ test: about: home: https://davidlapous.github.io/multipers/ summary: Multiparameter Topological Persistence for Machine Learning - license: MIT + license: GPL-3.0-or-later license_file: LICENSE extra: