diff --git a/.appveyor.yml b/.appveyor.yml deleted file mode 100644 index 0ab8472..0000000 --- a/.appveyor.yml +++ /dev/null @@ -1,51 +0,0 @@ -# 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: - - BINSTAR_TOKEN: - # The BINSTAR_TOKEN secure variable. This is defined canonically in conda-forge.yml. - secure: tumuXLL8PU75WMnRDemRy02ruEq2RpNxeK3dz0MjFssnosPm2v4EFjfNB4PTotA1 - - matrix: - - CONFIG: win_c_compilervs2015 - CONDA_INSTALL_LOCN: C:\Miniconda36-x64 - - -# We always use a 64-bit machine, but can build x86 distributions -# with the TARGET_ARCH variable. -platform: - - x64 - -install: - - cmd: set "CI=appveyor" - # 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/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 - - # 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. - - cmd: call %CONDA_INSTALL_LOCN%\Scripts\activate.bat - - cmd: conda.exe update --yes --quiet conda - - - cmd: set PYTHONUNBUFFERED=1 - - # Configure the VM. - # 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 -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 index 07065d9..9ffb709 100755 --- a/.azure-pipelines/azure-pipelines-linux.yml +++ b/.azure-pipelines/azure-pipelines-linux.yml @@ -14,10 +14,6 @@ jobs: CONFIG: linux_ UPLOAD_PACKAGES: True DOCKER_IMAGE: condaforge/linux-anvil-comp7 - linux_aarch64_: - CONFIG: linux_aarch64_ - UPLOAD_PACKAGES: True - DOCKER_IMAGE: condaforge/linux-anvil-aarch64 steps: # configure qemu binfmt-misc running. This allows us to run docker containers # embedded qemu-static @@ -29,7 +25,8 @@ jobs: - script: | export CI=azure - .azure-pipelines/run_docker_build.sh + export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME + .scripts/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 index f46d1e1..0808a1a 100755 --- a/.azure-pipelines/azure-pipelines-osx.yml +++ b/.azure-pipelines/azure-pipelines-osx.yml @@ -5,16 +5,13 @@ jobs: - job: osx pool: - vmImage: macOS-10.13 + vmImage: macOS-10.14 timeoutInMinutes: 360 strategy: maxParallel: 8 matrix: - osx_fortran_compiler_version4: - CONFIG: osx_fortran_compiler_version4 - UPLOAD_PACKAGES: True - osx_fortran_compiler_version7: - CONFIG: osx_fortran_compiler_version7 + osx_: + CONFIG: osx_ UPLOAD_PACKAGES: True steps: @@ -23,14 +20,6 @@ jobs: 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 @@ -41,11 +30,18 @@ jobs: conda install -n base -c conda-forge --quiet --yes conda-forge-ci-setup=2 conda-build displayName: 'Add conda-forge-ci-setup=2' + - script: | + echo "Mangling homebrew from Azure to avoid conflicts." + source activate base + /usr/bin/sudo mangle_homebrew + /usr/bin/sudo -k + displayName: Mangle homebrew + - script: | source activate base echo "Configuring conda." - setup_conda_rc ./ ./recipe ./.ci_support/${CONFIG}.yaml + setup_conda_rc ./ "./recipe" ./.ci_support/${CONFIG}.yaml export CI=azure source run_conda_forge_build_setup conda update --yes --quiet --override-channels -c conda-forge -c defaults --all @@ -56,23 +52,24 @@ jobs: - script: | source activate base - mangle_compiler ./ ./recipe ./.ci_support/${CONFIG}.yaml + mangle_compiler ./ "./recipe" ./.ci_support/${CONFIG}.yaml displayName: Mangle compiler - script: | source activate base - make_build_number ./ ./recipe ./.ci_support/${CONFIG}.yaml + 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 + 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 + export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME + upload_package ./ "./recipe" ./.ci_support/${CONFIG}.yaml + displayName: Upload package env: BINSTAR_TOKEN: $(BINSTAR_TOKEN) - condition: not(eq(variables['UPLOAD_PACKAGES'], 'False')) \ No newline at end of file + condition: and(succeeded(), 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 index 4a68a31..302f673 100755 --- a/.azure-pipelines/azure-pipelines-win.yml +++ b/.azure-pipelines/azure-pipelines-win.yml @@ -10,10 +10,10 @@ jobs: strategy: maxParallel: 4 matrix: - win_c_compilervs2015: - CONFIG: win_c_compilervs2015 + win_: + CONFIG: win_ CONDA_BLD_PATH: D:\\bld\\ - UPLOAD_PACKAGES: False + UPLOAD_PACKAGES: True steps: # TODO: Fast finish on azure pipelines? - script: | @@ -58,29 +58,26 @@ jobs: inputs: packageSpecs: 'python=3.6 conda-build conda conda-forge::conda-forge-ci-setup=2' # Optional installOptions: "-c conda-forge" - updateConda: false + updateConda: true displayName: Install conda-build and activate environment - script: set PYTHONUNBUFFERED=1 # Configure the VM - - script: setup_conda_rc .\ .\recipe .\.ci_support\%CONFIG%.yaml + - script: setup_conda_rc .\ ".\recipe" .\.ci_support\%CONFIG%.yaml # Configure the VM. - script: | set "CI=azure" + call activate base 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 + call activate base + 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" @@ -88,14 +85,18 @@ jobs: condition: contains(variables['CONFIG'], 'vs2008') - script: | - conda.exe build recipe -m .ci_support\%CONFIG%.yaml + call activate base + 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 + set "GIT_BRANCH=%BUILD_SOURCEBRANCHNAME%" + call activate base + upload_package .\ ".\recipe" .ci_support\%CONFIG%.yaml + displayName: Upload package env: BINSTAR_TOKEN: $(BINSTAR_TOKEN) - condition: not(eq(variables['UPLOAD_PACKAGES'], 'False')) + condition: and(succeeded(), not(eq(variables['UPLOAD_PACKAGES'], 'False'))) \ No newline at end of file diff --git a/.ci_support/linux_.yaml b/.ci_support/linux_.yaml index 2e99bd9..41edb2b 100644 --- a/.ci_support/linux_.yaml +++ b/.ci_support/linux_.yaml @@ -15,9 +15,13 @@ fortran_compiler: fortran_compiler_version: - '7' libcurl: -- '7.64' +- '7' pin_run_as_build: bzip2: max_pin: x libcurl: max_pin: x + zlib: + max_pin: x.x +zlib: +- '1.2' diff --git a/.ci_support/linux_aarch64_.yaml b/.ci_support/linux_aarch64_.yaml index 91c4715..392a568 100644 --- a/.ci_support/linux_aarch64_.yaml +++ b/.ci_support/linux_aarch64_.yaml @@ -11,7 +11,7 @@ cdt_arch: cdt_name: - cos7 channel_sources: -- conda-forge,c4aarch64,defaults +- conda-forge channel_targets: - conda-forge main docker_image: @@ -21,9 +21,13 @@ fortran_compiler: fortran_compiler_version: - '7' libcurl: -- '7.64' +- '7' pin_run_as_build: bzip2: max_pin: x libcurl: max_pin: x + zlib: + max_pin: x.x +zlib: +- '1.2' diff --git a/.ci_support/linux_ppc64le_.yaml b/.ci_support/linux_ppc64le_.yaml index e820118..a34fedf 100644 --- a/.ci_support/linux_ppc64le_.yaml +++ b/.ci_support/linux_ppc64le_.yaml @@ -15,9 +15,13 @@ fortran_compiler: fortran_compiler_version: - '8' libcurl: -- '7.64' +- '7' pin_run_as_build: bzip2: max_pin: x libcurl: max_pin: x + zlib: + max_pin: x.x +zlib: +- '1.2' diff --git a/.ci_support/osx_fortran_compiler_version7.yaml b/.ci_support/osx_.yaml similarity index 87% rename from .ci_support/osx_fortran_compiler_version7.yaml rename to .ci_support/osx_.yaml index 5c6a634..78d3e07 100644 --- a/.ci_support/osx_fortran_compiler_version7.yaml +++ b/.ci_support/osx_.yaml @@ -5,7 +5,7 @@ bzip2: c_compiler: - clang c_compiler_version: -- '4' +- '9' channel_sources: - conda-forge,defaults channel_targets: @@ -15,7 +15,7 @@ fortran_compiler: fortran_compiler_version: - '7' libcurl: -- '7.64' +- '7' macos_machine: - x86_64-apple-darwin13.4.0 macos_min_version: @@ -25,3 +25,7 @@ pin_run_as_build: max_pin: x libcurl: max_pin: x + zlib: + max_pin: x.x +zlib: +- '1.2' diff --git a/.ci_support/osx_fortran_compiler_version4.yaml b/.ci_support/osx_fortran_compiler_version4.yaml deleted file mode 100644 index 91ccffa..0000000 --- a/.ci_support/osx_fortran_compiler_version4.yaml +++ /dev/null @@ -1,27 +0,0 @@ -MACOSX_DEPLOYMENT_TARGET: -- '10.9' -bzip2: -- '1' -c_compiler: -- clang -c_compiler_version: -- '4' -channel_sources: -- conda-forge,defaults -channel_targets: -- conda-forge main -fortran_compiler: -- gfortran -fortran_compiler_version: -- '4' -libcurl: -- '7.64' -macos_machine: -- x86_64-apple-darwin13.4.0 -macos_min_version: -- '10.9' -pin_run_as_build: - bzip2: - max_pin: x - libcurl: - max_pin: x diff --git a/.ci_support/win_c_compilervs2015.yaml b/.ci_support/win_.yaml similarity index 90% rename from .ci_support/win_c_compilervs2015.yaml rename to .ci_support/win_.yaml index b270047..c000697 100644 --- a/.ci_support/win_c_compilervs2015.yaml +++ b/.ci_support/win_.yaml @@ -1,5 +1,5 @@ c_compiler: -- vs2015 +- vs2017 channel_sources: - conda-forge,defaults channel_targets: diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..8dd281e --- /dev/null +++ b/.drone.yml @@ -0,0 +1,26 @@ +--- +kind: pipeline +name: linux_aarch64_ + +platform: + os: linux + arch: arm64 + +steps: +- name: Install and build + image: condaforge/linux-anvil-aarch64 + environment: + CONFIG: linux_aarch64_ + UPLOAD_PACKAGES: True + PLATFORM: linux-aarch64 + BINSTAR_TOKEN: + from_secret: BINSTAR_TOKEN + commands: + - export FEEDSTOCK_ROOT="$DRONE_WORKSPACE" + - export RECIPE_ROOT="$FEEDSTOCK_ROOT/recipe" + - export CI=drone + - export GIT_BRANCH="$DRONE_BRANCH" + - sed -i '$ichown -R conda:conda "$FEEDSTOCK_ROOT"' /opt/docker/bin/entrypoint + - /opt/docker/bin/entrypoint $FEEDSTOCK_ROOT/.scripts/build_steps.sh + - echo "Done building" + diff --git a/.gitattributes b/.gitattributes index 974953e..ac943c1 100644 --- a/.gitattributes +++ b/.gitattributes @@ -5,3 +5,21 @@ meta.yaml text eol=lf build.sh text eol=lf bld.bat text eol=crlf + +# github helper pieces to make some files not show up in diffs automatically +.azure-pipelines/* linguist-generated=true +.circleci/* linguist-generated=true +.drone/* linguist-generated=true +.drone.yml linguist-generated=true +.github/* linguist-generated=true +.travis/* linguist-generated=true +.appveyor.yml linguist-generated=true +.gitattributes linguist-generated=true +.gitignore linguist-generated=true +.travis.yml linguist-generated=true +.scripts 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/.azure-pipelines/build_steps.sh b/.scripts/build_steps.sh similarity index 100% rename from .azure-pipelines/build_steps.sh rename to .scripts/build_steps.sh diff --git a/.azure-pipelines/run_docker_build.sh b/.scripts/run_docker_build.sh similarity index 91% rename from .azure-pipelines/run_docker_build.sh rename to .scripts/run_docker_build.sh index f0e77cd..253723c 100755 --- a/.azure-pipelines/run_docker_build.sh +++ b/.scripts/run_docker_build.sh @@ -52,8 +52,10 @@ mkdir -p "$ARTIFACTS" DONE_CANARY="$ARTIFACTS/conda-forge-build-done-${CONFIG}" rm -f "$DONE_CANARY" +# Allow people to specify extra default arguments to `docker run` (e.g. `--rm`) +DOCKER_RUN_ARGS="${CONDA_FORGE_DOCKER_RUN_ARGS}" if [ -z "${CI}" ]; then - DOCKER_RUN_ARGS="-it " + DOCKER_RUN_ARGS="-it ${DOCKER_RUN_ARGS}" fi export UPLOAD_PACKAGES="${UPLOAD_PACKAGES:-True}" @@ -64,6 +66,8 @@ docker run ${DOCKER_RUN_ARGS} \ -e BINSTAR_TOKEN \ -e HOST_USER_ID \ -e UPLOAD_PACKAGES \ + -e GIT_BRANCH \ + -e UPLOAD_ON_BRANCH \ -e CI \ $DOCKER_IMAGE \ bash \ diff --git a/.travis.yml b/.travis.yml index ec50c46..7e09b35 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,10 +11,12 @@ env: matrix: include: - env: CONFIG=linux_ppc64le_ UPLOAD_PACKAGES=True PLATFORM=linux-ppc64le DOCKER_IMAGE=condaforge/linux-anvil-ppc64le - os: linux-ppc64le + os: linux + arch: ppc64le script: - export CI=travis + - export GIT_BRANCH="$TRAVIS_BRANCH" - - if [[ ${PLATFORM} =~ .*linux.* ]]; then ./.travis/run_docker_build.sh; fi \ No newline at end of file + - if [[ ${PLATFORM} =~ .*linux.* ]]; then ./.scripts/run_docker_build.sh; fi \ No newline at end of file diff --git a/.travis/build_steps.sh b/.travis/build_steps.sh deleted file mode 100755 index 58cce91..0000000 --- a/.travis/build_steps.sh +++ /dev/null @@ -1,37 +0,0 @@ -#!/usr/bin/env bash - -# 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. - -set -xeuo pipefail -export PYTHONUNBUFFERED=1 -export FEEDSTOCK_ROOT="${FEEDSTOCK_ROOT:-/home/conda/feedstock_root}" -export RECIPE_ROOT="${RECIPE_ROOT:-/home/conda/recipe_root}" -export CI_SUPPORT="${FEEDSTOCK_ROOT}/.ci_support" -export CONFIG_FILE="${CI_SUPPORT}/${CONFIG}.yaml" - -cat >~/.condarc </dev/null && pwd )" -PROVIDER_DIR="$(basename $THISDIR)" - -FEEDSTOCK_ROOT=$(cd "$(dirname "$0")/.."; pwd;) -RECIPE_ROOT="${FEEDSTOCK_ROOT}/recipe" - -docker 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 -# normally the owner of the mounted volumes, or at least has write permission -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 - -ARTIFACTS="$FEEDSTOCK_ROOT/build_artifacts" - -if [ -z "$CONFIG" ]; then - set +x - FILES=`ls .ci_support/linux_*` - CONFIGS="" - for file in $FILES; do - CONFIGS="${CONFIGS}'${file:12:-5}' or "; - done - echo "Need to set CONFIG env variable. Value can be one of ${CONFIGS:0:-4}" - exit 1 -fi - -if [ -z "${DOCKER_IMAGE}" ]; then - SHYAML_INSTALLED="$(shyaml -h || echo NO)" - if [ "${SHYAML_INSTALLED}" == "NO" ]; then - echo "WARNING: DOCKER_IMAGE variable not set and shyaml not installed. Falling back to condaforge/linux-anvil-comp7" - DOCKER_IMAGE="condaforge/linux-anvil-comp7" - else - DOCKER_IMAGE="$(cat "${FEEDSTOCK_ROOT}/.ci_support/${CONFIG}.yaml" | shyaml get-value docker_image.0 condaforge/linux-anvil-comp7 )" - fi -fi - -mkdir -p "$ARTIFACTS" -DONE_CANARY="$ARTIFACTS/conda-forge-build-done-${CONFIG}" -rm -f "$DONE_CANARY" - -if [ -z "${CI}" ]; then - DOCKER_RUN_ARGS="-it " -fi - -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 \ - -e CI \ - $DOCKER_IMAGE \ - bash \ - /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/README.md b/README.md index 669961f..23e073e 100644 --- a/README.md +++ b/README.md @@ -24,15 +24,15 @@ Current build status - + @@ -70,24 +70,17 @@ Current build status - + - + - - - @@ -141,7 +134,7 @@ A feedstock is made up of a conda recipe (the instructions on what and how to bu the package) and the necessary configurations for automatic building using freely available continuous integration services. Thanks to the awesome service provided by [CircleCI](https://circleci.com/), [AppVeyor](https://www.appveyor.com/) -and [TravisCI](https://travis-ci.org/) it is possible to build and upload installable +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/) channel for Linux, Windows and OSX respectively. diff --git a/build-locally.py b/build-locally.py index 51d6a6e..8f7ecca 100755 --- a/build-locally.py +++ b/build-locally.py @@ -15,11 +15,14 @@ def setup_environment(ns): def run_docker_build(ns): - script = glob.glob(".*/run_docker_build.sh")[0] - subprocess.check_call(script) + script = ".scripts/run_docker_build.sh" + subprocess.check_call([script]) + def verify_config(ns): - valid_configs = {os.path.basename(f)[:-5] for f in glob.glob(".ci_support/*.yaml")} + valid_configs = { + os.path.basename(f)[:-5] for f in glob.glob(".ci_support/*.yaml") + } print(f"valid configs are {valid_configs}") if ns.config in valid_configs: print("Using " + ns.config + " configuration") @@ -39,8 +42,10 @@ def verify_config(ns): else: raise ValueError("config " + ns.config + " is not valid") # Remove the following, as implemented - if not ns.config.startswith('linux'): - raise ValueError(f"only Linux configs currently supported, got {ns.config}") + if not ns.config.startswith("linux"): + raise ValueError( + f"only Linux configs currently supported, got {ns.config}" + ) def main(args=None):
Travis - - macOS + + macOS
AppveyorDrone - - windows + + linux
osx_fortran_compiler_version4osx - variant + variant
osx_fortran_compiler_version7win - variant - -
win_c_compilervs2015 - - variant + variant