diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 0000000..95756f9 --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,25 @@ +version: 2 + +jobs: + build: + working_directory: ~/test + machine: true + steps: + - checkout + - run: + name: Fast finish outdated PRs and merge PRs + command: | + ./ci_support/fast_finish_ci_pr_build.sh + ./ci_support/checkout_merge_commit.sh + - run: + name: Pull the docker image + command: bash pull condaforge/linux-anvil + - run: + # Run, test and (if we have a BINSTAR_TOKEN) upload the distributions. + command: ./ci_support/run_docker_build.sh + +workflows: + version: 2 + build_and_test: + jobs: + - build diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..974953e --- /dev/null +++ b/.gitattributes @@ -0,0 +1,7 @@ +* text=auto + +*.patch binary +*.diff binary +meta.yaml text eol=lf +build.sh text eol=lf +bld.bat text eol=crlf diff --git a/.travis.yml b/.travis.yml index bd719e5..4357123 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,7 +4,7 @@ language: generic os: osx -osx_image: beta-xcode6.1 +osx_image: xcode6.4 env: global: @@ -13,19 +13,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 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/README.md b/README.md index b20e3a3..e914a03 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,18 @@ Summary: IJG JPEG compliant runtime library with SIMD and other optimizations +Current build status +==================== + +Linux: [![Circle CI](https://circleci.com/gh/conda-forge/libjpeg-turbo-feedstock.svg?style=shield)](https://circleci.com/gh/conda-forge/libjpeg-turbo-feedstock) +OSX: [![TravisCI](https://travis-ci.org/conda-forge/libjpeg-turbo-feedstock.svg?branch=master)](https://travis-ci.org/conda-forge/libjpeg-turbo-feedstock) +Windows: [![AppVeyor](https://ci.appveyor.com/api/projects/status/github/conda-forge/libjpeg-turbo-feedstock?svg=True)](https://ci.appveyor.com/project/conda-forge/libjpeg-turbo-feedstock/branch/master) + +Current release info +==================== +Version: [![Anaconda-Server Badge](https://anaconda.org/conda-forge/libjpeg-turbo/badges/version.svg)](https://anaconda.org/conda-forge/libjpeg-turbo) +Downloads: [![Anaconda-Server Badge](https://anaconda.org/conda-forge/libjpeg-turbo/badges/downloads.svg)](https://anaconda.org/conda-forge/libjpeg-turbo) + Installing libjpeg-turbo ======================== @@ -54,6 +66,7 @@ To manage the continuous integration and simplify feedstock maintenance Using the ``conda-forge.yml`` within this repository, it is possible to re-render all of this feedstock's supporting files (e.g. the CI configuration files) with ``conda smithy rerender``. +For more information please check the [conda-forge documentation](https://conda-forge.org/docs/). Terminology =========== @@ -67,18 +80,6 @@ Terminology **conda-forge** - the place where the feedstock and smithy live and work to produce the finished article (built conda distributions) -Current build status -==================== - -Linux: [![Circle CI](https://circleci.com/gh/conda-forge/libjpeg-turbo-feedstock.svg?style=shield)](https://circleci.com/gh/conda-forge/libjpeg-turbo-feedstock) -OSX: [![TravisCI](https://travis-ci.org/conda-forge/libjpeg-turbo-feedstock.svg?branch=master)](https://travis-ci.org/conda-forge/libjpeg-turbo-feedstock) -Windows: [![AppVeyor](https://ci.appveyor.com/api/projects/status/github/conda-forge/libjpeg-turbo-feedstock?svg=True)](https://ci.appveyor.com/project/conda-forge/libjpeg-turbo-feedstock/branch/master) - -Current release info -==================== -Version: [![Anaconda-Server Badge](https://anaconda.org/conda-forge/libjpeg-turbo/badges/version.svg)](https://anaconda.org/conda-forge/libjpeg-turbo) -Downloads: [![Anaconda-Server Badge](https://anaconda.org/conda-forge/libjpeg-turbo/badges/downloads.svg)](https://anaconda.org/conda-forge/libjpeg-turbo) - Updating libjpeg-turbo-feedstock ================================ @@ -100,4 +101,4 @@ In order to produce a uniquely identifiable distribution: the [``build/number``](http://conda.pydata.org/docs/building/meta-yaml.html#build-number-and-string). * If the version of a package **is** being increased, please remember to return the [``build/number``](http://conda.pydata.org/docs/building/meta-yaml.html#build-number-and-string) - back to 0. + back to 0. \ No newline at end of file diff --git a/appveyor.yml b/appveyor.yml index e8119e2..341c2c2 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -4,16 +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" - - # We set a default Python version for the miniconda that is to be installed. This can be - # overridden in the matrix definition where appropriate. - CONDA_PY: "27" - CONDA_INSTALL_LOCN: "C:\\Miniconda-x64" - BINSTAR_TOKEN: # The BINSTAR_TOKEN secure variable. This is defined canonically in conda-forge.yml. secure: ipv/06DzgA7pzz2CIAtbPxZSsphDtF+JFyoWRnXkn3O8j7oRe3rzqj3LOoq2DZp4 @@ -27,14 +17,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 @@ -43,6 +25,14 @@ environment: CONDA_PY: 35 CONDA_INSTALL_LOCN: C:\\Miniconda35-x64 + - TARGET_ARCH: x86 + CONDA_PY: 36 + CONDA_INSTALL_LOCN: C:\\Miniconda36 + + - TARGET_ARCH: x64 + CONDA_PY: 36 + CONDA_INSTALL_LOCN: C:\\Miniconda36-x64 + # We always use a 64-bit machine, but can build x86 distributions # with the TARGET_ARCH variable. @@ -51,36 +41,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: | + 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 + # 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 - - - cmd: conda install -n root --quiet --yes obvious-ci + # Configure the VM. - cmd: conda install -n root --quiet --yes conda-forge-build-setup - cmd: run_conda_forge_build_setup @@ -88,6 +69,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 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 f4bad78..57286d0 100755 --- a/ci_support/run_docker_build.sh +++ b/ci_support/run_docker_build.sh @@ -14,7 +14,7 @@ config=$(cat < /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 \ + -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 @@ -41,7 +57,14 @@ conda clean --lock conda install --yes --quiet conda-forge-build-setup source run_conda_forge_build_setup -# 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 +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 deleted file mode 100644 index 0c5dcdf..0000000 --- a/circle.yml +++ /dev/null @@ -1,18 +0,0 @@ -checkout: - post: - - ./ci_support/checkout_merge_commit.sh - -machine: - services: - - docker - -dependencies: - # Note, we used to use the naive caching of docker images, but found that it was quicker - # just to pull each time. #rollondockercaching - override: - - docker pull condaforge/linux-anvil - -test: - override: - # Run, test and (if we have a BINSTAR_TOKEN) upload the distributions. - - ./ci_support/run_docker_build.sh