diff --git a/.travis.yml b/.travis.yml index f0bc8ce..cb1bb9e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,18 +18,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 04ad21b..7f5c363 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 de1dbdb..99faacd 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -46,14 +46,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: | + curl 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 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 0000000..463c27f --- /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 5df7d2e..a0968a9 100755 --- a/ci_support/run_docker_build.sh +++ b/ci_support/run_docker_build.sh @@ -24,12 +24,14 @@ show_channel_urls: true CONDARC ) +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 \ -a stdin -a stdout -a stderr \ condaforge/linux-anvil \ - bash || exit $? + bash || exit 1 export BINSTAR_TOKEN=${BINSTAR_TOKEN} export PYTHONUNBUFFERED=1 @@ -59,4 +61,11 @@ source run_conda_forge_build_setup set +x 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 0c5dcdf..421809c 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: