Skip to content

Commit

Permalink
MNT: Re-rendered with conda-build 3.17.8, conda-smithy 3.4.0, and con…
Browse files Browse the repository at this point in the history
…da-forge-pinning 2019.07.04
  • Loading branch information
regro-cf-autotick-bot committed Jul 7, 2019
1 parent b530732 commit aa76e5f
Show file tree
Hide file tree
Showing 8 changed files with 77 additions and 22 deletions.
10 changes: 4 additions & 6 deletions .azure-pipelines/azure-pipelines-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,8 @@ jobs:
linux_:
CONFIG: linux_
UPLOAD_PACKAGES: True
DOCKER_IMAGE: condaforge/linux-anvil-comp7
steps:
- script: |
sudo pip install --upgrade pip
sudo pip install setuptools shyaml
displayName: Install dependencies
# configure qemu binfmt-misc running. This allows us to run docker containers
# embedded qemu-static
- script: |
Expand All @@ -27,7 +23,9 @@ jobs:
condition: not(startsWith(variables['CONFIG'], 'linux_64'))
displayName: Configure binfmt_misc
- script: .azure-pipelines/run_docker_build.sh
- script: |
export CI=azure
.azure-pipelines/run_docker_build.sh
displayName: Run docker build
env:
BINSTAR_TOKEN: $(BINSTAR_TOKEN)
4 changes: 2 additions & 2 deletions .azure-pipelines/azure-pipelines-osx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,15 @@ jobs:
- script: |
source activate base
conda install -n base -c conda-forge --quiet --yes conda-forge-ci-setup=2 conda-build shyaml
conda install -n base -c conda-forge --quiet --yes conda-forge-ci-setup=2 conda-build
displayName: 'Add conda-forge-ci-setup=2'
- script: |
source activate base
echo "Configuring conda."
setup_conda_rc ./ ./recipe ./.ci_support/${CONFIG}.yaml
export CI=azure
source run_conda_forge_build_setup
conda update --yes --quiet --override-channels -c conda-forge -c defaults --all
env: {
Expand Down
13 changes: 7 additions & 6 deletions .azure-pipelines/build_steps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@

set -xeuo pipefail
export PYTHONUNBUFFERED=1
export FEEDSTOCK_ROOT=/home/conda/feedstock_root
export RECIPE_ROOT=/home/conda/recipe_root
export CI_SUPPORT=/home/conda/feedstock_root/.ci_support
export FEEDSTOCK_ROOT="${FEEDSTOCK_ROOT:-/home/conda/feedstock_root}"
export RECIPE_ROOT="${RECIPE_ROOT:-/home/conda/recipe_root}"
export CI_SUPPORT="${FEEDSTOCK_ROOT}/.ci_support"
export CONFIG_FILE="${CI_SUPPORT}/${CONFIG}.yaml"

cat >~/.condarc <<CONDARC
conda-build:
root-dir: /home/conda/feedstock_root/build_artifacts
root-dir: ${FEEDSTOCK_ROOT}/build_artifacts
CONDARC

Expand All @@ -24,7 +24,8 @@ conda install --yes --quiet conda-forge-ci-setup=2 conda-build -c conda-forge
# set up the condarc
setup_conda_rc "${FEEDSTOCK_ROOT}" "${RECIPE_ROOT}" "${CONFIG_FILE}"

run_conda_forge_build_setup
source run_conda_forge_build_setup

# make the build number clobber
make_build_number "${FEEDSTOCK_ROOT}" "${RECIPE_ROOT}" "${CONFIG_FILE}"

Expand All @@ -35,4 +36,4 @@ if [[ "${UPLOAD_PACKAGES}" != "False" ]]; then
upload_package "${FEEDSTOCK_ROOT}" "${RECIPE_ROOT}" "${CONFIG_FILE}"
fi

touch "/home/conda/feedstock_root/build_artifacts/conda-forge-build-done-${CONFIG}"
touch "${FEEDSTOCK_ROOT}/build_artifacts/conda-forge-build-done-${CONFIG}"
7 changes: 5 additions & 2 deletions .azure-pipelines/run_docker_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,10 @@ fi
mkdir -p "$ARTIFACTS"
DONE_CANARY="$ARTIFACTS/conda-forge-build-done-${CONFIG}"
rm -f "$DONE_CANARY"
# Not all providers run with a real tty. Disable using one
DOCKER_RUN_ARGS=" "

if [ -z "${CI}" ]; then
DOCKER_RUN_ARGS="-it "
fi

export UPLOAD_PACKAGES="${UPLOAD_PACKAGES:-True}"
docker run ${DOCKER_RUN_ARGS} \
Expand All @@ -62,6 +64,7 @@ docker run ${DOCKER_RUN_ARGS} \
-e BINSTAR_TOKEN \
-e HOST_USER_ID \
-e UPLOAD_PACKAGES \
-e CI \
$DOCKER_IMAGE \
bash \
/home/conda/feedstock_root/${PROVIDER_DIR}/build_steps.sh
Expand Down
2 changes: 0 additions & 2 deletions .ci_support/linux_.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
build_number_decrement:
- '0'
channel_sources:
- conda-forge,defaults
channel_targets:
Expand Down
4 changes: 0 additions & 4 deletions .ci_support/osx_.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
MACOSX_DEPLOYMENT_TARGET:
- '10.9'
build_number_decrement:
- '0'
channel_sources:
- conda-forge,defaults
channel_targets:
- conda-forge main
docker_image:
- condaforge/linux-anvil
macos_machine:
- x86_64-apple-darwin13.4.0
macos_min_version:
Expand Down
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @sodre
58 changes: 58 additions & 0 deletions build-locally.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
#!/usr/bin/env python
#
# This file has been generated by conda-smithy in order to build the recipe
# locally.
#
import os
import glob
import subprocess
from argparse import ArgumentParser


def setup_environment(ns):
os.environ["CONFIG"] = ns.config
os.environ["UPLOAD_PACKAGES"] = "False"


def run_docker_build(ns):
script = glob.glob(".*/run_docker_build.sh")[0]
subprocess.check_call(script)

def verify_config(ns):
valid_configs = {os.path.basename(f)[:-5] for f in glob.glob(".ci_support/*.yaml")}
print(f"valid configs are {valid_configs}")
if ns.config in valid_configs:
print("Using " + ns.config + " configuration")
return
elif len(valid_configs) == 1:
ns.config = valid_configs.pop()
print("Found " + ns.config + " configuration")
elif ns.config is None:
print("config not selected, please choose from the following:\n")
selections = list(enumerate(sorted(valid_configs), 1))
for i, c in selections:
print(f"{i}. {c}")
s = input("\n> ")
idx = int(s) - 1
ns.config = selections[idx][1]
print(f"selected {ns.config}")
else:
raise ValueError("config " + ns.config + " is not valid")
# Remove the following, as implemented
if not ns.config.startswith('linux'):
raise ValueError(f"only Linux configs currently supported, got {ns.config}")


def main(args=None):
p = ArgumentParser("build-locally")
p.add_argument("config", default=None, nargs="?")

ns = p.parse_args(args=args)
verify_config(ns)
setup_environment(ns)

run_docker_build(ns)


if __name__ == "__main__":
main()

0 comments on commit aa76e5f

Please sign in to comment.