Skip to content

Commit

Permalink
Upgrade to the new Jinja2 compiler syntax (#51)
Browse files Browse the repository at this point in the history
I tracked a segfault on Linux to a bug in GMT that crashed when the 
path names were too long (like the conda placehold_... prefixes). 
This is fixed in PR #52 for the devel branch and will be backported to 
5.4.5 which should come out soon. For now, I tested the built packaged 
on the Docker container locally and it works fine. I'll comment out the 
tests for now to get this built and will put them back with the new release.
  • Loading branch information
leouieda committed Aug 12, 2018
1 parent 20ba5b4 commit a3110f8
Show file tree
Hide file tree
Showing 18 changed files with 248 additions and 109 deletions.
1 change: 1 addition & 0 deletions .ci_support/README
@@ -0,0 +1 @@
This file is automatically generated by conda-smithy. To change any matrix elements, you should change conda-smithy's input conda_build_config.yaml and re-render the recipe, rather than editing these files directly.
27 changes: 27 additions & 0 deletions .ci_support/linux_.yaml
@@ -0,0 +1,27 @@
c_compiler:
- toolchain_c
curl:
- '7.59'
gdal:
- '2.2'
hdf5:
- 1.10.2
libnetcdf:
- '4.6'
openblas:
- 0.2.20
pin_run_as_build:
curl:
max_pin: x
gdal:
max_pin: x.x
hdf5:
max_pin: x.x.x
libnetcdf:
max_pin: x.x
openblas:
max_pin: x.x.x
zlib:
max_pin: x.x
zlib:
- '1.2'
33 changes: 33 additions & 0 deletions .ci_support/osx_.yaml
@@ -0,0 +1,33 @@
MACOSX_DEPLOYMENT_TARGET:
- '10.9'
c_compiler:
- toolchain_c
curl:
- '7.59'
gdal:
- '2.2'
hdf5:
- 1.10.2
libnetcdf:
- '4.6'
macos_machine:
- x86_64-apple-darwin13.4.0
macos_min_version:
- '10.9'
openblas:
- 0.2.20
pin_run_as_build:
curl:
max_pin: x
gdal:
max_pin: x.x
hdf5:
max_pin: x.x.x
libnetcdf:
max_pin: x.x
openblas:
max_pin: x.x.x
zlib:
max_pin: x.x
zlib:
- '1.2'
33 changes: 33 additions & 0 deletions .circleci/build_steps.sh
@@ -0,0 +1,33 @@
#!/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

cat >~/.condarc <<CONDARC
channels:
- conda-forge
- defaults
conda-build:
root-dir: /home/conda/feedstock_root/build_artifacts
show_channel_urls: true
CONDARC

# A lock sometimes occurs with incomplete builds. The lock file is stored in build_artifacts.
conda clean --lock

conda install --yes --quiet conda-forge-ci-setup=1 conda-build
source run_conda_forge_build_setup

conda build /home/conda/recipe_root -m /home/conda/feedstock_root/.ci_support/${CONFIG}.yaml --quiet
upload_or_check_non_existence /home/conda/recipe_root conda-forge --channel=main -m /home/conda/feedstock_root/.ci_support/${CONFIG}.yaml

touch "/home/conda/feedstock_root/build_artifacts/conda-forge-build-done-${CONFIG}"
File renamed without changes.
12 changes: 7 additions & 5 deletions .circleci/config.yml
@@ -1,24 +1,26 @@
version: 2

jobs:
build:
build_linux_:
working_directory: ~/test
machine: true
environment:
- CONFIG: "linux_"
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
./.circleci/fast_finish_ci_pr_build.sh
./.circleci/checkout_merge_commit.sh
- run:
command: docker pull condaforge/linux-anvil
- run:
# Run, test and (if we have a BINSTAR_TOKEN) upload the distributions.
command: ./ci_support/run_docker_build.sh
command: ./.circleci/run_docker_build.sh

workflows:
version: 2
build_and_test:
jobs:
- build
- build_linux_
@@ -1,4 +1,4 @@
#!/bin/bash

curl https://raw.githubusercontent.com/conda-forge/conda-forge-build-setup-feedstock/master/recipe/ff_ci_pr_build.py | \
curl https://raw.githubusercontent.com/conda-forge/conda-forge-ci-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}"
47 changes: 47 additions & 0 deletions .circleci/run_docker_build.sh
@@ -0,0 +1,47 @@
#!/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

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
echo "Need to set CONFIG env variable"
exit 1
fi

mkdir -p "$ARTIFACTS"
DONE_CANARY="$ARTIFACTS/conda-forge-build-done-${CONFIG}"
rm -f "$DONE_CANARY"

docker run -it \
-v "${RECIPE_ROOT}":/home/conda/recipe_root \
-v "${FEEDSTOCK_ROOT}":/home/conda/feedstock_root \
-e CONFIG \
-e BINSTAR_TOKEN \
-e HOST_USER_ID \
condaforge/linux-anvil \
bash \
/home/conda/feedstock_root/.circleci/build_steps.sh

# verify that the end of the script was reached
test -f "$DONE_CANARY"
15 changes: 15 additions & 0 deletions .github/CONTRIBUTING.md
@@ -0,0 +1,15 @@
Thanks for your interest in helping out conda-forge.

Whether you are brand new or a seasoned maintainer, we always appreciate
feedback from the community about how we can improve conda-forge. If you
are submitting a PR or issue, please fill out the respective template. Should
any questions arise please feel free to ask the maintainer team of the
respective feedstock or reach out to `@conda-forge/core` for more complex
issues.

In the case of any issues reported, please be sure to demonstrate the relevant
issue (even if it is an absence of a feature). Providing this information will
help busy maintainers understand what it is you hope to accomplish. Also this
will help provide them clues as to what might be going wrong. These examples
can also be reused as tests in the build to ensure further packages meet these
criteria. This is requested to help you get timely and relevant feedback. :)
25 changes: 25 additions & 0 deletions .github/ISSUE_TEMPLATE.md
@@ -0,0 +1,25 @@
<!--
Thanks for reporting your issue.
Please fill out the sections below.
-->
Issue:

<br/>
Environment (<code>conda list</code>):
<details>

```
$ conda list
```
</details>

<br/>
Details about <code>conda</code> and system ( <code>conda info</code> ):
<details>

```
$ conda info
```
</details>
18 changes: 18 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
@@ -0,0 +1,18 @@
<!--
Thank you for pull request.
Below are a few things we ask you kindly to self-check before getting a review. Remove checks that are not relevant.
-->
Checklist
* [ ] Used a fork of the feedstock to propose changes
* [ ] Bumped the build number (if the version is unchanged)
* [ ] Reset the build number to `0` (if the version changed)
* [ ] [Re-rendered]( https://conda-forge.org/docs/conda_smithy.html#how-to-re-render ) with the latest `conda-smithy` (Use the phrase <code>@<space/>conda-forge-admin, please rerender</code> in a comment in this PR for automated rerendering)
* [ ] Ensured the license file is being packaged.

<!--
Please note any issues this fixes using [closing keywords]( https://help.github.com/articles/closing-issues-using-keywords/ ):
-->

<!--
Please add any other relevant info below:
-->
2 changes: 1 addition & 1 deletion .gitignore
@@ -1,3 +1,3 @@
*.pyc

build_artefacts
build_artifacts
11 changes: 7 additions & 4 deletions .travis.yml
Expand Up @@ -7,6 +7,9 @@ os: osx
osx_image: xcode6.4

env:
matrix:
- CONFIG=osx_

global:
# The BINSTAR_TOKEN secure variable. This is defined canonically in conda-forge.yml.
- secure: "AVAEOvgJRTbM1j5fpK4p4DxAZlCxMjFbuWgi4p3Sz1XpV51yL7rFD0xYo6Bie+JAfRZeja4mJ6rwm+LaAYA6Xvl536jYVFLS4WSw0yIdFgo+cOHp3ZPIEMhLN7Aag4IeyRyPoIAFcDAMNGyP/kJCK07+dUBSDRuHYqC0LjToz1HlaPmWC1VHWqHAu2ENGyoxa37Mzaehut/kQrh1qHBOzV4YZYipw9W9oRauLmulL7HYlUJKtfchb58ifakIo4EdhDX8c5oI9EetV+skoOSso9Gg9wQRb3XWQxup4D2M/dMJ7gYRpE6Umc7LMKK24ilSFS0nXjIj9jOkEjmUP5jDbf6dih8wlwgwsMNf9BP38hZ/bTak32TUKMEMwc23DbOjzkzWbanwtJ8eafY1GVdwWzctygYT2NoGoDAZKUQ5PHVa+Keyy6LQiz5boIY243q8odrG2o20gDvyrBxRT5/LBbE98IB23wr3VoCiV53Mir3swRCfRhV8VxqYp3UeC8szYjF+EsLAF8Gh4DX9OWsLoihppjR3Vcrl4LcH1Am6bBH4m1xJs8rOINP0ILBJTlJ00qH//WA/9451ZBeYcvWA50kWJ3ApjkmBhyny8XaJKanB12FEtcswcnepAld2ZCsKhPjZtRgDmh5dujB/wvKV31F5lbemsA0lZDFXto8oZpo="
Expand All @@ -15,7 +18,7 @@ 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 | \
(curl https://raw.githubusercontent.com/conda-forge/conda-forge-ci-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.
Expand Down Expand Up @@ -47,10 +50,10 @@ install:
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
conda install --yes --quiet conda-forge-ci-setup=1
source run_conda_forge_build_setup
script:
- conda build ./recipe
- conda build ./recipe -m ./.ci_support/${CONFIG}.yaml

- upload_or_check_non_existence ./recipe conda-forge --channel=main
- upload_or_check_non_existence ./recipe conda-forge --channel=main -m ./.ci_support/${CONFIG}.yaml
2 changes: 1 addition & 1 deletion LICENSE → LICENSE.txt
@@ -1,5 +1,5 @@
BSD 3-clause license
Copyright (c) 2015-2017, conda-forge
Copyright (c) 2015-2018, 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
24 changes: 13 additions & 11 deletions README.md
Expand Up @@ -21,14 +21,16 @@ tools. GMT supports over 30 map projections and transformations
Current build status
====================

Linux: [![Circle CI](https://circleci.com/gh/conda-forge/gmt-feedstock.svg?style=shield)](https://circleci.com/gh/conda-forge/gmt-feedstock)
OSX: [![TravisCI](https://travis-ci.org/conda-forge/gmt-feedstock.svg?branch=master)](https://travis-ci.org/conda-forge/gmt-feedstock)
Windows: ![](https://cdn.rawgit.com/conda-forge/conda-smithy/90845bba35bec53edac7a16638aa4d77217a3713/conda_smithy/static/disabled.svg)
[![Linux](https://img.shields.io/circleci/project/github/conda-forge/gmt-feedstock/master.svg?label=Linux)](https://circleci.com/gh/conda-forge/gmt-feedstock)
[![OSX](https://img.shields.io/travis/conda-forge/gmt-feedstock/master.svg?label=macOS)](https://travis-ci.org/conda-forge/gmt-feedstock)
![Windows disabled](https://img.shields.io/badge/Windows-disabled-lightgrey.svg)

Current release info
====================
Version: [![Anaconda-Server Badge](https://anaconda.org/conda-forge/gmt/badges/version.svg)](https://anaconda.org/conda-forge/gmt)
Downloads: [![Anaconda-Server Badge](https://anaconda.org/conda-forge/gmt/badges/downloads.svg)](https://anaconda.org/conda-forge/gmt)

| Name | Downloads | Version | Platforms |
| --- | --- | --- | --- |
| [![Conda Recipe](https://img.shields.io/badge/recipe-gmt-green.svg)](https://anaconda.org/conda-forge/gmt) | [![Conda Downloads](https://img.shields.io/conda/dn/conda-forge/gmt.svg)](https://anaconda.org/conda-forge/gmt) | [![Conda Version](https://img.shields.io/conda/vn/conda-forge/gmt.svg)](https://anaconda.org/conda-forge/gmt) | [![Conda Platforms](https://img.shields.io/conda/pn/conda-forge/gmt.svg)](https://anaconda.org/conda-forge/gmt) |

Installing gmt
==============
Expand Down Expand Up @@ -63,13 +65,13 @@ for each of the installable packages. Such a repository is known as a *feedstock
A feedstock is made up of a conda recipe (the instructions on what and how to build
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](http://www.appveyor.com/)
[CircleCI](https://circleci.com/), [AppVeyor](https://www.appveyor.com/)
and [TravisCI](https://travis-ci.org/) it is possible to build and upload installable
packages to the [conda-forge](https://anaconda.org/conda-forge)
[Anaconda-Cloud](http://docs.anaconda.org/) channel for Linux, Windows and OSX respectively.
[Anaconda-Cloud](https://anaconda.org/) channel for Linux, Windows and OSX respectively.

To manage the continuous integration and simplify feedstock maintenance
[conda-smithy](http://github.com/conda-forge/conda-smithy) has been developed.
[conda-smithy](https://github.com/conda-forge/conda-smithy) has been developed.
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``.

Expand Down Expand Up @@ -105,7 +107,7 @@ build distinct package versions.

In order to produce a uniquely identifiable distribution:
* If the version of a package **is not** being increased, please add or increase
the [``build/number``](http://conda.pydata.org/docs/building/meta-yaml.html#build-number-and-string).
the [``build/number``](https://conda.io/docs/user-guide/tasks/build-packages/define-metadata.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.
the [``build/number``](https://conda.io/docs/user-guide/tasks/build-packages/define-metadata.html#build-number-and-string)
back to 0.

0 comments on commit a3110f8

Please sign in to comment.