diff --git a/.azure-pipelines/azure-pipelines-linux.yml b/.azure-pipelines/azure-pipelines-linux.yml index 974e878..875d996 100755 --- a/.azure-pipelines/azure-pipelines-linux.yml +++ b/.azure-pipelines/azure-pipelines-linux.yml @@ -13,13 +13,9 @@ jobs: UPLOAD_PACKAGES: 'True' DOCKER_IMAGE: quay.io/condaforge/linux-anvil-cos7-x86_64 timeoutInMinutes: 360 + variables: {} steps: - - script: | - rm -rf /opt/ghc - df -h - displayName: Manage disk space - # configure qemu binfmt-misc running. This allows us to run docker containers # embedded qemu-static - script: | @@ -30,6 +26,9 @@ jobs: - 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 diff --git a/.azure-pipelines/azure-pipelines-osx.yml b/.azure-pipelines/azure-pipelines-osx.yml index 9e4e167..215eeeb 100755 --- a/.azure-pipelines/azure-pipelines-osx.yml +++ b/.azure-pipelines/azure-pipelines-osx.yml @@ -5,18 +5,22 @@ jobs: - job: osx pool: - vmImage: macOS-11 + vmImage: macOS-13 strategy: matrix: osx_64_: CONFIG: osx_64_ UPLOAD_PACKAGES: 'True' 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}) diff --git a/.ci_support/linux_64_.yaml b/.ci_support/linux_64_.yaml index b6cadf4..c138a52 100644 --- a/.ci_support/linux_64_.yaml +++ b/.ci_support/linux_64_.yaml @@ -1,9 +1,13 @@ c_compiler: - gcc c_compiler_version: -- '10' +- '13' +c_stdlib: +- sysroot +c_stdlib_version: +- '2.17' cdt_name: -- cos6 +- cos7 channel_sources: - conda-forge channel_targets: @@ -14,3 +18,8 @@ perl: - 5.32.1 target_platform: - linux-64 +zip_keys: +- - c_stdlib_version + - cdt_name +zlib: +- '1' diff --git a/.ci_support/linux_aarch64_.yaml b/.ci_support/linux_aarch64_.yaml new file mode 100644 index 0000000..f8b79ae --- /dev/null +++ b/.ci_support/linux_aarch64_.yaml @@ -0,0 +1,29 @@ +BUILD: +- aarch64-conda_cos7-linux-gnu +c_compiler: +- gcc +c_compiler_version: +- '13' +c_stdlib: +- sysroot +c_stdlib_version: +- '2.17' +cdt_arch: +- aarch64 +cdt_name: +- cos7 +channel_sources: +- conda-forge +channel_targets: +- conda-forge main +docker_image: +- quay.io/condaforge/linux-anvil-aarch64 +perl: +- 5.32.1 +target_platform: +- linux-aarch64 +zip_keys: +- - c_stdlib_version + - cdt_name +zlib: +- '1' diff --git a/.ci_support/linux_ppc64le_.yaml b/.ci_support/linux_ppc64le_.yaml new file mode 100644 index 0000000..732a368 --- /dev/null +++ b/.ci_support/linux_ppc64le_.yaml @@ -0,0 +1,25 @@ +c_compiler: +- gcc +c_compiler_version: +- '13' +c_stdlib: +- sysroot +c_stdlib_version: +- '2.17' +cdt_name: +- cos7 +channel_sources: +- conda-forge +channel_targets: +- conda-forge main +docker_image: +- quay.io/condaforge/linux-anvil-ppc64le +perl: +- 5.32.1 +target_platform: +- linux-ppc64le +zip_keys: +- - c_stdlib_version + - cdt_name +zlib: +- '1' diff --git a/.ci_support/osx_64_.yaml b/.ci_support/osx_64_.yaml index b8523a7..7624681 100644 --- a/.ci_support/osx_64_.yaml +++ b/.ci_support/osx_64_.yaml @@ -1,9 +1,15 @@ MACOSX_DEPLOYMENT_TARGET: -- '10.9' +- '10.13' +MACOSX_SDK_VERSION: +- '10.13' c_compiler: - clang c_compiler_version: -- '13' +- '18' +c_stdlib: +- macosx_deployment_target +c_stdlib_version: +- '10.13' channel_sources: - conda-forge channel_targets: @@ -14,3 +20,5 @@ perl: - 5.32.1 target_platform: - osx-64 +zlib: +- '1' diff --git a/.circleci/config.yml b/.circleci/config.yml index 3e61aa2..8b4ef2f 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,6 +1,6 @@ # 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 -*- +# -*- mode: jinja-yaml -*- version: 2 diff --git a/.gitattributes b/.gitattributes index 7f32763..18f114a 100644 --- a/.gitattributes +++ b/.gitattributes @@ -20,8 +20,8 @@ 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 shippable.yml linguist-generated=true diff --git a/.gitignore b/.gitignore index c89ecb7..179afe5 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,24 @@ -*.pyc +# 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/** -build_artifacts +# 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 diff --git a/.scripts/build_steps.sh b/.scripts/build_steps.sh index 595f8b5..f8051ab 100755 --- a/.scripts/build_steps.sh +++ b/.scripts/build_steps.sh @@ -28,20 +28,23 @@ conda-build: pkgs_dirs: - ${FEEDSTOCK_ROOT}/build_artifacts/pkg_cache - /opt/conda/pkgs +solver: libmamba CONDARC - - -mamba install --update-specs --yes --quiet --channel conda-forge \ - conda-build pip boa conda-forge-ci-setup=3 -mamba update --update-specs --yes --quiet --channel conda-forge \ - conda-build pip boa conda-forge-ci-setup=3 +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 # set up the condarc setup_conda_rc "${FEEDSTOCK_ROOT}" "${RECIPE_ROOT}" "${CONFIG_FILE}" source run_conda_forge_build_setup + + # make the build number clobber make_build_number "${FEEDSTOCK_ROOT}" "${RECIPE_ROOT}" "${CONFIG_FILE}" @@ -64,9 +67,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}" diff --git a/.scripts/logging_utils.sh b/.scripts/logging_utils.sh index 57bc95c..aff009f 100644 --- a/.scripts/logging_utils.sh +++ b/.scripts/logging_utils.sh @@ -12,7 +12,7 @@ function startgroup { echo "##[group]$1";; travis ) echo "$1" - echo -en 'travis_fold:start:'"${1// /}"'\\r';; + echo -en 'travis_fold:start:'"${1// /}"'\r';; github_actions ) echo "::group::$1";; * ) @@ -28,7 +28,7 @@ function endgroup { azure ) echo "##[endgroup]";; travis ) - echo -en 'travis_fold:end:'"${1// /}"'\\r';; + echo -en 'travis_fold:end:'"${1// /}"'\r';; github_actions ) echo "::endgroup::";; esac diff --git a/.scripts/run_docker_build.sh b/.scripts/run_docker_build.sh index 9236239..00f377a 100755 --- a/.scripts/run_docker_build.sh +++ b/.scripts/run_docker_build.sh @@ -21,6 +21,12 @@ if [ -z ${FEEDSTOCK_NAME} ]; then export FEEDSTOCK_NAME=$(basename ${FEEDSTOCK_ROOT}) fi +if [[ "${sha:-}" == "" ]]; then + pushd "${FEEDSTOCK_ROOT}" + sha=$(git rev-parse HEAD) + popd +fi + docker info # In order for the conda-build process in the container to write to the mounted @@ -91,6 +97,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 \ diff --git a/.scripts/run_osx_build.sh b/.scripts/run_osx_build.sh index 07de621..cc73c21 100755 --- a/.scripts/run_osx_build.sh +++ b/.scripts/run_osx_build.sh @@ -7,27 +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 +source "${MINIFORGE_HOME}/etc/profile.d/conda.sh" conda activate base +export CONDA_SOLVER="libmamba" +export CONDA_LIBMAMBA_SOLVER_NO_CHANNELS_FROM_INSTALLED=1 + -echo -e "\n\nInstalling ['conda-forge-ci-setup=3'] and conda-build." -mamba install --update-specs --quiet --yes --channel conda-forge \ - conda-build pip boa conda-forge-ci-setup=3 -mamba update --update-specs --yes --quiet --channel conda-forge \ - conda-build pip boa conda-forge-ci-setup=3 @@ -46,6 +58,10 @@ else echo -e "\n\nNot mangling homebrew as we are not running in CI" fi +if [[ "${sha:-}" == "" ]]; then + sha=$(git rev-parse HEAD) +fi + echo -e "\n\nRunning the build setup script." source run_conda_forge_build_setup @@ -56,7 +72,6 @@ source run_conda_forge_build_setup echo -e "\n\nMaking the build clobber file" make_build_number ./ ./recipe ./.ci_support/${CONFIG}.yaml - if [[ -f LICENSE.txt ]]; then cp LICENSE.txt "recipe/recipe-scripts-license.txt" fi @@ -72,9 +87,18 @@ if [[ "${BUILD_WITH_CONDA_DEBUG:-0}" == 1 ]]; then # Drop into an interactive shell /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}" diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..0edc914 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,30 @@ +# This file was generated automatically from conda-smithy. To update this configuration, +# update the conda-forge.yml and/or the recipe/meta.yaml. + +language: shell + + + +jobs: + include: + - env: CONFIG=linux_aarch64_ UPLOAD_PACKAGES=True PLATFORM=linux-aarch64 DOCKER_IMAGE=quay.io/condaforge/linux-anvil-aarch64 + os: linux + arch: arm64 + dist: focal + + - env: CONFIG=linux_ppc64le_ UPLOAD_PACKAGES=True PLATFORM=linux-ppc64le DOCKER_IMAGE=quay.io/condaforge/linux-anvil-ppc64le + os: linux + arch: ppc64le + dist: focal + +script: + - export CI=travis + - export GIT_BRANCH="$TRAVIS_BRANCH" + - export flow_run_id="travis_$TRAVIS_JOB_ID" + - export sha="$TRAVIS_COMMIT" + - export remote_url="https://github.com/$TRAVIS_REPO_SLUG" + - export FEEDSTOCK_NAME=$(basename ${TRAVIS_REPO_SLUG}) + - if [[ "${TRAVIS_PULL_REQUEST:-}" == "false" ]]; then export IS_PR_BUILD="False"; else export IS_PR_BUILD="True"; fi + + + - if [[ ${PLATFORM} =~ .*linux.* ]]; then CONDA_FORGE_DOCKER_RUN_ARGS="--network=host --security-opt=seccomp=unconfined" ./.scripts/run_docker_build.sh; fi \ No newline at end of file diff --git a/README.md b/README.md index 712c7ea..5e7d2b5 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,24 @@ +About perl-compress-raw-zlib-feedstock +====================================== + +Feedstock license: [BSD-3-Clause](https://github.com/conda-forge/perl-compress-raw-zlib-feedstock/blob/main/LICENSE.txt) + + About perl-compress-raw-zlib -============================ +---------------------------- Home: https://metacpan.org/dist/Compress-Raw-Zlib Package license: GPL-1.0-or-later OR Artistic-1.0-Perl -Feedstock license: [BSD-3-Clause](https://github.com/conda-forge/perl-compress-raw-zlib-feedstock/blob/main/LICENSE.txt) +Summary: Basic utilities for writing tests. + +About perl-compress-raw-zlib +---------------------------- + +Home: https://metacpan.org/dist/Compress-Raw-Zlib + +Package license: GPL-1.0-or-later OR Artistic-1.0-Perl Summary: Basic utilities for writing tests. @@ -13,7 +26,14 @@ Current build status ==================== - +
+ + + @@ -30,14 +50,28 @@ Current build status + + + + + + @@ -121,7 +155,7 @@ 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 diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 33a441c..67d82fa 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: 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 3f4b7a7..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): @@ -64,8 +67,9 @@ def verify_config(ns): 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'. " + "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." ) diff --git a/conda-forge.yml b/conda-forge.yml index 993de48..23aa2f0 100644 --- a/conda-forge.yml +++ b/conda-forge.yml @@ -1,6 +1,9 @@ +conda_build: + pkg_format: '2' +conda_forge_output_validation: true github: branch_name: main tooling_branch_name: main -conda_forge_output_validation: true -conda_build: - pkg_format: '2' +provider: + linux_aarch64: default + linux_ppc64le: default diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 0aafb49..c87c6dc 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -22,7 +22,9 @@ build: requirements: build: + - {{ stdlib('c') }} # [not win] - {{ compiler('c') }} # [not win] + - {{ stdlib('m2w64_c') }} # [win] - {{ compiler('m2w64_c') }} # [win] - make host:
Travis + + linux + +
Azurelinux_64 - variant + variant + +
linux_aarch64 + + variant + +
linux_ppc64le + + variant
osx_64 - variant + variant