Skip to content

Commit

Permalink
MNT: Re-rendered with conda-smithy 2.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jakirkham committed Feb 20, 2017
1 parent 08132f2 commit 8b746e7
Show file tree
Hide file tree
Showing 6 changed files with 55 additions and 38 deletions.
27 changes: 23 additions & 4 deletions .travis.yml
Expand Up @@ -4,7 +4,7 @@
language: generic

os: osx
osx_image: beta-xcode6.1
osx_image: xcode6.4

env:
matrix:
Expand All @@ -16,19 +16,38 @@ 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 $(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
conda config --add channels conda-forge
conda config --set show_channel_urls true
conda install --yes --quiet conda-forge-build-setup
Expand Down
2 changes: 1 addition & 1 deletion 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:
Expand Down
42 changes: 13 additions & 29 deletions appveyor.yml
Expand Up @@ -22,14 +22,6 @@ environment:
CONDA_PY: 27
CONDA_INSTALL_LOCN: C:\\Miniconda-x64

- TARGET_ARCH: x86
CONDA_PY: 34
CONDA_INSTALL_LOCN: C:\\Miniconda3

- TARGET_ARCH: x64
CONDA_PY: 34
CONDA_INSTALL_LOCN: C:\\Miniconda3-x64

- TARGET_ARCH: x86
CONDA_PY: 35
CONDA_INSTALL_LOCN: C:\\Miniconda35
Expand All @@ -46,35 +38,27 @@ 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

# Add path, activate `conda` and update conda.
- cmd: call %CONDA_INSTALL_LOCN%\Scripts\activate.bat
- cmd: conda update --yes --quiet conda

- cmd: set PYTHONUNBUFFERED=1

# Add our channels.
- cmd: set "OLDPATH=%PATH%"
- cmd: set "PATH=%CONDA_INSTALL_LOCN%\\Scripts;%CONDA_INSTALL_LOCN%\\Library\\bin;%PATH%"
- cmd: conda config --set show_channel_urls true
- cmd: conda config --remove channels defaults
- cmd: conda config --add channels defaults
- cmd: conda config --add channels conda-forge

# Add a hack to switch to `conda` version `4.1.12` before activating.
# This is required to handle a long path activation issue.
# Please see PR ( https://github.com/conda/conda/pull/3349 ).
- cmd: conda install --yes --quiet conda=4.1.12
- cmd: set "PATH=%OLDPATH%"
- cmd: set "OLDPATH="

# Actually activate `conda`.
- cmd: call %CONDA_INSTALL_LOCN%\Scripts\activate.bat
- cmd: set PYTHONUNBUFFERED=1

# 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
Expand Down
4 changes: 4 additions & 0 deletions 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}"
17 changes: 13 additions & 4 deletions ci_support/run_docker_build.sh
Expand Up @@ -14,7 +14,7 @@ config=$(cat <<CONDARC
channels:
- conda-forge
- defaults # As we need conda-build
- defaults
conda-build:
root-dir: /feedstock_root/build_artefacts
Expand All @@ -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 \
-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
Expand All @@ -47,4 +49,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
1 change: 1 addition & 0 deletions circle.yml
@@ -1,5 +1,6 @@
checkout:
post:
- ./ci_support/fast_finish_ci_pr_build.sh
- ./ci_support/checkout_merge_commit.sh

machine:
Expand Down

0 comments on commit 8b746e7

Please sign in to comment.