Skip to content

Commit

Permalink
Merge pull request #99 from saraedum/rerender
Browse files Browse the repository at this point in the history
  • Loading branch information
saraedum authored Jun 29, 2020
2 parents e1151f1 + 4b5134d commit 4d5b069
Show file tree
Hide file tree
Showing 21 changed files with 289 additions and 441 deletions.
182 changes: 32 additions & 150 deletions .azure-pipelines/azure-pipelines-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,173 +3,55 @@
# -*- mode: yaml -*-

jobs:
- job: linux_name_intervalxt_python_37_target_coverage
- job: linux
pool:
vmImage: ubuntu-16.04
variables:
CONFIG: linux_name_intervalxt_python_37_target_coverage
UPLOAD_PACKAGES: False
DOCKER_IMAGE: condaforge/linux-anvil-comp7
timeoutInMinutes: 360
steps:
# configure qemu binfmt-misc running. This allows us to run docker containers
# embedded qemu-static
- script: |
docker run --rm --privileged multiarch/qemu-user-static:register --reset --credential yes
ls /proc/sys/fs/binfmt_misc/
condition: not(startsWith(variables['CONFIG'], 'linux_64'))
displayName: Configure binfmt_misc
- download: current
patterns: '**/*.tar.bz2'
- script: |
export CI=azure
export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME
.scripts/run_docker_build.sh
displayName: Run docker build
env:
BINSTAR_TOKEN: $(BINSTAR_TOKEN)
CODECOV_TOKEN: $(CODECOV_TOKEN)
ASV_SECRET_KEY: $(ASV_SECRET_KEY)
- job: linux_name_intervalxt_python_37_target_style
pool:
vmImage: ubuntu-16.04
variables:
CONFIG: linux_name_intervalxt_python_37_target_style
UPLOAD_PACKAGES: False
DOCKER_IMAGE: condaforge/linux-anvil-comp7
timeoutInMinutes: 360
steps:
# configure qemu binfmt-misc running. This allows us to run docker containers
# embedded qemu-static
- script: |
docker run --rm --privileged multiarch/qemu-user-static:register --reset --credential yes
ls /proc/sys/fs/binfmt_misc/
condition: not(startsWith(variables['CONFIG'], 'linux_64'))
displayName: Configure binfmt_misc
- download: current
patterns: '**/*.tar.bz2'
- script: |
export CI=azure
export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME
.scripts/run_docker_build.sh
displayName: Run docker build
env:
BINSTAR_TOKEN: $(BINSTAR_TOKEN)
CODECOV_TOKEN: $(CODECOV_TOKEN)
ASV_SECRET_KEY: $(ASV_SECRET_KEY)
- job: linux_name_intervalxt_python_37_target_test
pool:
vmImage: ubuntu-16.04
variables:
CONFIG: linux_name_intervalxt_python_37_target_test
UPLOAD_PACKAGES: False
DOCKER_IMAGE: condaforge/linux-anvil-comp7
timeoutInMinutes: 360
steps:
# configure qemu binfmt-misc running. This allows us to run docker containers
# embedded qemu-static
- script: |
docker run --rm --privileged multiarch/qemu-user-static:register --reset --credential yes
ls /proc/sys/fs/binfmt_misc/
condition: not(startsWith(variables['CONFIG'], 'linux_64'))
displayName: Configure binfmt_misc
- download: current
patterns: '**/*.tar.bz2'
- script: |
export CI=azure
export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME
.scripts/run_docker_build.sh
displayName: Run docker build
env:
BINSTAR_TOKEN: $(BINSTAR_TOKEN)
CODECOV_TOKEN: $(CODECOV_TOKEN)
ASV_SECRET_KEY: $(ASV_SECRET_KEY)
- job: linux_name_libintervalxt_python_37_target_release
pool:
vmImage: ubuntu-16.04
variables:
CONFIG: linux_name_libintervalxt_python_37_target_release
UPLOAD_PACKAGES: True
DOCKER_IMAGE: condaforge/linux-anvil-comp7
strategy:
matrix:
coverage:
CONFIG: linux_coverage
UPLOAD_PACKAGES: 'False'
DOCKER_IMAGE: condaforge/linux-anvil-comp7
release:
CONFIG: linux_release
UPLOAD_PACKAGES: 'True'
DOCKER_IMAGE: condaforge/linux-anvil-comp7
style:
CONFIG: linux_style
UPLOAD_PACKAGES: 'False'
DOCKER_IMAGE: condaforge/linux-anvil-comp7
test36:
CONFIG: linux_test36
UPLOAD_PACKAGES: 'False'
DOCKER_IMAGE: condaforge/linux-anvil-comp7
test37:
CONFIG: linux_test37
UPLOAD_PACKAGES: 'False'
DOCKER_IMAGE: condaforge/linux-anvil-comp7
maxParallel: 8
timeoutInMinutes: 360

steps:
# configure qemu binfmt-misc running. This allows us to run docker containers
# embedded qemu-static
- script: |
docker run --rm --privileged multiarch/qemu-user-static:register --reset --credential yes
ls /proc/sys/fs/binfmt_misc/
condition: not(startsWith(variables['CONFIG'], 'linux_64'))
displayName: Configure binfmt_misc
- download: current
patterns: '**/*.tar.bz2'
- script: |
export CI=azure
export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME
.scripts/run_docker_build.sh
displayName: Run docker build
env:
BINSTAR_TOKEN: $(BINSTAR_TOKEN)
CODECOV_TOKEN: $(CODECOV_TOKEN)
ASV_SECRET_KEY: $(ASV_SECRET_KEY)
- publish: $(System.DefaultWorkingDirectory)/build_artifacts
artifact: linux_name_libintervalxt_python_37_target_release
- job: linux_name_pyintervalxt_python_36_target_release
dependsOn: linux_name_libintervalxt_python_37_target_release
pool:
vmImage: ubuntu-16.04
variables:
CONFIG: linux_name_pyintervalxt_python_36_target_release
UPLOAD_PACKAGES: True
DOCKER_IMAGE: condaforge/linux-anvil-comp7
timeoutInMinutes: 360
steps:
rm -rf /opt/ghc
df -h
displayName: Manage disk space
# configure qemu binfmt-misc running. This allows us to run docker containers
# embedded qemu-static
- script: |
docker run --rm --privileged multiarch/qemu-user-static:register --reset --credential yes
ls /proc/sys/fs/binfmt_misc/
condition: not(startsWith(variables['CONFIG'], 'linux_64'))
displayName: Configure binfmt_misc
- download: current
patterns: '**/*.tar.bz2'
- script: |
export CI=azure
export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME
export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME})
.scripts/run_docker_build.sh
displayName: Run docker build
env:
BINSTAR_TOKEN: $(BINSTAR_TOKEN)
CODECOV_TOKEN: $(CODECOV_TOKEN)
ASV_SECRET_KEY: $(ASV_SECRET_KEY)
- publish: $(System.DefaultWorkingDirectory)/build_artifacts
artifact: linux_name_pyintervalxt_python_36_target_release
- job: linux_name_pyintervalxt_python_37_target_release
dependsOn: linux_name_libintervalxt_python_37_target_release
pool:
vmImage: ubuntu-16.04
variables:
CONFIG: linux_name_pyintervalxt_python_37_target_release
UPLOAD_PACKAGES: True
DOCKER_IMAGE: condaforge/linux-anvil-comp7
timeoutInMinutes: 360
steps:
# configure qemu binfmt-misc running. This allows us to run docker containers
# embedded qemu-static
- script: |
docker run --rm --privileged multiarch/qemu-user-static:register --reset --credential yes
ls /proc/sys/fs/binfmt_misc/
condition: not(startsWith(variables['CONFIG'], 'linux_64'))
displayName: Configure binfmt_misc
- download: current
patterns: '**/*.tar.bz2'
- script: |
export CI=azure
export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME
.scripts/run_docker_build.sh
displayName: Run docker build
env:
BINSTAR_TOKEN: $(BINSTAR_TOKEN)
CODECOV_TOKEN: $(CODECOV_TOKEN)
ASV_SECRET_KEY: $(ASV_SECRET_KEY)
- publish: $(System.DefaultWorkingDirectory)/build_artifacts
artifact: linux_name_pyintervalxt_python_37_target_release
CODECOV_TOKEN: $(CODECOV_TOKEN)
80 changes: 80 additions & 0 deletions .ci_support/conda_build.3979.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
From 54c79fc5d1c0f251f01b18d3fadd44f795c19d36 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Julian=20R=C3=BCth?= <[email protected]>
Date: Mon, 29 Jun 2020 01:50:34 +0200
Subject: [PATCH] Make list_of_dicts_to_dict_of_lists preserver the original
order

list_of_dicts_to_dict_of_lists() was not actually inverse to
dict_of_lists_to_list_of_dicts() since its use of set() changed the
original order in lists.
---
conda_build/utils.py | 16 ++++++++++------
conda_build/variants.py | 13 +++++--------
2 files changed, 15 insertions(+), 14 deletions(-)

diff --git a/conda_build/utils.py b/conda_build/utils.py
index f04984e6..927f3d22 100644
--- a/conda_build/utils.py
+++ b/conda_build/utils.py
@@ -1161,12 +1161,16 @@ def package_has_file(package_path, file_path, refresh=False):


def ensure_list(arg):
- if (isinstance(arg, string_types) or not hasattr(arg, '__iter__')):
- if arg is not None:
- arg = [arg]
- else:
- arg = []
- return arg
+ if arg is None:
+ return []
+
+ if isinstance(arg, string_types):
+ return [arg]
+
+ if not hasattr(arg, '__iter__'):
+ return [arg]
+
+ return list(arg)


@contextlib.contextmanager
diff --git a/conda_build/variants.py b/conda_build/variants.py
index c3cdae43..e91911d3 100644
--- a/conda_build/variants.py
+++ b/conda_build/variants.py
@@ -446,7 +446,8 @@ def dict_of_lists_to_list_of_dicts(dict_of_lists, extend_keys=None):


def list_of_dicts_to_dict_of_lists(list_of_dicts):
- """Opposite of dict_of_lists_to_list_of_dicts function.
+ r"""
+ Inverse of `dict_of_lists_to_list_of_dicts`.

Take broken out collection of variants, and squish it into a dict, where each value is a list.
Only squishes string/int values; does "update" for dict keys
@@ -475,18 +476,14 @@ def list_of_dicts_to_dict_of_lists(list_of_dicts):
existing_value = squished.get(k, OrderedDict())
existing_value.update(v)
squished[k] = existing_value
- elif isinstance(v, list):
- squished[k] = set(squished.get(k, set())) | set(v)
else:
- squished[k] = list(squished.get(k, [])) + ensure_list(v)
+ squished[k] = squished.get(k, []) + ensure_list(v)
if k not in all_zip_keys:
- squished[k] = list(set(squished[k]))
+ squished[k] = list(OrderedDict.fromkeys(squished[k]))
# reduce the combinatoric space of the zipped keys, too:
if groups:
for group in groups:
- values = list(zip(*set(zip(*(squished[key] for key in group)))))
- for idx, key in enumerate(group):
- squished[key] = values[idx]
+ squished.update({key: value for (key, value) in zip(group, zip(*OrderedDict.fromkeys(zip(*[squished[key] for key in group]))))})
squished['zip_keys'] = zip_key_groups
return squished

--
2.27.0

Original file line number Diff line number Diff line change
@@ -1,31 +1,34 @@
_python:
- 3.7.* *_cpython
action:
- coverage
boost_cpp:
- 1.70.0
channel_sources:
- flatsurf,conda-forge,defaults
channel_targets:
- flatsurf main
component:
- intervalxt
cxx_compiler:
- gxx
cxx_compiler_version:
- '7'
docker_image:
- condaforge/linux-anvil-comp7
fmt:
- '6'
gmp:
- '6'
name:
- intervalxt
job:
- coverage
pin_run_as_build:
boost-cpp:
max_pin: x.x.x
gmp:
max_pin: x
python:
min_pin: x.x
max_pin: x.x
python:
- '3.6'
target:
- coverage
zip_keys:
- - target
- name
- - job
- action
- _python
- component
31 changes: 0 additions & 31 deletions .ci_support/linux_name_intervalxt_python_36_target_style.yaml

This file was deleted.

31 changes: 0 additions & 31 deletions .ci_support/linux_name_intervalxt_python_37_target_coverage.yaml

This file was deleted.

Loading

0 comments on commit 4d5b069

Please sign in to comment.