diff --git a/.appveyor.yml b/.appveyor.yml index 21417e2..1bfa96b 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -1,6 +1,7 @@ # This file was automatically generated by conda-smithy. To update a component of this # file, make changes to conda-forge.yml and/or recipe/meta.yaml, and run # "conda smithy rerender". +# -*- mode: yaml -*- environment: @@ -27,11 +28,11 @@ platform: install: # If there is a newer build queued for the same PR, cancel this one. - cmd: | - powershell -Command "(New-Object Net.WebClient).DownloadFile('https://raw.githubusercontent.com/conda-forge/conda-forge-ci-setup-feedstock/branch2.0/recipe/conda_forge_ci_setup/ff_ci_pr_build.py', 'ff_ci_pr_build.py')" - ff_ci_pr_build -v --ci "appveyor" "%APPVEYOR_ACCOUNT_NAME%/%APPVEYOR_PROJECT_SLUG%" "%APPVEYOR_BUILD_NUMBER%" "%APPVEYOR_PULL_REQUEST_NUMBER%" + powershell -Command "(New-Object Net.WebClient).DownloadFile('https://raw.githubusercontent.com/conda-forge/conda-forge-ci-setup-feedstock/master/recipe/conda_forge_ci_setup/ff_ci_pr_build.py', 'ff_ci_pr_build.py')" + "%CONDA_INSTALL_LOCN%\python.exe" ff_ci_pr_build.py -v --ci "appveyor" "%APPVEYOR_ACCOUNT_NAME%/%APPVEYOR_PROJECT_SLUG%" "%APPVEYOR_BUILD_NUMBER%" "%APPVEYOR_PULL_REQUEST_NUMBER%" del ff_ci_pr_build.py - # Cywing's git breaks conda-build. (See https://github.com/conda-forge/conda-smithy-feedstock/pull/2.) + # Cygwin's git breaks conda-build. (See https://github.com/conda-forge/conda-smithy-feedstock/pull/2.) - cmd: rmdir C:\cygwin /s /q # Add path, activate `conda` and update conda. @@ -40,20 +41,16 @@ install: - cmd: set PYTHONUNBUFFERED=1 - # Add our channels. - - cmd: conda.exe config --set show_channel_urls true - - cmd: conda.exe config --remove channels defaults - - cmd: conda.exe config --add channels defaults - - cmd: conda.exe config --add channels conda-forge - # Configure the VM. - - cmd: conda.exe install -n root --quiet --yes conda-forge-ci-setup=2 + # Tell conda we want an updated version of conda-forge-ci-setup and conda-build + - cmd: conda.exe install -n root -c conda-forge --quiet --yes conda-forge-ci-setup=2 conda-build + - cmd: setup_conda_rc .\ .\recipe .\.ci_support\%CONFIG%.yaml - cmd: run_conda_forge_build_setup # Skip .NET project specific build phase. build: off test_script: - - conda.exe build recipe -m .ci_support\%CONFIG%.yaml --quiet + - conda.exe build recipe -m .ci_support\%CONFIG%.yaml deploy_script: - cmd: upload_package .\ .\recipe .ci_support\%CONFIG%.yaml \ No newline at end of file diff --git a/.azure-pipelines/azure-pipelines-linux.yml b/.azure-pipelines/azure-pipelines-linux.yml new file mode 100755 index 0000000..b484d51 --- /dev/null +++ b/.azure-pipelines/azure-pipelines-linux.yml @@ -0,0 +1,39 @@ +# 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-16.04 + timeoutInMinutes: 360 + strategy: + maxParallel: 8 + matrix: + linux_python2.7: + CONFIG: linux_python2.7 + UPLOAD_PACKAGES: True + linux_python3.6: + CONFIG: linux_python3.6 + UPLOAD_PACKAGES: True + linux_python3.7: + CONFIG: linux_python3.7 + UPLOAD_PACKAGES: True + steps: + - script: | + sudo pip install --upgrade pip + sudo pip install setuptools shyaml + displayName: Install dependencies + + # 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: .azure-pipelines/run_docker_build.sh + displayName: Run docker build + env: + BINSTAR_TOKEN: $(BINSTAR_TOKEN) \ No newline at end of file diff --git a/.azure-pipelines/azure-pipelines-osx.yml b/.azure-pipelines/azure-pipelines-osx.yml new file mode 100755 index 0000000..694475d --- /dev/null +++ b/.azure-pipelines/azure-pipelines-osx.yml @@ -0,0 +1,81 @@ +# 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: osx + pool: + vmImage: macOS-10.13 + timeoutInMinutes: 360 + strategy: + maxParallel: 8 + matrix: + osx_python2.7: + CONFIG: osx_python2.7 + UPLOAD_PACKAGES: True + osx_python3.6: + CONFIG: osx_python3.6 + UPLOAD_PACKAGES: True + osx_python3.7: + CONFIG: osx_python3.7 + UPLOAD_PACKAGES: True + + steps: + # TODO: Fast finish on azure pipelines? + - script: | + echo "Fast Finish" + + + - script: | + echo "Removing homebrew from Azure to avoid conflicts." + curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall > ~/uninstall_homebrew + chmod +x ~/uninstall_homebrew + ~/uninstall_homebrew -fq + rm ~/uninstall_homebrew + displayName: Remove homebrew + + - bash: | + echo "##vso[task.prependpath]$CONDA/bin" + sudo chown -R $USER $CONDA + displayName: Add conda to PATH + + - script: | + source activate base + conda install -n base -c conda-forge --quiet --yes conda-forge-ci-setup=2 conda-build shyaml + displayName: 'Add conda-forge-ci-setup=2' + + - script: | + source activate base + echo "Configuring conda." + + setup_conda_rc ./ ./recipe ./.ci_support/${CONFIG}.yaml + + source run_conda_forge_build_setup + conda update --yes --quiet --override-channels -c conda-forge -c defaults --all + env: { + OSX_FORCE_SDK_DOWNLOAD: "1" + } + displayName: Configure conda and conda-build + + - script: | + source activate base + mangle_compiler ./ ./recipe ./.ci_support/${CONFIG}.yaml + displayName: Mangle compiler + + - script: | + source activate base + make_build_number ./ ./recipe ./.ci_support/${CONFIG}.yaml + displayName: Generate build number clobber file + + - script: | + source activate base + conda build ./recipe -m ./.ci_support/${CONFIG}.yaml --clobber-file ./.ci_support/clobber_${CONFIG}.yaml + displayName: Build recipe + + - script: | + source activate base + upload_package ./ ./recipe ./.ci_support/${CONFIG}.yaml + displayName: Upload recipe + env: + BINSTAR_TOKEN: $(BINSTAR_TOKEN) + condition: not(eq(variables['UPLOAD_PACKAGES'], 'False')) \ No newline at end of file diff --git a/.azure-pipelines/azure-pipelines-win.yml b/.azure-pipelines/azure-pipelines-win.yml new file mode 100755 index 0000000..af4cc0f --- /dev/null +++ b/.azure-pipelines/azure-pipelines-win.yml @@ -0,0 +1,109 @@ +# 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: vs2017-win2016 + timeoutInMinutes: 360 + strategy: + maxParallel: 4 + matrix: + win_python2.7: + CONFIG: win_python2.7 + CONDA_BLD_PATH: D:\\bld\\ + UPLOAD_PACKAGES: False + win_python3.6: + CONFIG: win_python3.6 + CONDA_BLD_PATH: D:\\bld\\ + UPLOAD_PACKAGES: False + win_python3.7: + CONFIG: win_python3.7 + CONDA_BLD_PATH: D:\\bld\\ + UPLOAD_PACKAGES: False + steps: + # TODO: Fast finish on azure pipelines? + - script: | + ECHO ON + + + - script: | + choco install vcpython27 -fdv -y --debug + condition: contains(variables['CONFIG'], 'vs2008') + displayName: Install vcpython27.msi (if needed) + + # Cygwin's git breaks conda-build. (See https://github.com/conda-forge/conda-smithy-feedstock/pull/2.) + # - script: rmdir C:\cygwin /s /q + # continueOnError: true + + - powershell: | + Set-PSDebug -Trace 1 + + $batchcontent = @" + ECHO ON + SET vcpython=C:\Program Files (x86)\Common Files\Microsoft\Visual C++ for Python\9.0 + + DIR "%vcpython%" + + CALL "%vcpython%\vcvarsall.bat" %* + "@ + + $batchDir = "C:\Program Files (x86)\Common Files\Microsoft\Visual C++ for Python\9.0\VC" + $batchPath = "$batchDir" + "\vcvarsall.bat" + New-Item -Path $batchPath -ItemType "file" -Force + + Set-Content -Value $batchcontent -Path $batchPath + + Get-ChildItem -Path $batchDir + + Get-ChildItem -Path ($batchDir + '\..') + + condition: contains(variables['CONFIG'], 'vs2008') + displayName: Patch vs2008 (if needed) + + - task: CondaEnvironment@1 + inputs: + packageSpecs: 'python=3.6 conda-build conda conda-forge::conda-forge-ci-setup=2' # Optional + installOptions: "-c conda-forge" + updateConda: false + displayName: Install conda-build and activate environment + + - script: set PYTHONUNBUFFERED=1 + + # Configure the VM + - script: setup_conda_rc .\ .\recipe .\.ci_support\%CONFIG%.yaml + + # Configure the VM. + - script: | + run_conda_forge_build_setup + + displayName: conda-forge build setup + + + - script: | + rmdir C:\strawberry /s /q + continueOnError: true + displayName: remove strawberryperl + + # Special cased version setting some more things! + - script: | + conda.exe build recipe -m .ci_support\%CONFIG%.yaml + displayName: Build recipe (vs2008) + env: + VS90COMNTOOLS: "C:\\Program Files (x86)\\Common Files\\Microsoft\\Visual C++ for Python\\9.0\\VC\\bin" + PYTHONUNBUFFERED: 1 + condition: contains(variables['CONFIG'], 'vs2008') + + - script: | + conda.exe build recipe -m .ci_support\%CONFIG%.yaml + displayName: Build recipe + env: + PYTHONUNBUFFERED: 1 + condition: not(contains(variables['CONFIG'], 'vs2008')) + + - script: | + upload_package .\ .\recipe .ci_support\%CONFIG%.yaml + env: + BINSTAR_TOKEN: $(BINSTAR_TOKEN) + condition: not(eq(variables['UPLOAD_PACKAGES'], 'False')) diff --git a/.circleci/build_steps.sh b/.azure-pipelines/build_steps.sh similarity index 74% rename from .circleci/build_steps.sh rename to .azure-pipelines/build_steps.sh index 258a085..779d52b 100755 --- a/.circleci/build_steps.sh +++ b/.azure-pipelines/build_steps.sh @@ -19,22 +19,20 @@ conda-build: CONDARC -conda install --yes --quiet conda-forge::conda-forge-ci-setup=2 conda-build +conda install --yes --quiet conda-forge-ci-setup=2 conda-build -c conda-forge # set up the condarc setup_conda_rc "${FEEDSTOCK_ROOT}" "${RECIPE_ROOT}" "${CONFIG_FILE}" -# A lock sometimes occurs with incomplete builds. The lock file is stored in build_artifacts. -conda clean --lock - -source run_conda_forge_build_setup - +run_conda_forge_build_setup # make the build number clobber make_build_number "${FEEDSTOCK_ROOT}" "${RECIPE_ROOT}" "${CONFIG_FILE}" conda build "${RECIPE_ROOT}" -m "${CI_SUPPORT}/${CONFIG}.yaml" \ - --clobber-file "${CI_SUPPORT}/clobber_${CONFIG}.yaml" --quiet + --clobber-file "${CI_SUPPORT}/clobber_${CONFIG}.yaml" -upload_package "${FEEDSTOCK_ROOT}" "${RECIPE_ROOT}" "${CONFIG_FILE}" +if [[ "${UPLOAD_PACKAGES}" != "False" ]]; then + upload_package "${FEEDSTOCK_ROOT}" "${RECIPE_ROOT}" "${CONFIG_FILE}" +fi touch "/home/conda/feedstock_root/build_artifacts/conda-forge-build-done-${CONFIG}" \ No newline at end of file diff --git a/.circleci/run_docker_build.sh b/.azure-pipelines/run_docker_build.sh similarity index 72% rename from .circleci/run_docker_build.sh rename to .azure-pipelines/run_docker_build.sh index f2959f6..8ccadb8 100755 --- a/.circleci/run_docker_build.sh +++ b/.azure-pipelines/run_docker_build.sh @@ -7,6 +7,9 @@ set -xeuo pipefail +THISDIR="$( cd "$( dirname "$0" )" >/dev/null && pwd )" +PROVIDER_DIR="$(basename $THISDIR)" + FEEDSTOCK_ROOT=$(cd "$(dirname "$0")/.."; pwd;) RECIPE_ROOT="${FEEDSTOCK_ROOT}/recipe" @@ -30,21 +33,25 @@ if [ -z "$CONFIG" ]; then fi pip install shyaml -DOCKER_IMAGE=$(cat "${FEEDSTOCK_ROOT}/.ci_support/${CONFIG}.yaml" | shyaml get-value docker_image.0 condaforge/linux-anvil ) +DOCKER_IMAGE=$(cat "${FEEDSTOCK_ROOT}/.ci_support/${CONFIG}.yaml" | shyaml get-value docker_image.0 condaforge/linux-anvil-comp7 ) mkdir -p "$ARTIFACTS" DONE_CANARY="$ARTIFACTS/conda-forge-build-done-${CONFIG}" rm -f "$DONE_CANARY" +# Not all providers run with a real tty. Disable using one +DOCKER_RUN_ARGS=" " -docker run -it \ - -v "${RECIPE_ROOT}":/home/conda/recipe_root \ - -v "${FEEDSTOCK_ROOT}":/home/conda/feedstock_root \ +export UPLOAD_PACKAGES="${UPLOAD_PACKAGES:-True}" +docker run ${DOCKER_RUN_ARGS} \ + -v "${RECIPE_ROOT}":/home/conda/recipe_root:ro,z \ + -v "${FEEDSTOCK_ROOT}":/home/conda/feedstock_root:rw,z \ -e CONFIG \ -e BINSTAR_TOKEN \ -e HOST_USER_ID \ + -e UPLOAD_PACKAGES \ $DOCKER_IMAGE \ bash \ - /home/conda/feedstock_root/.circleci/build_steps.sh + /home/conda/feedstock_root/${PROVIDER_DIR}/build_steps.sh # verify that the end of the script was reached test -f "$DONE_CANARY" \ No newline at end of file diff --git a/.ci_support/linux_python2.7.yaml b/.ci_support/linux_python2.7.yaml index a4cc333..4fa4af2 100644 --- a/.ci_support/linux_python2.7.yaml +++ b/.ci_support/linux_python2.7.yaml @@ -12,8 +12,3 @@ pin_run_as_build: max_pin: x.x python: - '2.7' -zip_keys: -- - channel_sources - - channel_targets - - docker_image - - build_number_decrement diff --git a/.ci_support/linux_python3.6.yaml b/.ci_support/linux_python3.6.yaml index 7c79fff..4064c0b 100644 --- a/.ci_support/linux_python3.6.yaml +++ b/.ci_support/linux_python3.6.yaml @@ -12,8 +12,3 @@ pin_run_as_build: max_pin: x.x python: - '3.6' -zip_keys: -- - channel_sources - - channel_targets - - docker_image - - build_number_decrement diff --git a/.ci_support/linux_python3.7.yaml b/.ci_support/linux_python3.7.yaml index 9dcb1e0..ddcabac 100644 --- a/.ci_support/linux_python3.7.yaml +++ b/.ci_support/linux_python3.7.yaml @@ -12,8 +12,3 @@ pin_run_as_build: max_pin: x.x python: - '3.7' -zip_keys: -- - channel_sources - - channel_targets - - docker_image - - build_number_decrement diff --git a/.ci_support/osx_python2.7.yaml b/.ci_support/osx_python2.7.yaml index 2d98036..c5bb9aa 100644 --- a/.ci_support/osx_python2.7.yaml +++ b/.ci_support/osx_python2.7.yaml @@ -18,7 +18,3 @@ pin_run_as_build: max_pin: x.x python: - '2.7' -zip_keys: -- - channel_sources - - channel_targets - - build_number_decrement diff --git a/.ci_support/osx_python3.6.yaml b/.ci_support/osx_python3.6.yaml index bb755e8..03de62b 100644 --- a/.ci_support/osx_python3.6.yaml +++ b/.ci_support/osx_python3.6.yaml @@ -18,7 +18,3 @@ pin_run_as_build: max_pin: x.x python: - '3.6' -zip_keys: -- - channel_sources - - channel_targets - - build_number_decrement diff --git a/.ci_support/osx_python3.7.yaml b/.ci_support/osx_python3.7.yaml index f73d166..6f78589 100644 --- a/.ci_support/osx_python3.7.yaml +++ b/.ci_support/osx_python3.7.yaml @@ -18,7 +18,3 @@ pin_run_as_build: max_pin: x.x python: - '3.7' -zip_keys: -- - channel_sources - - channel_targets - - build_number_decrement diff --git a/.circleci/checkout_merge_commit.sh b/.circleci/checkout_merge_commit.sh deleted file mode 100755 index 9528e4b..0000000 --- a/.circleci/checkout_merge_commit.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/bash - - -# Update PR refs for testing. -if [[ -n "${CIRCLE_PR_NUMBER}" ]] -then - FETCH_REFS="${FETCH_REFS} +refs/pull/${CIRCLE_PR_NUMBER}/head:pr/${CIRCLE_PR_NUMBER}/head" - FETCH_REFS="${FETCH_REFS} +refs/pull/${CIRCLE_PR_NUMBER}/merge:pr/${CIRCLE_PR_NUMBER}/merge" -fi - -# Retrieve the refs. -if [[ -n "${CIRCLE_PR_NUMBER}" ]] -then - git fetch -u origin ${FETCH_REFS} -fi - -# Checkout the PR merge ref. -if [[ -n "${CIRCLE_PR_NUMBER}" ]] -then - git checkout -qf "pr/${CIRCLE_PR_NUMBER}/merge" -fi - -# Check for merge conflicts. -if [[ -n "${CIRCLE_PR_NUMBER}" ]] -then - git branch --merged | grep "pr/${CIRCLE_PR_NUMBER}/head" > /dev/null -fi diff --git a/.circleci/config.yml b/.circleci/config.yml index e4524f1..6ad461b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,62 +1,24 @@ +# 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 -*- + version: 2 jobs: - build_linux_python2.7: - working_directory: ~/test - machine: true - environment: - - CONFIG: "linux_python2.7" - steps: - - checkout - - run: - name: Fast finish outdated PRs and merge PRs - command: | - ./.circleci/fast_finish_ci_pr_build.sh - ./.circleci/checkout_merge_commit.sh - - run: - command: docker pull condaforge/linux-anvil - - run: - # Run, test and (if we have a BINSTAR_TOKEN) upload the distributions. - command: ./.circleci/run_docker_build.sh - build_linux_python3.6: + build: working_directory: ~/test machine: true - environment: - - CONFIG: "linux_python3.6" steps: - - checkout - - run: - name: Fast finish outdated PRs and merge PRs - command: | - ./.circleci/fast_finish_ci_pr_build.sh - ./.circleci/checkout_merge_commit.sh - - run: - command: docker pull condaforge/linux-anvil - - run: - # Run, test and (if we have a BINSTAR_TOKEN) upload the distributions. - command: ./.circleci/run_docker_build.sh - build_linux_python3.7: - working_directory: ~/test - machine: true - environment: - - CONFIG: "linux_python3.7" - steps: - - checkout - - run: - name: Fast finish outdated PRs and merge PRs - command: | - ./.circleci/fast_finish_ci_pr_build.sh - ./.circleci/checkout_merge_commit.sh - - run: - command: docker pull condaforge/linux-anvil - run: - # Run, test and (if we have a BINSTAR_TOKEN) upload the distributions. - command: ./.circleci/run_docker_build.sh + # The Circle-CI build should not be active, but if this is not true for some reason, do a fast finish. + command: exit 0 workflows: version: 2 build_and_test: jobs: - - build_linux_python2.7 - - build_linux_python3.6 - - build_linux_python3.7 + - build: + filters: + branches: + ignore: + - /.*/ diff --git a/.circleci/fast_finish_ci_pr_build.sh b/.circleci/fast_finish_ci_pr_build.sh deleted file mode 100755 index 8c048ac..0000000 --- a/.circleci/fast_finish_ci_pr_build.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash - -curl https://raw.githubusercontent.com/conda-forge/conda-forge-ci-setup-feedstock/branch2.0/recipe/conda_forge_ci_setup/ff_ci_pr_build.py | \ - python - -v --ci "circle" "${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME}" "${CIRCLE_BUILD_NUM}" "${CIRCLE_PR_NUMBER}" diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 047fdaf..ba618a2 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -6,7 +6,7 @@ Checklist * [ ] Used a fork of the feedstock to propose changes * [ ] Bumped the build number (if the version is unchanged) * [ ] Reset the build number to `0` (if the version changed) -* [ ] [Re-rendered]( https://conda-forge.org/docs/conda_smithy.html#how-to-re-render ) with the latest `conda-smithy` (Use the phrase @conda-forge-admin, please rerender in a comment in this PR for automated rerendering) +* [ ] [Re-rendered]( https://conda-forge.org/docs/maintainer/updating_pkgs.html#rerendering-feedstocks ) with the latest `conda-smithy` (Use the phrase @conda-forge-admin, please rerender in a comment in this PR for automated rerendering) * [ ] Ensured the license file is being packaged.