diff --git a/.travis.yml b/.travis.yml index c8077f6b..c26e9778 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,18 +13,35 @@ env: before_install: + # Fast finish the PR. + - | + (curl https://raw.githubusercontent.com/conda-forge/conda-forge-build-setup-feedstock/master/recipe/ff_ci_pr_build.py | \ + python - -v --ci "travis" "${TRAVIS_REPO_SLUG}" "${TRAVIS_BUILD_NUMBER}" "${TRAVIS_PULL_REQUEST}") || exit 1 + # Remove homebrew. - - brew remove --force --ignore-dependencies $(brew list) - - brew cleanup -s - - rm -rf $(brew --cache) + - | + echo "" + echo "Removing homebrew from Travis CI 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 + install: + # Install Miniconda. - | + echo "" + echo "Installing a fresh version of Miniconda." MINICONDA_URL="https://repo.continuum.io/miniconda" MINICONDA_FILE="Miniconda3-latest-MacOSX-x86_64.sh" curl -L -O "${MINICONDA_URL}/${MINICONDA_FILE}" bash $MINICONDA_FILE -b + # Configure conda. + - | + echo "" + echo "Configuring conda." source /Users/travis/miniconda3/bin/activate root conda config --remove channels defaults conda config --add channels defaults diff --git a/LICENSE b/LICENSE index 04ad21b5..7f5c3634 100644 --- a/LICENSE +++ b/LICENSE @@ -1,5 +1,5 @@ BSD 3-clause license -Copyright (c) conda-forge +Copyright (c) 2015-2017, conda-forge All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: diff --git a/appveyor.yml b/appveyor.yml index 9001ae83..63d439f2 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -4,11 +4,6 @@ environment: - # SDK v7.0 MSVC Express 2008's SetEnv.cmd script will fail if the - # /E:ON and /V:ON options are not enabled in the batch script intepreter - # See: http://stackoverflow.com/a/13751649/163740 - CMD_IN_ENV: "cmd /E:ON /V:ON /C obvci_appveyor_python_build_env.cmd" - BINSTAR_TOKEN: # The BINSTAR_TOKEN secure variable. This is defined canonically in conda-forge.yml. secure: MP4hZYylDyUWEsrt3u3cod2sbFeRwUziH02mvQOdbjsTO/l1yIxDkP/76rSIjcGC @@ -38,14 +33,10 @@ platform: install: # If there is a newer build queued for the same PR, cancel this one. - # The AppVeyor 'rollout builds' option is supposed to serve the same - # purpose but it is problematic because it tends to cancel builds pushed - # directly to master instead of just PR builds (or the converse). - # credits: JuliaLang developers. - - ps: if ($env:APPVEYOR_PULL_REQUEST_NUMBER -and $env:APPVEYOR_BUILD_NUMBER -ne ((Invoke-RestMethod ` - https://ci.appveyor.com/api/projects/$env:APPVEYOR_ACCOUNT_NAME/$env:APPVEYOR_PROJECT_SLUG/history?recordsNumber=50).builds | ` - Where-Object pullRequestId -eq $env:APPVEYOR_PULL_REQUEST_NUMBER)[0].buildNumber) { ` - throw "There are newer queued builds for this pull request, failing early." } + - cmd: | + powershell -Command "(New-Object Net.WebClient).DownloadFile('https://raw.githubusercontent.com/conda-forge/conda-forge-build-setup-feedstock/master/recipe/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%" + del ff_ci_pr_build.py # Cywing's git breaks conda-build. (See https://github.com/conda-forge/conda-smithy-feedstock/pull/2.) - cmd: rmdir C:\cygwin /s /q @@ -63,7 +54,6 @@ install: - cmd: conda config --add channels conda-forge # Configure the VM. - - cmd: conda install -n root --quiet --yes obvious-ci - cmd: conda install -n root --quiet --yes conda-forge-build-setup - cmd: run_conda_forge_build_setup @@ -71,6 +61,6 @@ install: build: off test_script: - - "%CMD_IN_ENV% conda build recipe --quiet" + - conda build recipe --quiet deploy_script: - cmd: upload_or_check_non_existence .\recipe conda-forge --channel=main diff --git a/ci_support/fast_finish_ci_pr_build.sh b/ci_support/fast_finish_ci_pr_build.sh new file mode 100755 index 00000000..463c27fb --- /dev/null +++ b/ci_support/fast_finish_ci_pr_build.sh @@ -0,0 +1,4 @@ +#!/bin/bash + +curl https://raw.githubusercontent.com/conda-forge/conda-forge-build-setup-feedstock/master/recipe/ff_ci_pr_build.py | \ + python - -v --ci "circle" "${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME}" "${CIRCLE_BUILD_NUM}" "${CIRCLE_PR_NUMBER}" diff --git a/ci_support/run_docker_build.sh b/ci_support/run_docker_build.sh index 41799c2f..14278f21 100755 --- a/ci_support/run_docker_build.sh +++ b/ci_support/run_docker_build.sh @@ -24,14 +24,30 @@ show_channel_urls: true CONDARC ) +# 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 +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 + HOST_USER_ID=$(docker-machine ssh $(docker-machine active) id -u) +fi + +rm -f "$FEEDSTOCK_ROOT/build_artefacts/conda-forge-build-done" + cat << EOF | docker run -i \ -v "${RECIPE_ROOT}":/recipe_root \ -v "${FEEDSTOCK_ROOT}":/feedstock_root \ + -e HOST_USER_ID="${HOST_USER_ID}" \ -a stdin -a stdout -a stderr \ condaforge/linux-anvil \ - bash || exit $? + bash || exit 1 +set -e +set +x export BINSTAR_TOKEN=${BINSTAR_TOKEN} +set -x export PYTHONUNBUFFERED=1 echo "$config" > ~/.condarc @@ -46,10 +62,17 @@ source run_conda_forge_build_setup # "recipe/yum_requirements.txt" file. After updating that file, # run "conda smithy rerender" and this line be updated # automatically. -yum install -y devtoolset-2-gcc-gfortran +/usr/bin/sudo -n yum install -y devtoolset-2-gcc-gfortran # Embarking on 1 case(s). conda build /recipe_root --quiet || exit 1 upload_or_check_non_existence /recipe_root conda-forge --channel=main || exit 1 +touch /feedstock_root/build_artefacts/conda-forge-build-done EOF + +# double-check that the build got to the end +# see https://github.com/conda-forge/conda-smithy/pull/337 +# for a possible fix +set -x +test -f "$FEEDSTOCK_ROOT/build_artefacts/conda-forge-build-done" || exit 1 diff --git a/circle.yml b/circle.yml index 0c5dcdfe..421809c1 100644 --- a/circle.yml +++ b/circle.yml @@ -1,5 +1,6 @@ checkout: post: + - ./ci_support/fast_finish_ci_pr_build.sh - ./ci_support/checkout_merge_commit.sh machine: diff --git a/recipe/meta.yaml b/recipe/meta.yaml index e66ed4c0..e16d353b 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -18,10 +18,12 @@ source: # https://github.com/conda-forge/staged-recipes/pull/199 # - test_Makefile.in.patch + # Disable shared Fortran API building on OSX + - osx_configure.patch # [osx] build: - number: 10 - skip: True # [py==36] + number: 11 + skip: True # [win and py36] features: - vc9 # [win and py27] - vc10 # [win and py34] diff --git a/recipe/osx_configure.patch b/recipe/osx_configure.patch new file mode 100644 index 00000000..29a2a735 --- /dev/null +++ b/recipe/osx_configure.patch @@ -0,0 +1,11 @@ +--- configure 2016-05-10 14:24:58.000000000 -0700 ++++ configure 2017-05-25 13:06:21.459593700 -0700 +@@ -7730,6 +7730,8 @@ + fi + fi + ++H5_FORTRAN_SHARED="no" ++ + if test "X$H5_FORTRAN_SHARED" = "Xyes"; then + FORTRAN_SHARED_CONDITIONAL_TRUE= + FORTRAN_SHARED_CONDITIONAL_FALSE='#'