Skip to content

Commit

Permalink
Merge pull request #34 from isuruf/compiler
Browse files Browse the repository at this point in the history
Add toolchain cb3 compilers
  • Loading branch information
isuruf authored Apr 28, 2018
2 parents 57df6a5 + 39ab06c commit c7f12bb
Show file tree
Hide file tree
Showing 21 changed files with 161 additions and 53 deletions.
27 changes: 11 additions & 16 deletions appveyor.yml → .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,8 @@ environment:
secure: ipv/06DzgA7pzz2CIAtbPxZSsphDtF+JFyoWRnXkn3O8j7oRe3rzqj3LOoq2DZp4

matrix:
- TARGET_ARCH: x86
CONDA_PY: 27
CONDA_INSTALL_LOCN: C:\\Miniconda

- TARGET_ARCH: x64
CONDA_PY: 27
CONDA_INSTALL_LOCN: C:\\Miniconda-x64
- CONFIG: win_
CONDA_INSTALL_LOCN: C:\Miniconda36-x64


# We always use a 64-bit machine, but can build x86 distributions
Expand All @@ -26,7 +21,7 @@ platform:
install:
# If there is a newer build queued for the same PR, cancel this one.
- 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')"
powershell -Command "(New-Object Net.WebClient).DownloadFile('https://raw.githubusercontent.com/conda-forge/conda-forge-ci-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
Expand All @@ -35,24 +30,24 @@ install:

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

- cmd: set PYTHONUNBUFFERED=1

# Add our channels.
- 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
- cmd: conda.exe config --set show_channel_urls true
- cmd: conda.exe config --remove channels defaults
- cmd: conda.exe config --add channels defaults
- cmd: conda.exe config --add channels conda-forge

# Configure the VM.
- cmd: conda install -n root --quiet --yes conda-forge-build-setup
- cmd: conda.exe install -n root --quiet --yes conda-forge-ci-setup=1
- cmd: run_conda_forge_build_setup

# Skip .NET project specific build phase.
build: off

test_script:
- conda build recipe --quiet
- conda.exe build recipe -m .ci_support\%CONFIG%.yaml --quiet
deploy_script:
- cmd: upload_or_check_non_existence .\recipe conda-forge --channel=main
- cmd: upload_or_check_non_existence .\recipe conda-forge --channel=main -m .ci_support\%CONFIG%.yaml
1 change: 1 addition & 0 deletions .ci_support/README
Original file line number Diff line number Diff line change
@@ -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.
1 change: 1 addition & 0 deletions .ci_support/linux_.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
6 changes: 6 additions & 0 deletions .ci_support/osx_.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
MACOSX_DEPLOYMENT_TARGET:
- '10.9'
macos_machine:
- x86_64-apple-darwin13.4.0
macos_min_version:
- '10.9'
1 change: 1 addition & 0 deletions .ci_support/win_.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
File renamed without changes.
12 changes: 7 additions & 5 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -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_
Original file line number Diff line number Diff line change
@@ -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}"
22 changes: 12 additions & 10 deletions ci_support/run_docker_build.sh → .circleci/run_docker_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ channels:
- defaults
conda-build:
root-dir: /feedstock_root/build_artefacts
root-dir: /home/conda/feedstock_root/build_artifacts
show_channel_urls: true
Expand All @@ -34,11 +34,12 @@ 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"
rm -f "$FEEDSTOCK_ROOT/build_artifacts/conda-forge-build-done"

cat << EOF | docker run -i \
-v "${RECIPE_ROOT}":/recipe_root \
-v "${FEEDSTOCK_ROOT}":/feedstock_root \
-v "${RECIPE_ROOT}":/home/conda/recipe_root \
-v "${FEEDSTOCK_ROOT}":/home/conda/feedstock_root \
-e CONFIG="$CONFIG" \
-e HOST_USER_ID="${HOST_USER_ID}" \
-a stdin -a stdout -a stderr \
condaforge/linux-anvil \
Expand All @@ -51,20 +52,21 @@ set -x
export PYTHONUNBUFFERED=1
echo "$config" > ~/.condarc
# A lock sometimes occurs with incomplete builds. The lock file is stored in build_artefacts.
# A lock sometimes occurs with incomplete builds. The lock file is stored in build_artifacts.
conda clean --lock
conda install --yes --quiet conda-forge-build-setup
# Make sure we pull in the latest conda-build version too
conda install --yes --quiet conda-forge-ci-setup=1 conda-build
source run_conda_forge_build_setup
conda build /recipe_root --quiet || exit 1
upload_or_check_non_existence /recipe_root conda-forge --channel=main || exit 1
conda build /home/conda/recipe_root -m /home/conda/feedstock_root/.ci_support/${CONFIG}.yaml --quiet || exit 1
upload_or_check_non_existence /home/conda/recipe_root conda-forge --channel=main -m /home/conda/feedstock_root/.ci_support/${CONFIG}.yaml || exit 1
touch /feedstock_root/build_artefacts/conda-forge-build-done
touch /home/conda/feedstock_root/build_artifacts/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
test -f "$FEEDSTOCK_ROOT/build_artifacts/conda-forge-build-done" || exit 1
15 changes: 15 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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`
* [ ] 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
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
*.pyc

build_artefacts
build_artifacts
11 changes: 7 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
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: "An8Bq3hcdkkEUBBIxrnbpTB2qAHXaLeEarLQVc7SdY1AYPohxkO9xV7ghUTk1L5QoOBNvw0Nc4S8XoIqscvGru+teYw+R0FkX8h30UhHed4lm/teVGmDmMZxKWHPTGDUNJxkacX17+UihYfVk//9DGx/DEVfbtFkA0vb6ogC82nrWWEqqWih/BrjOvE06xPSdfaUa17x1jJT7L9O4h+0lU8S7wp5cOZ4Jy+ZtqhOLAmyAD28SmRWf3o4FDDrQhS01NnFj9902IP9+lsvY/rhL2ADDj2aSsw1bBiPSUfKjJoTi7KBWjhOk/3WeVf5ld8b2S09DRBQ4bklMMQVsnHKqEUsSiWb3RRr1Q49MRQlXWnmHJsZFViW8cIj5fOCHRrfg4Z6Ni8qrvoVG/BXWEwE2dfQl9+2nJU8PNdYy3tLa9EUbeX+2QYDXE+6Z2OhVwmoKImeuw7bQNADnbaA1Glcdkh+Z2QS+D27fEIX3/paBx35sa/OWeG62u3DhchoRLOwAX15NhAxllLqfmZZd83RxmjV9q++dkxv5ZA8XFF5+lB0XLztkb7N/n8/Ek0NwkxMT6qHsqbtQPLCKu0kTC0t7zfwYIM42F0qXx+k+AXk8PU5fr/4l8XiVECGqrgGRnDGHCXySeNnOjYC3H4t+LG3FskabdPETJDuAtXERUQSOQc="
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
Original file line number Diff line number Diff line change
@@ -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
22 changes: 14 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,19 @@ Summary: A meta-package to enable the right toolchain.
Current build status
====================

Linux: [![Circle CI](https://circleci.com/gh/conda-forge/toolchain-feedstock.svg?style=shield)](https://circleci.com/gh/conda-forge/toolchain-feedstock)
OSX: [![TravisCI](https://travis-ci.org/conda-forge/toolchain-feedstock.svg?branch=master)](https://travis-ci.org/conda-forge/toolchain-feedstock)
Windows: [![AppVeyor](https://ci.appveyor.com/api/projects/status/github/conda-forge/toolchain-feedstock?svg=True)](https://ci.appveyor.com/project/conda-forge/toolchain-feedstock/branch/master)
[![Linux](https://img.shields.io/circleci/project/github/conda-forge/toolchain-feedstock/master.svg?label=Linux)](https://circleci.com/gh/conda-forge/toolchain-feedstock)
[![OSX](https://img.shields.io/travis/conda-forge/toolchain-feedstock/master.svg?label=macOS)](https://travis-ci.org/conda-forge/toolchain-feedstock)
[![Windows](https://img.shields.io/appveyor/ci/conda-forge/toolchain-feedstock/master.svg?label=Windows)](https://ci.appveyor.com/project/conda-forge/toolchain-feedstock/branch/master)

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

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

Installing toolchain
====================
Expand All @@ -32,10 +37,10 @@ Installing `toolchain` from the `conda-forge` channel can be achieved by adding
conda config --add channels conda-forge
```

Once the `conda-forge` channel has been enabled, `toolchain` can be installed with:
Once the `conda-forge` channel has been enabled, `toolchain, toolchain_c_linux-64, toolchain_cxx_linux-64, toolchain_fort_linux-64` can be installed with:

```
conda install toolchain
conda install toolchain toolchain_c_linux-64 toolchain_cxx_linux-64 toolchain_fort_linux-64
```

It is possible to list all of the versions of `toolchain` available on your platform with:
Expand Down Expand Up @@ -66,6 +71,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
===========
Expand Down Expand Up @@ -100,4 +106,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.
Empty file removed recipe/activate.bat
Empty file.
Empty file removed recipe/deactivate.bat
Empty file.
File renamed without changes.
File renamed without changes.
47 changes: 40 additions & 7 deletions recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,46 @@ package:
build:
number: 0

test:
commands:
# Verify the scripts are in-place.
{% for state in ["activate", "deactivate"] %}
- test -f "${PREFIX}/etc/conda/{{ state }}.d/toolchain_{{ state }}.sh" # [unix]
- if not exist %PREFIX%\\etc\\conda\\{{ state }}.d\\toolchain_{{ state }}.bat exit 1 # [win]
{% endfor %}
outputs:
- name: toolchain
# for windows, this is a placebo package. The default conda-build activation stuff is all we use.
# we just don't want people to have to put selectors on their toolchain dep.
script: install-toolchain.sh # [unix]
test:
commands:
# Verify the scripts are in-place.
{% for state in ["activate", "deactivate"] %}
- test -f "${PREFIX}/etc/conda/{{ state }}.d/toolchain_{{ state }}.sh" # [unix]
{% endfor %}
- echo "I'm on windows, and there's nothing to do here." # [win]
{% if unix %}
- source ${PREFIX}/etc/conda/activate.d/toolchain_activate.sh
- if [ -z ${CC+x} ]; then echo "CC is unset after activation" && exit 1; else echo "CC is set to '$CC'"; fi
- source ${PREFIX}/etc/conda/deactivate.d/toolchain_deactivate.sh
- if [ -z ${CC+x} ]; then echo "CC is unset after deactivation "; else echo "CC is set to '$CC' after deactivation" && exit 1; fi

- name: toolchain_c_{{ target_platform }}
requirements:
- {{ pin_subpackage('toolchain', exact=True) }}
run_exports: # [linux]
strong: # [linux]
- libgcc-ng >=4.9 # [linux]

- name: toolchain_cxx_{{ target_platform }}
requirements:
- {{ pin_subpackage('toolchain', exact=True) }}
run_exports:
strong:
- libstdcxx-ng >=4.9 # [linux]

- name: toolchain_fort_{{ target_platform }}
requirements:
- {{ pin_subpackage('toolchain', exact=True) }}
- gcc # [osx]
run_exports:
strong:
- libgfortran-ng >=4.9 # [unix]
{% endif %}

about:
home: https://github.com/conda-forge/toolchain-feedstock
Expand Down

0 comments on commit c7f12bb

Please sign in to comment.