diff --git a/.azure-pipelines/azure-pipelines-linux.yml b/.azure-pipelines/azure-pipelines-linux.yml deleted file mode 100755 index 90be224..0000000 --- a/.azure-pipelines/azure-pipelines-linux.yml +++ /dev/null @@ -1,52 +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-cos7-x86_64 - linux_64_python3.11.____cpython: - CONFIG: linux_64_python3.11.____cpython - UPLOAD_PACKAGES: 'True' - DOCKER_IMAGE: quay.io/condaforge/linux-anvil-cos7-x86_64 - linux_64_python3.8.____cpython: - CONFIG: linux_64_python3.8.____cpython - UPLOAD_PACKAGES: 'True' - DOCKER_IMAGE: quay.io/condaforge/linux-anvil-cos7-x86_64 - linux_64_python3.9.____cpython: - CONFIG: linux_64_python3.9.____cpython - UPLOAD_PACKAGES: 'True' - DOCKER_IMAGE: quay.io/condaforge/linux-anvil-cos7-x86_64 - timeoutInMinutes: 360 - - steps: - # 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 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) \ No newline at end of file diff --git a/.azure-pipelines/azure-pipelines-osx.yml b/.azure-pipelines/azure-pipelines-osx.yml index 6ba8295..c94cdf7 100755 --- a/.azure-pipelines/azure-pipelines-osx.yml +++ b/.azure-pipelines/azure-pipelines-osx.yml @@ -5,27 +5,35 @@ jobs: - job: osx pool: - vmImage: macOS-11 + 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' - osx_64_python3.8.____cpython: - CONFIG: osx_64_python3.8.____cpython + VMIMAGE: macOS-15 + osx_64_python3.12.____cpython: + CONFIG: osx_64_python3.12.____cpython UPLOAD_PACKAGES: 'True' - osx_64_python3.9.____cpython: - CONFIG: osx_64_python3.9.____cpython + VMIMAGE: macOS-15 + osx_64_python3.13.____cp313: + CONFIG: osx_64_python3.13.____cp313 UPLOAD_PACKAGES: 'True' + VMIMAGE: macOS-15 timeoutInMinutes: 360 + variables: {} steps: # TODO: Fast finish on azure pipelines? - script: | export CI=azure + export flow_run_id=azure_$(Build.BuildNumber).$(System.JobAttempt) + export remote_url=$(Build.Repository.Uri) + export sha=$(Build.SourceVersion) export OSX_FORCE_SDK_DOWNLOAD="1" export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) @@ -39,4 +47,4 @@ jobs: env: BINSTAR_TOKEN: $(BINSTAR_TOKEN) FEEDSTOCK_TOKEN: $(FEEDSTOCK_TOKEN) - STAGING_BINSTAR_TOKEN: $(STAGING_BINSTAR_TOKEN) \ No newline at end of file + STAGING_BINSTAR_TOKEN: $(STAGING_BINSTAR_TOKEN) diff --git a/.azure-pipelines/azure-pipelines-win.yml b/.azure-pipelines/azure-pipelines-win.yml index b6303f1..dc5d25b 100755 --- a/.azure-pipelines/azure-pipelines-win.yml +++ b/.azure-pipelines/azure-pipelines-win.yml @@ -14,45 +14,34 @@ jobs: win_64_python3.11.____cpython: CONFIG: win_64_python3.11.____cpython UPLOAD_PACKAGES: 'True' - win_64_python3.8.____cpython: - CONFIG: win_64_python3.8.____cpython + win_64_python3.12.____cpython: + CONFIG: win_64_python3.12.____cpython UPLOAD_PACKAGES: 'True' - win_64_python3.9.____cpython: - CONFIG: win_64_python3.9.____cpython + win_64_python3.13.____cp313: + CONFIG: win_64_python3.13.____cp313 UPLOAD_PACKAGES: 'True' timeoutInMinutes: 360 variables: CONDA_BLD_PATH: D:\\bld\\ + MINIFORGE_HOME: D:\Miniforge UPLOAD_TEMP: D:\\tmp steps: - - task: PythonScript@0 - displayName: 'Download Miniforge' - inputs: - scriptSource: inline - script: | - import urllib.request - url = 'https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-Windows-x86_64.exe' - path = r"$(Build.ArtifactStagingDirectory)/Miniforge.exe" - urllib.request.urlretrieve(url, path) - - - script: | - start /wait "" %BUILD_ARTIFACTSTAGINGDIRECTORY%\Miniforge.exe /InstallationType=JustMe /RegisterPython=0 /S /D=C:\Miniforge - displayName: Install Miniforge - - - powershell: Write-Host "##vso[task.prependpath]C:\Miniforge\Scripts" - displayName: Add conda to PATH - - script: | call ".scripts\run_win_build.bat" displayName: Run Windows build env: + MINIFORGE_HOME: $(MINIFORGE_HOME) + CONDA_BLD_PATH: $(CONDA_BLD_PATH) PYTHONUNBUFFERED: 1 CONFIG: $(CONFIG) CI: azure + flow_run_id: azure_$(Build.BuildNumber).$(System.JobAttempt) + remote_url: $(Build.Repository.Uri) + sha: $(Build.SourceVersion) UPLOAD_PACKAGES: $(UPLOAD_PACKAGES) UPLOAD_TEMP: $(UPLOAD_TEMP) BINSTAR_TOKEN: $(BINSTAR_TOKEN) FEEDSTOCK_TOKEN: $(FEEDSTOCK_TOKEN) - STAGING_BINSTAR_TOKEN: $(STAGING_BINSTAR_TOKEN) \ No newline at end of file + STAGING_BINSTAR_TOKEN: $(STAGING_BINSTAR_TOKEN) diff --git a/.ci_support/linux_64_python3.10.____cpython.yaml b/.ci_support/linux_64_python3.10.____cpython.yaml index f7b223f..6b4e85b 100644 --- a/.ci_support/linux_64_python3.10.____cpython.yaml +++ b/.ci_support/linux_64_python3.10.____cpython.yaml @@ -1,9 +1,7 @@ c_compiler: - gcc c_compiler_version: -- '12' -cdt_name: -- cos6 +- '14' channel_sources: - conda-forge channel_targets: @@ -11,11 +9,13 @@ channel_targets: cxx_compiler: - gxx cxx_compiler_version: -- '12' +- '14' docker_image: -- quay.io/condaforge/linux-anvil-cos7-x86_64 +- quay.io/condaforge/linux-anvil-x86_64:alma9 libboost_python_devel: -- '1.82' +- '1.86' +libitk_devel: +- '5.4' pin_run_as_build: python: min_pin: x.x @@ -25,9 +25,9 @@ python: target_platform: - linux-64 tbb_devel: -- '2021' +- '2022' vtk: -- 9.2.6 +- 9.6.0 zip_keys: - - c_compiler_version - cxx_compiler_version diff --git a/.ci_support/linux_64_python3.11.____cpython.yaml b/.ci_support/linux_64_python3.11.____cpython.yaml index 5b1c50d..93fdcce 100644 --- a/.ci_support/linux_64_python3.11.____cpython.yaml +++ b/.ci_support/linux_64_python3.11.____cpython.yaml @@ -1,9 +1,7 @@ c_compiler: - gcc c_compiler_version: -- '12' -cdt_name: -- cos6 +- '14' channel_sources: - conda-forge channel_targets: @@ -11,11 +9,13 @@ channel_targets: cxx_compiler: - gxx cxx_compiler_version: -- '12' +- '14' docker_image: -- quay.io/condaforge/linux-anvil-cos7-x86_64 +- quay.io/condaforge/linux-anvil-x86_64:alma9 libboost_python_devel: -- '1.82' +- '1.86' +libitk_devel: +- '5.4' pin_run_as_build: python: min_pin: x.x @@ -25,9 +25,9 @@ python: target_platform: - linux-64 tbb_devel: -- '2021' +- '2022' vtk: -- 9.2.6 +- 9.6.0 zip_keys: - - c_compiler_version - cxx_compiler_version diff --git a/.ci_support/linux_64_python3.9.____cpython.yaml b/.ci_support/linux_64_python3.12.____cpython.yaml similarity index 73% rename from .ci_support/linux_64_python3.9.____cpython.yaml rename to .ci_support/linux_64_python3.12.____cpython.yaml index 7cdb980..6f8dfa9 100644 --- a/.ci_support/linux_64_python3.9.____cpython.yaml +++ b/.ci_support/linux_64_python3.12.____cpython.yaml @@ -1,9 +1,7 @@ c_compiler: - gcc c_compiler_version: -- '12' -cdt_name: -- cos6 +- '14' channel_sources: - conda-forge channel_targets: @@ -11,23 +9,25 @@ channel_targets: cxx_compiler: - gxx cxx_compiler_version: -- '12' +- '14' docker_image: -- quay.io/condaforge/linux-anvil-cos7-x86_64 +- quay.io/condaforge/linux-anvil-x86_64:alma9 libboost_python_devel: -- '1.82' +- '1.86' +libitk_devel: +- '5.4' pin_run_as_build: python: min_pin: x.x max_pin: x.x python: -- 3.9.* *_cpython +- 3.12.* *_cpython target_platform: - linux-64 tbb_devel: -- '2021' +- '2022' vtk: -- 9.2.6 +- 9.6.0 zip_keys: - - c_compiler_version - cxx_compiler_version diff --git a/.ci_support/linux_64_python3.8.____cpython.yaml b/.ci_support/linux_64_python3.13.____cp313.yaml similarity index 74% rename from .ci_support/linux_64_python3.8.____cpython.yaml rename to .ci_support/linux_64_python3.13.____cp313.yaml index 78756ef..c9a14ae 100644 --- a/.ci_support/linux_64_python3.8.____cpython.yaml +++ b/.ci_support/linux_64_python3.13.____cp313.yaml @@ -1,9 +1,7 @@ c_compiler: - gcc c_compiler_version: -- '12' -cdt_name: -- cos6 +- '14' channel_sources: - conda-forge channel_targets: @@ -11,23 +9,25 @@ channel_targets: cxx_compiler: - gxx cxx_compiler_version: -- '12' +- '14' docker_image: -- quay.io/condaforge/linux-anvil-cos7-x86_64 +- quay.io/condaforge/linux-anvil-x86_64:alma9 libboost_python_devel: -- '1.82' +- '1.86' +libitk_devel: +- '5.4' pin_run_as_build: python: min_pin: x.x max_pin: x.x python: -- 3.8.* *_cpython +- 3.13.* *_cp313 target_platform: - linux-64 tbb_devel: -- '2021' +- '2022' vtk: -- 9.2.6 +- 9.6.0 zip_keys: - - c_compiler_version - cxx_compiler_version diff --git a/.ci_support/migrations/boost_cpp_to_libboost.yaml b/.ci_support/migrations/boost_cpp_to_libboost.yaml deleted file mode 100644 index d4da41e..0000000 --- a/.ci_support/migrations/boost_cpp_to_libboost.yaml +++ /dev/null @@ -1,21 +0,0 @@ -migrator_ts: 1695775149 -__migrator: - kind: version - migration_number: 1 - bump_number: 1 - commit_message: "Rebuild for libboost 1.82" - # limit the number of prs for ramp-up - pr_limit: 20 - max_solver_attempts: 3 # this will make the bot retry "not solvable" stuff 3 times -libboost_devel: - - 1.82 -# This migration is matched with a piggy-back migrator -# (see https://github.com/regro/cf-scripts/pull/1668) -# that will replace boost-cpp with libboost-devel -boost_cpp: - - 1.82 -# same for boost -> libboost-python-devel -libboost_python_devel: - - 1.82 -boost: - - 1.82 diff --git a/.ci_support/osx_64_python3.10.____cpython.yaml b/.ci_support/osx_64_python3.10.____cpython.yaml index b46a08a..eec25f5 100644 --- a/.ci_support/osx_64_python3.10.____cpython.yaml +++ b/.ci_support/osx_64_python3.10.____cpython.yaml @@ -1,9 +1,11 @@ MACOSX_DEPLOYMENT_TARGET: -- '10.9' +- '11.0' +MACOSX_SDK_VERSION: +- '11.0' c_compiler: - clang c_compiler_version: -- '16' +- '19' channel_sources: - conda-forge channel_targets: @@ -11,9 +13,11 @@ channel_targets: cxx_compiler: - clangxx cxx_compiler_version: -- '16' +- '19' libboost_python_devel: -- '1.82' +- '1.86' +libitk_devel: +- '5.4' macos_machine: - x86_64-apple-darwin13.4.0 pin_run_as_build: @@ -25,9 +29,9 @@ python: target_platform: - osx-64 tbb_devel: -- '2021' +- '2022' vtk: -- 9.2.6 +- 9.6.0 zip_keys: - - c_compiler_version - cxx_compiler_version diff --git a/.ci_support/osx_64_python3.11.____cpython.yaml b/.ci_support/osx_64_python3.11.____cpython.yaml index 71d9b9d..d521844 100644 --- a/.ci_support/osx_64_python3.11.____cpython.yaml +++ b/.ci_support/osx_64_python3.11.____cpython.yaml @@ -1,9 +1,11 @@ MACOSX_DEPLOYMENT_TARGET: -- '10.9' +- '11.0' +MACOSX_SDK_VERSION: +- '11.0' c_compiler: - clang c_compiler_version: -- '16' +- '19' channel_sources: - conda-forge channel_targets: @@ -11,9 +13,11 @@ channel_targets: cxx_compiler: - clangxx cxx_compiler_version: -- '16' +- '19' libboost_python_devel: -- '1.82' +- '1.86' +libitk_devel: +- '5.4' macos_machine: - x86_64-apple-darwin13.4.0 pin_run_as_build: @@ -25,9 +29,9 @@ python: target_platform: - osx-64 tbb_devel: -- '2021' +- '2022' vtk: -- 9.2.6 +- 9.6.0 zip_keys: - - c_compiler_version - cxx_compiler_version diff --git a/.ci_support/osx_64_python3.9.____cpython.yaml b/.ci_support/osx_64_python3.12.____cpython.yaml similarity index 77% rename from .ci_support/osx_64_python3.9.____cpython.yaml rename to .ci_support/osx_64_python3.12.____cpython.yaml index 1c10885..7e8c2a7 100644 --- a/.ci_support/osx_64_python3.9.____cpython.yaml +++ b/.ci_support/osx_64_python3.12.____cpython.yaml @@ -1,9 +1,11 @@ MACOSX_DEPLOYMENT_TARGET: -- '10.9' +- '11.0' +MACOSX_SDK_VERSION: +- '11.0' c_compiler: - clang c_compiler_version: -- '16' +- '19' channel_sources: - conda-forge channel_targets: @@ -11,9 +13,11 @@ channel_targets: cxx_compiler: - clangxx cxx_compiler_version: -- '16' +- '19' libboost_python_devel: -- '1.82' +- '1.86' +libitk_devel: +- '5.4' macos_machine: - x86_64-apple-darwin13.4.0 pin_run_as_build: @@ -21,13 +25,13 @@ pin_run_as_build: min_pin: x.x max_pin: x.x python: -- 3.9.* *_cpython +- 3.12.* *_cpython target_platform: - osx-64 tbb_devel: -- '2021' +- '2022' vtk: -- 9.2.6 +- 9.6.0 zip_keys: - - c_compiler_version - cxx_compiler_version diff --git a/.ci_support/osx_64_python3.8.____cpython.yaml b/.ci_support/osx_64_python3.13.____cp313.yaml similarity index 78% rename from .ci_support/osx_64_python3.8.____cpython.yaml rename to .ci_support/osx_64_python3.13.____cp313.yaml index 8978c7b..98f31ec 100644 --- a/.ci_support/osx_64_python3.8.____cpython.yaml +++ b/.ci_support/osx_64_python3.13.____cp313.yaml @@ -1,9 +1,11 @@ MACOSX_DEPLOYMENT_TARGET: -- '10.9' +- '11.0' +MACOSX_SDK_VERSION: +- '11.0' c_compiler: - clang c_compiler_version: -- '16' +- '19' channel_sources: - conda-forge channel_targets: @@ -11,9 +13,11 @@ channel_targets: cxx_compiler: - clangxx cxx_compiler_version: -- '16' +- '19' libboost_python_devel: -- '1.82' +- '1.86' +libitk_devel: +- '5.4' macos_machine: - x86_64-apple-darwin13.4.0 pin_run_as_build: @@ -21,13 +25,13 @@ pin_run_as_build: min_pin: x.x max_pin: x.x python: -- 3.8.* *_cpython +- 3.13.* *_cp313 target_platform: - osx-64 tbb_devel: -- '2021' +- '2022' vtk: -- 9.2.6 +- 9.6.0 zip_keys: - - c_compiler_version - cxx_compiler_version diff --git a/.ci_support/win_64_python3.10.____cpython.yaml b/.ci_support/win_64_python3.10.____cpython.yaml index cc72e48..3124064 100644 --- a/.ci_support/win_64_python3.10.____cpython.yaml +++ b/.ci_support/win_64_python3.10.____cpython.yaml @@ -1,11 +1,13 @@ c_compiler: -- vs2019 +- vs2022 channel_sources: - conda-forge channel_targets: - conda-forge main cxx_compiler: -- vs2019 +- vs2022 +libitk_devel: +- '5.4' pin_run_as_build: python: min_pin: x.x @@ -15,6 +17,6 @@ python: target_platform: - win-64 tbb_devel: -- '2021' +- '2022' vtk: -- 9.2.6 +- 9.6.0 diff --git a/.ci_support/win_64_python3.11.____cpython.yaml b/.ci_support/win_64_python3.11.____cpython.yaml index 48a6ccb..0924278 100644 --- a/.ci_support/win_64_python3.11.____cpython.yaml +++ b/.ci_support/win_64_python3.11.____cpython.yaml @@ -1,11 +1,13 @@ c_compiler: -- vs2019 +- vs2022 channel_sources: - conda-forge channel_targets: - conda-forge main cxx_compiler: -- vs2019 +- vs2022 +libitk_devel: +- '5.4' pin_run_as_build: python: min_pin: x.x @@ -15,6 +17,6 @@ python: target_platform: - win-64 tbb_devel: -- '2021' +- '2022' vtk: -- 9.2.6 +- 9.6.0 diff --git a/.ci_support/win_64_python3.9.____cpython.yaml b/.ci_support/win_64_python3.12.____cpython.yaml similarity index 72% rename from .ci_support/win_64_python3.9.____cpython.yaml rename to .ci_support/win_64_python3.12.____cpython.yaml index 141e8e0..44ea9e1 100644 --- a/.ci_support/win_64_python3.9.____cpython.yaml +++ b/.ci_support/win_64_python3.12.____cpython.yaml @@ -1,20 +1,22 @@ c_compiler: -- vs2019 +- vs2022 channel_sources: - conda-forge channel_targets: - conda-forge main cxx_compiler: -- vs2019 +- vs2022 +libitk_devel: +- '5.4' pin_run_as_build: python: min_pin: x.x max_pin: x.x python: -- 3.9.* *_cpython +- 3.12.* *_cpython target_platform: - win-64 tbb_devel: -- '2021' +- '2022' vtk: -- 9.2.6 +- 9.6.0 diff --git a/.ci_support/win_64_python3.8.____cpython.yaml b/.ci_support/win_64_python3.13.____cp313.yaml similarity index 73% rename from .ci_support/win_64_python3.8.____cpython.yaml rename to .ci_support/win_64_python3.13.____cp313.yaml index d2e6a74..1dd24fa 100644 --- a/.ci_support/win_64_python3.8.____cpython.yaml +++ b/.ci_support/win_64_python3.13.____cp313.yaml @@ -1,20 +1,22 @@ c_compiler: -- vs2019 +- vs2022 channel_sources: - conda-forge channel_targets: - conda-forge main cxx_compiler: -- vs2019 +- vs2022 +libitk_devel: +- '5.4' pin_run_as_build: python: min_pin: x.x max_pin: x.x python: -- 3.8.* *_cpython +- 3.13.* *_cp313 target_platform: - win-64 tbb_devel: -- '2021' +- '2022' vtk: -- 9.2.6 +- 9.6.0 diff --git a/.gitattributes b/.gitattributes index 7f32763..85ccb8f 100644 --- a/.gitattributes +++ b/.gitattributes @@ -20,8 +20,9 @@ bld.bat text eol=crlf .travis.yml linguist-generated=true .scripts/* linguist-generated=true .woodpecker.yml linguist-generated=true -LICENSE.txt linguist-generated=true -README.md linguist-generated=true +/LICENSE.txt linguist-generated=true +/README.md linguist-generated=true azure-pipelines.yml linguist-generated=true build-locally.py linguist-generated=true +pixi.toml linguist-generated=true shippable.yml linguist-generated=true diff --git a/.github/workflows/conda-build.yml b/.github/workflows/conda-build.yml index a948c6c..78e00b5 100644 --- a/.github/workflows/conda-build.yml +++ b/.github/workflows/conda-build.yml @@ -1,15 +1,125 @@ -# 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 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/.gitignore b/.gitignore index c89ecb7..47b5408 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,29 @@ +# User content belongs under recipe/. +# Feedstock configuration goes in `conda-forge.yml` +# Everything else is managed by the conda-smithy rerender process. +# Please do not modify + +# Ignore all files and folders in root +* +!/conda-forge.yml + +# Don't ignore any files/folders if the parent folder is 'un-ignored' +# This also avoids warnings when adding an already-checked file with an ignored parent. +!/**/ +# Don't ignore any files/folders recursively in the following folders +!/recipe/** +!/.ci_support/** + +# Since we ignore files/folders recursively, any folders inside +# build_artifacts gets ignored which trips some build systems. +# To avoid that we 'un-ignore' all files/folders recursively +# and only ignore the root build_artifacts folder. +!/build_artifacts/** +/build_artifacts + *.pyc -build_artifacts +# Rattler-build's artifacts are in `output` when not specifying anything. +/output +# Pixi's configuration +.pixi diff --git a/.scripts/build_steps.sh b/.scripts/build_steps.sh index b206c50..1e6872b 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 < /opt/conda/conda-meta/history +micromamba install --root-prefix ~/.conda --prefix /opt/conda \ + --yes --override-channels --channel conda-forge --strict-channel-priority \ + pip python=3.12 conda-build conda-forge-ci-setup=4 "conda-build>=24.1" +export CONDA_LIBMAMBA_SOLVER_NO_CHANNELS_FROM_INSTALLED=1 # set up the condarc setup_conda_rc "${FEEDSTOCK_ROOT}" "${RECIPE_ROOT}" "${CONFIG_FILE}" source run_conda_forge_build_setup +( +# Due to https://bugzilla.redhat.com/show_bug.cgi?id=1537564 old versions of rpm +# are drastically slowed down when the number of file descriptors is very high. +# This can be visible during a `yum install` step of a feedstock build. +# => Set a lower limit in a subshell for the `yum install`s only. +ulimit -n 1024 # Install the yum requirements defined canonically in the # "recipe/yum_requirements.txt" file. After updating that file, # run "conda smithy rerender" and this line will be updated # automatically. /usr/bin/sudo -n yum install -y mesa-libGL mesa-dri-drivers libselinux libXdamage libXxf86vm libXext libXt-devel mesa-libGLU-devel xorg-x11-server-Xvfb - +) # make the build number clobber make_build_number "${FEEDSTOCK_ROOT}" "${RECIPE_ROOT}" "${CONFIG_FILE}" @@ -71,9 +80,16 @@ if [[ "${BUILD_WITH_CONDA_DEBUG:-0}" == 1 ]]; then # Drop into an interactive shell /bin/bash else - conda mambabuild "${RECIPE_ROOT}" -m "${CI_SUPPORT}/${CONFIG}.yaml" \ + conda-build "${RECIPE_ROOT}" -m "${CI_SUPPORT}/${CONFIG}.yaml" \ --suppress-variables ${EXTRA_CB_OPTIONS:-} \ - --clobber-file "${CI_SUPPORT}/clobber_${CONFIG}.yaml" + --clobber-file "${CI_SUPPORT}/clobber_${CONFIG}.yaml" \ + --extra-meta flow_run_id="${flow_run_id:-}" remote_url="${remote_url:-}" sha="${sha:-}" + ( startgroup "Inspecting artifacts" ) 2> /dev/null + + # inspect_artifacts was only added in conda-forge-ci-setup 4.9.4 + command -v inspect_artifacts >/dev/null 2>&1 && inspect_artifacts --recipe-dir "${RECIPE_ROOT}" -m "${CONFIG_FILE}" || echo "inspect_artifacts needs conda-forge-ci-setup >=4.9.4" + + ( endgroup "Inspecting artifacts" ) 2> /dev/null ( startgroup "Validating outputs" ) 2> /dev/null validate_recipe_outputs "${FEEDSTOCK_NAME}" @@ -91,4 +107,4 @@ fi ( startgroup "Final checks" ) 2> /dev/null -touch "${FEEDSTOCK_ROOT}/build_artifacts/conda-forge-build-done-${CONFIG}" \ No newline at end of file +touch "${FEEDSTOCK_ROOT}/build_artifacts/conda-forge-build-done-${CONFIG}" diff --git a/.scripts/run_docker_build.sh b/.scripts/run_docker_build.sh index 9236239..10d6a2a 100755 --- a/.scripts/run_docker_build.sh +++ b/.scripts/run_docker_build.sh @@ -11,8 +11,10 @@ source .scripts/logging_utils.sh set -xeo pipefail +DOCKER_EXECUTABLE="${DOCKER_EXECUTABLE:-docker}" + THISDIR="$( cd "$( dirname "$0" )" >/dev/null && pwd )" -PROVIDER_DIR="$(basename $THISDIR)" +PROVIDER_DIR="$(basename "$THISDIR")" FEEDSTOCK_ROOT="$( cd "$( dirname "$0" )/.." >/dev/null && pwd )" RECIPE_ROOT="${FEEDSTOCK_ROOT}/recipe" @@ -21,7 +23,13 @@ if [ -z ${FEEDSTOCK_NAME} ]; then export FEEDSTOCK_NAME=$(basename ${FEEDSTOCK_ROOT}) fi -docker info +if [[ "${sha:-}" == "" ]]; then + pushd "${FEEDSTOCK_ROOT}" + sha=$(git rev-parse HEAD) + popd +fi + +${DOCKER_EXECUTABLE} info # In order for the conda-build process in the container to write to the mounted # volumes, we need to run with the same id as the host machine, which is @@ -29,6 +37,7 @@ docker info export HOST_USER_ID=$(id -u) # Check if docker-machine is being used (normally on OSX) and get the uid from # the VM + if hash docker-machine 2> /dev/null && docker-machine active > /dev/null; then export HOST_USER_ID=$(docker-machine ssh $(docker-machine active) id -u) fi @@ -70,16 +79,34 @@ if [ -z "${CI}" ]; then DOCKER_RUN_ARGS="-it ${DOCKER_RUN_ARGS}" fi -( endgroup "Configure Docker" ) 2> /dev/null +# Default volume suffix for Docker (preserve original behavior) +VOLUME_SUFFIX=",z" + +# Podman-specific handling +if [ "${DOCKER_EXECUTABLE}" = "podman" ]; then + # Fix file permissions for rootless podman builds + podman unshare chown -R ${HOST_USER_ID}:${HOST_USER_ID} "${ARTIFACTS}" + podman unshare chown -R ${HOST_USER_ID}:${HOST_USER_ID} "${RECIPE_ROOT}" + # Add SELinux label only if enforcing + if command -v getenforce &>/dev/null && [ "$(getenforce)" = "Enforcing" ]; then + VOLUME_SUFFIX=",z" + else + VOLUME_SUFFIX="" + fi +fi + +( endgroup "Configure Docker" ) 2> /dev/null ( startgroup "Start Docker" ) 2> /dev/null export UPLOAD_PACKAGES="${UPLOAD_PACKAGES:-True}" export IS_PR_BUILD="${IS_PR_BUILD:-False}" -docker pull "${DOCKER_IMAGE}" -docker run ${DOCKER_RUN_ARGS} \ - -v "${RECIPE_ROOT}":/home/conda/recipe_root:rw,z,delegated \ - -v "${FEEDSTOCK_ROOT}":/home/conda/feedstock_root:rw,z,delegated \ + +${DOCKER_EXECUTABLE} pull "${DOCKER_IMAGE}" + +${DOCKER_EXECUTABLE} run ${DOCKER_RUN_ARGS} \ + -v "${RECIPE_ROOT}":/home/conda/recipe_root:rw${VOLUME_SUFFIX},delegated \ + -v "${FEEDSTOCK_ROOT}":/home/conda/feedstock_root:rw${VOLUME_SUFFIX},delegated \ -e CONFIG \ -e HOST_USER_ID \ -e UPLOAD_PACKAGES \ @@ -91,6 +118,9 @@ docker run ${DOCKER_RUN_ARGS} \ -e CPU_COUNT \ -e BUILD_WITH_CONDA_DEBUG \ -e BUILD_OUTPUT_ID \ + -e flow_run_id \ + -e remote_url \ + -e sha \ -e BINSTAR_TOKEN \ -e FEEDSTOCK_TOKEN \ -e STAGING_BINSTAR_TOKEN \ @@ -102,4 +132,4 @@ docker run ${DOCKER_RUN_ARGS} \ test -f "$DONE_CANARY" # This closes the last group opened in `build_steps.sh` -( endgroup "Final checks" ) 2> /dev/null \ No newline at end of file +( endgroup "Final checks" ) 2> /dev/null diff --git a/.scripts/run_osx_build.sh b/.scripts/run_osx_build.sh index 4758f0d..df767d0 100755 --- a/.scripts/run_osx_build.sh +++ b/.scripts/run_osx_build.sh @@ -6,27 +6,41 @@ source .scripts/logging_utils.sh set -xe -MINIFORGE_HOME=${MINIFORGE_HOME:-${HOME}/miniforge3} - -( startgroup "Installing a fresh version of Miniforge" ) 2> /dev/null - -MINIFORGE_URL="https://github.com/conda-forge/miniforge/releases/latest/download" -MINIFORGE_FILE="Mambaforge-MacOSX-$(uname -m).sh" -curl -L -O "${MINIFORGE_URL}/${MINIFORGE_FILE}" -rm -rf ${MINIFORGE_HOME} -bash $MINIFORGE_FILE -b -p ${MINIFORGE_HOME} - -( endgroup "Installing a fresh version of Miniforge" ) 2> /dev/null +MINIFORGE_HOME="${MINIFORGE_HOME:-${HOME}/miniforge3}" +MINIFORGE_HOME="${MINIFORGE_HOME%/}" # remove trailing slash +export CONDA_BLD_PATH="${CONDA_BLD_PATH:-${MINIFORGE_HOME}/conda-bld}" + +( startgroup "Provisioning base env with micromamba" ) 2> /dev/null +MICROMAMBA_VERSION="1.5.10-0" +if [[ "$(uname -m)" == "arm64" ]]; then + osx_arch="osx-arm64" +else + osx_arch="osx-64" +fi +MICROMAMBA_URL="https://github.com/mamba-org/micromamba-releases/releases/download/${MICROMAMBA_VERSION}/micromamba-${osx_arch}" +MAMBA_ROOT_PREFIX="${MINIFORGE_HOME}-micromamba-$(date +%s)" +echo "Downloading micromamba ${MICROMAMBA_VERSION}" +micromamba_exe="$(mktemp -d)/micromamba" +curl -L -o "${micromamba_exe}" "${MICROMAMBA_URL}" +chmod +x "${micromamba_exe}" +echo "Creating environment" +"${micromamba_exe}" create --yes --root-prefix "${MAMBA_ROOT_PREFIX}" --prefix "${MINIFORGE_HOME}" \ + --channel conda-forge \ + pip python=3.12 conda-build conda-forge-ci-setup=4 "conda-build>=24.1" +echo "Moving pkgs cache from ${MAMBA_ROOT_PREFIX} to ${MINIFORGE_HOME}" +mv "${MAMBA_ROOT_PREFIX}/pkgs" "${MINIFORGE_HOME}" +echo "Cleaning up micromamba" +rm -rf "${MAMBA_ROOT_PREFIX}" "${micromamba_exe}" || true +( endgroup "Provisioning base env with micromamba" ) 2> /dev/null ( startgroup "Configuring conda" ) 2> /dev/null - -source ${MINIFORGE_HOME}/etc/profile.d/conda.sh +echo "Activating environment" +source "${MINIFORGE_HOME}/etc/profile.d/conda.sh" conda activate base +export CONDA_SOLVER="libmamba" +export CONDA_LIBMAMBA_SOLVER_NO_CHANNELS_FROM_INSTALLED=1 + -mamba install --update-specs --quiet --yes --channel conda-forge --strict-channel-priority \ - pip mamba conda-build boa conda-forge-ci-setup=3 -mamba update --update-specs --yes --quiet --channel conda-forge --strict-channel-priority \ - pip mamba conda-build boa conda-forge-ci-setup=3 @@ -45,6 +59,29 @@ else echo -e "\n\nNot mangling homebrew as we are not running in CI" fi +if [[ "${sha:-}" == "" ]]; then + sha=$(git rev-parse HEAD) +fi + +if [[ "${OSX_SDK_DIR:-}" == "" ]]; then + if [[ "${CI:-}" == "" ]]; then + echo "Please set OSX_SDK_DIR to a directory where SDKs can be downloaded to. Aborting" + exit 1 + else + export OSX_SDK_DIR=/opt/conda-sdks + /usr/bin/sudo mkdir -p "${OSX_SDK_DIR}" + /usr/bin/sudo chown "${USER}" "${OSX_SDK_DIR}" + fi +else + if tmpf=$(mktemp -p "$OSX_SDK_DIR" tmp.XXXXXXXX 2>/dev/null); then + rm -f "$tmpf" + echo "OSX_SDK_DIR is writeable without sudo, continuing" + else + echo "User-provided OSX_SDK_DIR is not writeable for current user! Aborting" + exit 1 + fi +fi + echo -e "\n\nRunning the build setup script." source run_conda_forge_build_setup @@ -71,9 +108,17 @@ if [[ "${BUILD_WITH_CONDA_DEBUG:-0}" == 1 ]]; then /bin/bash else - conda mambabuild ./recipe -m ./.ci_support/${CONFIG}.yaml \ + conda-build ./recipe -m ./.ci_support/${CONFIG}.yaml \ --suppress-variables ${EXTRA_CB_OPTIONS:-} \ - --clobber-file ./.ci_support/clobber_${CONFIG}.yaml + --clobber-file ./.ci_support/clobber_${CONFIG}.yaml \ + --extra-meta flow_run_id="$flow_run_id" remote_url="$remote_url" sha="$sha" + + ( startgroup "Inspecting artifacts" ) 2> /dev/null + + # inspect_artifacts was only added in conda-forge-ci-setup 4.9.4 + command -v inspect_artifacts >/dev/null 2>&1 && inspect_artifacts --recipe-dir ./recipe -m ./.ci_support/${CONFIG}.yaml || echo "inspect_artifacts needs conda-forge-ci-setup >=4.9.4" + + ( endgroup "Inspecting artifacts" ) 2> /dev/null ( startgroup "Validating outputs" ) 2> /dev/null validate_recipe_outputs "${FEEDSTOCK_NAME}" @@ -87,4 +132,4 @@ else fi ( endgroup "Uploading packages" ) 2> /dev/null -fi \ No newline at end of file +fi diff --git a/.scripts/run_win_build.bat b/.scripts/run_win_build.bat index c4486d9..2b9fd75 100755 --- a/.scripts/run_win_build.bat +++ b/.scripts/run_win_build.bat @@ -3,25 +3,50 @@ :: changes to this script, consider a proposal to conda-smithy so that other feedstocks can also :: benefit from the improvement. -:: Note: we assume a Miniforge installation is available - :: INPUTS (required environment variables) :: CONFIG: name of the .ci_support/*.yaml file for this job :: CI: azure, github_actions, or unset +:: MINIFORGE_HOME: where to install the base conda environment :: UPLOAD_PACKAGES: true or false :: UPLOAD_ON_BRANCH: true or false setlocal enableextensions enabledelayedexpansion +FOR %%A IN ("%~dp0.") DO SET "REPO_ROOT=%%~dpA" +if "%MINIFORGE_HOME%"=="" set "MINIFORGE_HOME=%USERPROFILE%\Miniforge3" +:: Remove trailing backslash, if present +if "%MINIFORGE_HOME:~-1%"=="\" set "MINIFORGE_HOME=%MINIFORGE_HOME:~0,-1%" +call :start_group "Provisioning base env with micromamba" +set "MAMBA_ROOT_PREFIX=%MINIFORGE_HOME%-micromamba-%RANDOM%" +set "MICROMAMBA_VERSION=1.5.10-0" +set "MICROMAMBA_URL=https://github.com/mamba-org/micromamba-releases/releases/download/%MICROMAMBA_VERSION%/micromamba-win-64" +set "MICROMAMBA_TMPDIR=%TMP%\micromamba-%RANDOM%" +set "MICROMAMBA_EXE=%MICROMAMBA_TMPDIR%\micromamba.exe" + +echo Downloading micromamba %MICROMAMBA_VERSION% +if not exist "%MICROMAMBA_TMPDIR%" mkdir "%MICROMAMBA_TMPDIR%" +powershell -ExecutionPolicy Bypass -Command "(New-Object Net.WebClient).DownloadFile('%MICROMAMBA_URL%', '%MICROMAMBA_EXE%')" +if !errorlevel! neq 0 exit /b !errorlevel! + +echo Creating environment +call "%MICROMAMBA_EXE%" create --yes --root-prefix "%MAMBA_ROOT_PREFIX%" --prefix "%MINIFORGE_HOME%" ^ + --channel conda-forge ^ + pip python=3.12 conda-build conda-forge-ci-setup=4 "conda-build>=24.1" +if !errorlevel! neq 0 exit /b !errorlevel! +echo Removing %MAMBA_ROOT_PREFIX% +del /S /Q "%MAMBA_ROOT_PREFIX%" >nul +del /S /Q "%MICROMAMBA_TMPDIR%" >nul +call :end_group + call :start_group "Configuring conda" :: Activate the base conda environment -call activate base - -:: Provision the necessary dependencies to build the recipe later -echo Installing dependencies -mamba.exe install "python=3.10" pip mamba conda-build boa conda-forge-ci-setup=3 -c conda-forge --strict-channel-priority --yes +echo Activating environment +call "%MINIFORGE_HOME%\Scripts\activate.bat" +:: Configure the solver +set "CONDA_SOLVER=libmamba" if !errorlevel! neq 0 exit /b !errorlevel! +set "CONDA_LIBMAMBA_SOLVER_NO_CHANNELS_FROM_INSTALLED=1" :: Set basic configuration echo Setting up configuration @@ -38,13 +63,22 @@ if EXIST LICENSE.txt ( copy LICENSE.txt "recipe\\recipe-scripts-license.txt" ) +if NOT [%flow_run_id%] == [] ( + set "EXTRA_CB_OPTIONS=%EXTRA_CB_OPTIONS% --extra-meta flow_run_id=%flow_run_id% remote_url=%remote_url% sha=%sha%" +) + call :end_group :: Build the recipe echo Building recipe -conda.exe mambabuild "recipe" -m .ci_support\%CONFIG%.yaml --suppress-variables %EXTRA_CB_OPTIONS% +conda-build.exe "recipe" -m .ci_support\%CONFIG%.yaml --suppress-variables %EXTRA_CB_OPTIONS% if !errorlevel! neq 0 exit /b !errorlevel! +call :start_group "Inspecting artifacts" +:: inspect_artifacts was only added in conda-forge-ci-setup 4.9.4 +WHERE inspect_artifacts >nul 2>nul && inspect_artifacts --recipe-dir ".\recipe" -m .ci_support\%CONFIG%.yaml || echo "inspect_artifacts needs conda-forge-ci-setup >=4.9.4" +call :end_group + :: Prepare some environment variables for the upload step if /i "%CI%" == "github_actions" ( set "FEEDSTOCK_NAME=%GITHUB_REPOSITORY:*/=%" @@ -109,4 +143,4 @@ if /i "%CI%" == "azure" ( echo ##[endgroup] exit /b ) -exit /b \ No newline at end of file +exit /b diff --git a/LICENSE.txt b/LICENSE.txt index 2ec51d7..c5aa738 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -1,6 +1,5 @@ BSD-3-Clause license -Copyright (c) 2015-2022, conda-forge contributors -All rights reserved. +Copyright (c) 2015-2026, conda-forge contributors Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: diff --git a/README.md b/README.md index a9e7f34..5306fbe 100644 --- a/README.md +++ b/README.md @@ -48,17 +48,17 @@ Current build status - linux_64_python3.8.____cpython + linux_64_python3.12.____cpython - variant + variant - linux_64_python3.9.____cpython + linux_64_python3.13.____cp313 - variant + variant @@ -76,17 +76,17 @@ Current build status - osx_64_python3.8.____cpython + osx_64_python3.12.____cpython - variant + variant - osx_64_python3.9.____cpython + osx_64_python3.13.____cp313 - variant + variant @@ -104,17 +104,17 @@ Current build status - win_64_python3.8.____cpython + win_64_python3.12.____cpython - variant + variant - win_64_python3.9.____cpython + win_64_python3.13.____cp313 - variant + variant @@ -198,15 +198,15 @@ available continuous integration services. Thanks to the awesome service provide [CircleCI](https://circleci.com/), [AppVeyor](https://www.appveyor.com/), [Drone](https://cloud.drone.io/welcome), and [TravisCI](https://travis-ci.com/) it is possible to build and upload installable packages to the -[conda-forge](https://anaconda.org/conda-forge) [Anaconda-Cloud](https://anaconda.org/) +[conda-forge](https://anaconda.org/conda-forge) [anaconda.org](https://anaconda.org/) channel for Linux, Windows and OSX respectively. -To manage the continuous integration and simplify feedstock maintenance +To manage the continuous integration and simplify feedstock maintenance, [conda-smithy](https://github.com/conda-forge/conda-smithy) has been developed. Using the ``conda-forge.yml`` within this repository, it is possible to re-render all of this feedstock's supporting files (e.g. the CI configuration files) with ``conda smithy rerender``. -For more information please check the [conda-forge documentation](https://conda-forge.org/docs/). +For more information, please check the [conda-forge documentation](https://conda-forge.org/docs/). Terminology =========== @@ -233,7 +233,7 @@ merged, the recipe will be re-built and uploaded automatically to the everybody to install and use from the `conda-forge` channel. Note that all branches in the conda-forge/vmtk-feedstock are immediately built and any created packages are uploaded, so PRs should be based -on branches in forks and branches in the main repository should only be used to +on branches in forks, and branches in the main repository should only be used to build distinct package versions. In order to produce a uniquely identifiable distribution: diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 6b346f5..03594e4 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -2,7 +2,31 @@ # 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-win.yml - - template: ./.azure-pipelines/azure-pipelines-osx.yml \ No newline at end of file +stages: +- stage: Check + jobs: + - job: Skip + pool: + vmImage: 'ubuntu-latest' + 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: and(eq(variables['Build.Reason'], 'PullRequest'), 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-osx.yml + - template: ./.azure-pipelines/azure-pipelines-win.yml \ No newline at end of file diff --git a/build-locally.py b/build-locally.py index 3f4b7a7..05493e4 100755 --- a/build-locally.py +++ b/build-locally.py @@ -1,13 +1,18 @@ -#!/usr/bin/env python3 +#!/bin/sh +"""exec" "python3" "$0" "$@" #""" # fmt: off # fmt: on + # # This file has been generated by conda-smithy in order to build the recipe # locally. # -import os +# The line above this comment is a bash / sh / zsh guard +# to stop people from running it with the wrong interpreter import glob +import os +import platform import subprocess +import sys from argparse import ArgumentParser -import platform def setup_environment(ns): @@ -34,10 +39,19 @@ def run_osx_build(ns): subprocess.check_call([script]) +def run_win_build(ns): + script = ".scripts/run_win_build.bat" + subprocess.check_call(["cmd", "/D", "/Q", "/C", f"CALL {script}"]) + + def verify_config(ns): + choices_filter = ns.filter or "*" valid_configs = { - os.path.basename(f)[:-5] for f in glob.glob(".ci_support/*.yaml") + os.path.basename(f)[:-5] + for f in glob.glob(f".ci_support/{choices_filter}.yaml") } + if choices_filter != "*": + print(f"filtering for '{choices_filter}.yaml' configs") print(f"valid configs are {valid_configs}") if ns.config in valid_configs: print("Using " + ns.config + " configuration") @@ -50,37 +64,43 @@ def verify_config(ns): selections = list(enumerate(sorted(valid_configs), 1)) for i, c in selections: print(f"{i}. {c}") - s = input("\n> ") + try: + s = input("\n> ") + except KeyboardInterrupt: + print("\nno option selected, bye!", file=sys.stderr) + sys.exit(1) idx = int(s) - 1 ns.config = selections[idx][1] print(f"selected {ns.config}") else: raise ValueError("config " + ns.config + " is not valid") - # Remove the following, as implemented - if ns.config.startswith("win"): - raise ValueError( - f"only Linux/macOS configs currently supported, got {ns.config}" + if ( + ns.config.startswith("osx") + and platform.system() == "Darwin" + and not os.environ.get("OSX_SDK_DIR") + ): + raise RuntimeError( + "Need OSX_SDK_DIR env variable set. Run 'export OSX_SDK_DIR=$PWD/SDKs' " + "to download the SDK automatically to '$PWD/SDKs/MacOSX.sdk'. " + "Note: OSX_SDK_DIR must be set to an absolute path. " + "Setting this variable implies agreement to the licensing terms of the SDK by Apple." ) - elif ns.config.startswith("osx"): - if "OSX_SDK_DIR" not in os.environ: - raise RuntimeError( - "Need OSX_SDK_DIR env variable set. Run 'export OSX_SDK_DIR=SDKs' " - "to download the SDK automatically to 'SDKs/MacOSX.sdk'. " - "Setting this variable implies agreement to the licensing terms of the SDK by Apple." - ) def main(args=None): p = ArgumentParser("build-locally") p.add_argument("config", default=None, nargs="?") + p.add_argument( + "--filter", + default=None, + help="Glob string to filter which build choices are presented in interactive mode.", + ) p.add_argument( "--debug", action="store_true", help="Setup debug environment using `conda debug`", ) - p.add_argument( - "--output-id", help="If running debug, specify the output to setup." - ) + p.add_argument("--output-id", help="If running debug, specify the output to setup.") ns = p.parse_args(args=args) verify_config(ns) @@ -93,10 +113,10 @@ def main(args=None): run_docker_build(ns) elif ns.config.startswith("osx"): run_osx_build(ns) + elif ns.config.startswith("win"): + run_win_build(ns) finally: - recipe_license_file = os.path.join( - "recipe", "recipe-scripts-license.txt" - ) + recipe_license_file = os.path.join("recipe", "recipe-scripts-license.txt") if os.path.exists(recipe_license_file): os.remove(recipe_license_file) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 45a5d07..34ea45c 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -16,23 +16,17 @@ source: - patches/0004-Fix-tests-for-new-vtk-version.patch build: - number: 14 + number: 15 requirements: build: - {{ compiler('c') }} - {{ compiler('cxx') }} - - {{ cdt('mesa-libgl-devel') }} # [linux] - - {{ cdt('mesa-dri-drivers') }} # [linux] - - {{ cdt('libselinux') }} # [linux] - - {{ cdt('libxdamage') }} # [linux] - - {{ cdt('libxxf86vm') }} # [linux] - - {{ cdt('libxext') }} # [linux] - pkgconfig # [unix] - cmake - git - ninja - - setuptools + - setuptools host: - python @@ -44,12 +38,13 @@ requirements: - llvm - setuptools # [win] - libboost-python-devel # [unix] + - libgl-devel # [linux] run: - python - - future + - future - llvm - joblib - - numpy + - numpy - h5py