diff --git a/.azure-pipelines/azure-pipelines-linux.yml b/.azure-pipelines/azure-pipelines-linux.yml index abcbeb9..875d996 100755 --- a/.azure-pipelines/azure-pipelines-linux.yml +++ b/.azure-pipelines/azure-pipelines-linux.yml @@ -13,6 +13,7 @@ jobs: UPLOAD_PACKAGES: 'True' DOCKER_IMAGE: quay.io/condaforge/linux-anvil-cos7-x86_64 timeoutInMinutes: 360 + variables: {} steps: # configure qemu binfmt-misc running. This allows us to run docker containers diff --git a/.azure-pipelines/azure-pipelines-osx.yml b/.azure-pipelines/azure-pipelines-osx.yml index f3ff063..ac0bf38 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-11 + vmImage: macOS-13 strategy: matrix: osx_64_: @@ -15,6 +15,7 @@ jobs: CONFIG: osx_arm64_ UPLOAD_PACKAGES: 'True' timeoutInMinutes: 360 + variables: {} steps: # TODO: Fast finish on azure pipelines? diff --git a/.azure-pipelines/azure-pipelines-win.yml b/.azure-pipelines/azure-pipelines-win.yml new file mode 100755 index 0000000..9901917 --- /dev/null +++ b/.azure-pipelines/azure-pipelines-win.yml @@ -0,0 +1,37 @@ +# 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: win + pool: + vmImage: windows-2022 + strategy: + matrix: + win_64_: + CONFIG: win_64_ + UPLOAD_PACKAGES: 'True' + timeoutInMinutes: 360 + variables: + CONDA_BLD_PATH: D:\\bld\\ + MINIFORGE_HOME: D:\Miniforge + UPLOAD_TEMP: D:\\tmp + + steps: + + - script: | + call ".scripts\run_win_build.bat" + displayName: Run Windows build + env: + MINIFORGE_HOME: $(MINIFORGE_HOME) + 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 diff --git a/.ci_support/linux_64_.yaml b/.ci_support/linux_64_.yaml index 7da7c36..32e5dd9 100644 --- a/.ci_support/linux_64_.yaml +++ b/.ci_support/linux_64_.yaml @@ -1,9 +1,13 @@ c_compiler: - gcc c_compiler_version: -- '12' +- '13' +c_stdlib: +- sysroot +c_stdlib_version: +- '2.17' cdt_name: -- cos6 +- cos7 channel_sources: - conda-forge channel_targets: @@ -13,9 +17,11 @@ docker_image: fortran_compiler: - gfortran fortran_compiler_version: -- '12' +- '13' target_platform: - linux-64 zip_keys: - - c_compiler_version - fortran_compiler_version +- - c_stdlib_version + - cdt_name diff --git a/.ci_support/linux_aarch64_.yaml b/.ci_support/linux_aarch64_.yaml index 3ef9587..fe0a971 100644 --- a/.ci_support/linux_aarch64_.yaml +++ b/.ci_support/linux_aarch64_.yaml @@ -3,7 +3,11 @@ BUILD: c_compiler: - gcc c_compiler_version: -- '12' +- '13' +c_stdlib: +- sysroot +c_stdlib_version: +- '2.17' cdt_arch: - aarch64 cdt_name: @@ -17,9 +21,11 @@ docker_image: fortran_compiler: - gfortran fortran_compiler_version: -- '12' +- '13' target_platform: - linux-aarch64 zip_keys: - - c_compiler_version - fortran_compiler_version +- - c_stdlib_version + - cdt_name diff --git a/.ci_support/linux_ppc64le_.yaml b/.ci_support/linux_ppc64le_.yaml index 563343e..704c137 100644 --- a/.ci_support/linux_ppc64le_.yaml +++ b/.ci_support/linux_ppc64le_.yaml @@ -1,7 +1,11 @@ c_compiler: - gcc c_compiler_version: -- '12' +- '13' +c_stdlib: +- sysroot +c_stdlib_version: +- '2.17' cdt_name: - cos7 channel_sources: @@ -13,9 +17,11 @@ docker_image: fortran_compiler: - gfortran fortran_compiler_version: -- '12' +- '13' target_platform: - linux-ppc64le zip_keys: - - c_compiler_version - fortran_compiler_version +- - c_stdlib_version + - cdt_name diff --git a/.ci_support/migrations/r-base44_and_m2w64-ucrt.yaml b/.ci_support/migrations/r-base44_and_m2w64-ucrt.yaml new file mode 100644 index 0000000..f25611f --- /dev/null +++ b/.ci_support/migrations/r-base44_and_m2w64-ucrt.yaml @@ -0,0 +1,53 @@ +migrator_ts: 1718391654 +__migrator: + kind: version + migration_number: 1 + bump_number: 1 + commit_message: "Rebuild for r-base 4.4 and UCRT mingw toolchain" + primary_key: r_base + automerge: True + longterm: True + include_noarch: True + include_build: True + pr_limit: 40 + override_cbc_keys: + - r-base + - r_base + - m2w64_c_compiler_stub + - m2w64_cxx_compiler_stub + - m2w64_fortran_compiler_stub + ordering: + m2w64_c_compiler: + - m2w64-toolchain + - gcc + m2w64_cxx_compiler: + - m2w64-toolchain + - gxx + m2w64_fortran_compiler: + - m2w64-toolchain + - gfortran + m2w64_c_stdlib: + - m2w64-toolchain + - m2w64-sysroot + +r_base: + - 4.3 + - 4.4 +m2w64_c_compiler: # [win] + - gcc # [win] +m2w64_c_compiler_version: # [win] + - 13 # [win] +m2w64_cxx_compiler: # [win] + - gxx # [win] +m2w64_cxx_compiler_version: # [win] + - 13 # [win] +m2w64_fortran_compiler: # [win] + - gfortran # [win] +m2w64_fortran_compiler_version: # [win] + - 13 # [win] +m2w64_c_stdlib: # [win] + - m2w64-sysroot # [win] +m2w64_c_stdlib_version: # [win] + - 12 # [win] +m2w64_toolchain: # [win] + - disabled # [win] diff --git a/.ci_support/osx_64_.yaml b/.ci_support/osx_64_.yaml index 74ad032..6e63c30 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: -- '16' +- '18' +c_stdlib: +- macosx_deployment_target +c_stdlib_version: +- '10.13' channel_sources: - conda-forge channel_targets: @@ -11,7 +17,7 @@ channel_targets: fortran_compiler: - gfortran fortran_compiler_version: -- '12' +- '13' macos_machine: - x86_64-apple-darwin13.4.0 target_platform: diff --git a/.ci_support/osx_arm64_.yaml b/.ci_support/osx_arm64_.yaml index 8d072a4..4033390 100644 --- a/.ci_support/osx_arm64_.yaml +++ b/.ci_support/osx_arm64_.yaml @@ -1,9 +1,15 @@ MACOSX_DEPLOYMENT_TARGET: - '11.0' +MACOSX_SDK_VERSION: +- '11.0' c_compiler: - clang c_compiler_version: -- '16' +- '18' +c_stdlib: +- macosx_deployment_target +c_stdlib_version: +- '11.0' channel_sources: - conda-forge channel_targets: @@ -11,7 +17,7 @@ channel_targets: fortran_compiler: - gfortran fortran_compiler_version: -- '12' +- '13' macos_machine: - arm64-apple-darwin20.0.0 target_platform: diff --git a/.ci_support/win_64_.yaml b/.ci_support/win_64_.yaml new file mode 100644 index 0000000..931f5bc --- /dev/null +++ b/.ci_support/win_64_.yaml @@ -0,0 +1,18 @@ +channel_sources: +- conda-forge +channel_targets: +- conda-forge main +m2w64_c_compiler: +- gcc +m2w64_c_compiler_version: +- '13' +m2w64_c_stdlib: +- m2w64-sysroot +m2w64_c_stdlib_version: +- '12' +m2w64_fortran_compiler: +- gfortran +m2w64_fortran_compiler_version: +- '13' +target_platform: +- win-64 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 eba1dfd..827a29f 100755 --- a/.scripts/build_steps.sh +++ b/.scripts/build_steps.sh @@ -31,18 +31,20 @@ 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 boa conda-forge-ci-setup=4 -mamba update --update-specs --yes --quiet --channel conda-forge --strict-channel-priority \ - pip mamba conda-build boa conda-forge-ci-setup=4 - # 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}" @@ -57,12 +59,6 @@ if [[ -f "${FEEDSTOCK_ROOT}/LICENSE.txt" ]]; then cp "${FEEDSTOCK_ROOT}/LICENSE.txt" "${RECIPE_ROOT}/recipe-scripts-license.txt" fi -if [[ "${sha:-}" == "" ]]; then - pushd ${FEEDSTOCK_ROOT} - sha=$(git rev-parse HEAD) - popd -fi - if [[ "${BUILD_WITH_CONDA_DEBUG:-0}" == 1 ]]; then if [[ "x${BUILD_OUTPUT_ID:-}" != "x" ]]; then EXTRA_CB_OPTIONS="${EXTRA_CB_OPTIONS:-} --output-id ${BUILD_OUTPUT_ID}" @@ -74,10 +70,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" \ --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_docker_build.sh b/.scripts/run_docker_build.sh index b70ef01..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 diff --git a/.scripts/run_osx_build.sh b/.scripts/run_osx_build.sh index 9259eb9..7f948c4 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 +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=4 -mamba update --update-specs --yes --quiet --channel conda-forge --strict-channel-priority \ - pip mamba conda-build boa conda-forge-ci-setup=4 + @@ -81,10 +92,17 @@ else EXTRA_CB_OPTIONS="${EXTRA_CB_OPTIONS:-} --no-test" fi - 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 \ --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/.scripts/run_win_build.bat b/.scripts/run_win_build.bat new file mode 100755 index 0000000..d3c0345 --- /dev/null +++ b/.scripts/run_win_build.bat @@ -0,0 +1,152 @@ +:: PLEASE NOTE: This script has been automatically generated by conda-smithy. Any changes here +:: will be lost next time ``conda smithy rerender`` is run. If you would like to make permanent +:: changes to this script, consider a proposal to conda-smithy so that other feedstocks can also +:: benefit from the improvement. + +:: 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 + +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%" +certutil -urlcache -split -f "%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 Moving pkgs cache from %MAMBA_ROOT_PREFIX% to %MINIFORGE_HOME% +move /Y "%MAMBA_ROOT_PREFIX%\pkgs" "%MINIFORGE_HOME%" +if !errorlevel! neq 0 exit /b !errorlevel! +echo Removing %MAMBA_ROOT_PREFIX% +del /S /Q "%MAMBA_ROOT_PREFIX%" +del /S /Q "%MICROMAMBA_TMPDIR%" +call :end_group + +call :start_group "Configuring conda" + +:: Activate the base conda 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 +setup_conda_rc .\ ".\recipe" .\.ci_support\%CONFIG%.yaml +if !errorlevel! neq 0 exit /b !errorlevel! +echo Running build setup +CALL run_conda_forge_build_setup + + +if !errorlevel! neq 0 exit /b !errorlevel! + +if EXIST LICENSE.txt ( + echo Copying feedstock license + copy LICENSE.txt "recipe\\recipe-scripts-license.txt" +) +if NOT [%HOST_PLATFORM%] == [%BUILD_PLATFORM%] ( + if [%CROSSCOMPILING_EMULATOR%] == [] ( + set "EXTRA_CB_OPTIONS=%EXTRA_CB_OPTIONS% --no-test" + ) +) + +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-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:*/=%" + set "GIT_BRANCH=%GITHUB_REF:refs/heads/=%" + if /i "%GITHUB_EVENT_NAME%" == "pull_request" ( + set "IS_PR_BUILD=True" + ) else ( + set "IS_PR_BUILD=False" + ) + set "TEMP=%RUNNER_TEMP%" +) +if /i "%CI%" == "azure" ( + set "FEEDSTOCK_NAME=%BUILD_REPOSITORY_NAME:*/=%" + set "GIT_BRANCH=%BUILD_SOURCEBRANCHNAME%" + if /i "%BUILD_REASON%" == "PullRequest" ( + set "IS_PR_BUILD=True" + ) else ( + set "IS_PR_BUILD=False" + ) + set "TEMP=%UPLOAD_TEMP%" +) + +:: Validate +call :start_group "Validating outputs" +validate_recipe_outputs "%FEEDSTOCK_NAME%" +if !errorlevel! neq 0 exit /b !errorlevel! +call :end_group + +if /i "%UPLOAD_PACKAGES%" == "true" ( + if /i "%IS_PR_BUILD%" == "false" ( + call :start_group "Uploading packages" + if not exist "%TEMP%\" md "%TEMP%" + set "TMP=%TEMP%" + upload_package --validate --feedstock-name="%FEEDSTOCK_NAME%" .\ ".\recipe" .ci_support\%CONFIG%.yaml + if !errorlevel! neq 0 exit /b !errorlevel! + call :end_group + ) +) + +exit + +:: Logging subroutines + +:start_group +if /i "%CI%" == "github_actions" ( + echo ::group::%~1 + exit /b +) +if /i "%CI%" == "azure" ( + echo ##[group]%~1 + exit /b +) +echo %~1 +exit /b + +:end_group +if /i "%CI%" == "github_actions" ( + echo ::endgroup:: + exit /b +) +if /i "%CI%" == "azure" ( + echo ##[endgroup] + exit /b +) +exit /b \ No newline at end of file diff --git a/.travis.yml b/.travis.yml index c833fba..0edc914 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,11 +1,11 @@ # This file was generated automatically from conda-smithy. To update this configuration, # update the conda-forge.yml and/or the recipe/meta.yaml. -language: generic +language: shell -matrix: +jobs: include: - env: CONFIG=linux_aarch64_ UPLOAD_PACKAGES=True PLATFORM=linux-aarch64 DOCKER_IMAGE=quay.io/condaforge/linux-anvil-aarch64 os: linux diff --git a/README.md b/README.md index 9095e47..e997970 100644 --- a/README.md +++ b/README.md @@ -72,6 +72,13 @@ Current build status variant + + win_64 + + + variant + + diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 33a441c..32da3d0 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -2,6 +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 \ 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/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/recipe/bld.bat b/recipe/bld.bat new file mode 100644 index 0000000..2cb2900 --- /dev/null +++ b/recipe/bld.bat @@ -0,0 +1,16 @@ +setlocal EnableExtensions EnableDelayedExpansion +@echo on + +set "PKG_CONFIG_PATH=%LIBRARY_LIB%\pkgconfig;%LIBRARY_PREFIX%\share\pkgconfig;%BUILD_PREFIX%\Library\lib\pkgconfig" + +meson setup _build --prefix=%LIBRARY_PREFIX% +if errorlevel 1 exit 1 + +meson compile -C _build +if errorlevel 1 exit 1 + +meson test -C _build --no-rebuild --print-errorlogs +if errorlevel 1 exit 1 + +meson install -C _build --no-rebuild +if errorlevel 1 exit 1 diff --git a/recipe/meta.yaml b/recipe/meta.yaml index cc16736..12febee 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -12,13 +12,14 @@ source: - no-test-drive.patch build: - number: 0 - skip: true # [win] + number: 1 run_exports: - {{ pin_subpackage(name, max_pin='x.x') }} requirements: build: + - {{ stdlib('c') }} # [unix] + - {{ stdlib('m2w64_c') }} # [win] - {{ compiler('c') }} # [unix] - {{ compiler('fortran') }} # [unix] - {{ compiler('m2w64_c') }} # [win]