diff --git a/.azure-pipelines/azure-pipelines-osx.yml b/.azure-pipelines/azure-pipelines-osx.yml index c38a01e..94c7e23 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_: diff --git a/.ci_support/linux_64_.yaml b/.ci_support/linux_64_.yaml index c9dcfe7..2fa1704 100644 --- a/.ci_support/linux_64_.yaml +++ b/.ci_support/linux_64_.yaml @@ -3,15 +3,15 @@ bzip2: c_compiler: - gcc c_compiler_version: -- '12' +- '13' c_stdlib: - sysroot c_stdlib_version: -- '2.12' +- '2.17' cairo: - '1' cdt_name: -- cos6 +- conda channel_sources: - conda-forge channel_targets: @@ -21,13 +21,13 @@ curl: cxx_compiler: - gxx cxx_compiler_version: -- '12' +- '13' docker_image: - quay.io/condaforge/linux-anvil-cos7-x86_64 fortran_compiler: - gfortran fortran_compiler_version: -- '12' +- '13' freetype: - '2' gsl: @@ -43,7 +43,7 @@ libblas: libcblas: - 3.9 *netlib libgdal: -- '3.9' +- '3.10' libiconv: - '1' libjpeg_turbo: @@ -55,14 +55,12 @@ libpng: pixman: - '0' proj: -- '9.4' +- '9.5' target_platform: - linux-64 zip_keys: - - c_compiler_version - cxx_compiler_version - fortran_compiler_version -- - c_stdlib_version - - cdt_name zlib: - '1' diff --git a/.ci_support/migrations/libgdal39.yaml b/.ci_support/migrations/libgdal310.yaml similarity index 53% rename from .ci_support/migrations/libgdal39.yaml rename to .ci_support/migrations/libgdal310.yaml index ffc85a9..b1ab308 100644 --- a/.ci_support/migrations/libgdal39.yaml +++ b/.ci_support/migrations/libgdal310.yaml @@ -3,7 +3,9 @@ __migrator: kind: version migration_number: 1 gdal: -- '3.9' +- '3.10' libgdal: -- '3.9' -migrator_ts: 1715443551.4913723 +- '3.10' +libgdal_core: +- '3.10' +migrator_ts: 1731733901.4913723 diff --git a/.ci_support/migrations/proj_loosen_pin.yaml b/.ci_support/migrations/proj_loosen_pin.yaml deleted file mode 100644 index 3830824..0000000 --- a/.ci_support/migrations/proj_loosen_pin.yaml +++ /dev/null @@ -1,8 +0,0 @@ -__migrator: - build_number: 1 - commit_message: Loosen proj pin to 9.4 - kind: version - migration_number: 1 -migrator_ts: 1717700335 -proj: -- '9.4' diff --git a/.ci_support/osx_64_.yaml b/.ci_support/osx_64_.yaml index a52d313..cf01c84 100644 --- a/.ci_support/osx_64_.yaml +++ b/.ci_support/osx_64_.yaml @@ -7,7 +7,7 @@ bzip2: c_compiler: - clang c_compiler_version: -- '16' +- '18' c_stdlib: - macosx_deployment_target c_stdlib_version: @@ -21,11 +21,11 @@ curl: cxx_compiler: - clangxx cxx_compiler_version: -- '16' +- '18' fortran_compiler: - gfortran fortran_compiler_version: -- '12' +- '13' gsl: - '2.7' hdf4: @@ -39,7 +39,7 @@ libblas: libcblas: - 3.9 *netlib libgdal: -- '3.9' +- '3.10' libiconv: - '1' libjpeg_turbo: @@ -49,11 +49,11 @@ libnetcdf: libpng: - '1.6' llvm_openmp: -- '16' +- '18' macos_machine: - x86_64-apple-darwin13.4.0 proj: -- '9.4' +- '9.5' target_platform: - osx-64 zip_keys: diff --git a/.scripts/build_steps.sh b/.scripts/build_steps.sh index f34ebf2..5723144 100755 --- a/.scripts/build_steps.sh +++ b/.scripts/build_steps.sh @@ -31,25 +31,31 @@ pkgs_dirs: solver: libmamba CONDARC +mv /opt/conda/conda-meta/history /opt/conda/conda-meta/history.$(date +%Y-%m-%d-%H-%M-%S) +echo > /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 -mamba install --update-specs --yes --quiet --channel conda-forge --strict-channel-priority \ - pip mamba conda-build conda-forge-ci-setup=4 "conda-build>=24.1" -mamba update --update-specs --yes --quiet --channel conda-forge --strict-channel-priority \ - pip mamba conda-build conda-forge-ci-setup=4 "conda-build>=24.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 csh byacc - +) # make the build number clobber make_build_number "${FEEDSTOCK_ROOT}" "${RECIPE_ROOT}" "${CONFIG_FILE}" @@ -80,6 +86,12 @@ else --suppress-variables ${EXTRA_CB_OPTIONS:-} \ --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}" diff --git a/.scripts/run_osx_build.sh b/.scripts/run_osx_build.sh index 07dff21..0b36498 100755 --- a/.scripts/run_osx_build.sh +++ b/.scripts/run_osx_build.sh @@ -7,28 +7,39 @@ source .scripts/logging_utils.sh set -xe MINIFORGE_HOME=${MINIFORGE_HOME:-${HOME}/miniforge3} +MINIFORGE_HOME=${MINIFORGE_HOME%/} # remove trailing slash -( 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 +( 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 conda-forge-ci-setup=4 "conda-build>=24.1" -mamba update --update-specs --yes --quiet --channel conda-forge --strict-channel-priority \ - pip mamba conda-build conda-forge-ci-setup=4 "conda-build>=24.1" + @@ -85,6 +96,13 @@ else --suppress-variables ${EXTRA_CB_OPTIONS:-} \ --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}" diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 33a441c..013bdc1 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -2,6 +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-osx.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: 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-linux.yml + - template: ./.azure-pipelines/azure-pipelines-osx.yml \ No newline at end of file diff --git a/build-locally.py b/build-locally.py index e0d408d..6788aea 100755 --- a/build-locally.py +++ b/build-locally.py @@ -1,13 +1,16 @@ -#!/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 from argparse import ArgumentParser -import platform def setup_environment(ns): diff --git a/recipe/meta.yaml b/recipe/meta.yaml index cd45f28..3bf1ba2 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -21,7 +21,7 @@ source: folder: triangle_tmp build: - number: 54 + number: 55 skip: True # [win] features: detect_binary_files_with_prefix: true