Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conda Build v3 revamp #1010

Open
wants to merge 17 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
139 changes: 139 additions & 0 deletions .azure-pipelines/azure-pipelines-linux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
jobs:
- job: linux
pool:
vmImage: ubuntu-16.04
timeoutInMinutes: 90
strategy:
maxParallel: 8
matrix:
# linux_python3.6:
# CONFIG: python3.6
# DOCKER_IMAGE: condaforge/linux-anvil-comp7
# EXCLUDE_JINJA: CUDA_STR
linux_python3.7:
CONFIG: python3.7
DOCKER_IMAGE: condaforge/linux-anvil-comp7
EXCLUDE_JINJA: CUDA_STR
# linux_python3.8:
# CONFIG: python3.8
# DOCKER_IMAGE: condaforge/linux-anvil-comp7
# EXCLUDE_JINJA: CUDA_STR

# linux_python3.6_cuda8.0:
# CONFIG: python3.6_cuda8.0
# DOCKER_IMAGE: "omniamd/linux-anvil-cuda:8.0"
# INCLUDE_JINJA: CUDA_STR
# linux_python3.6_cuda9.0:
# CONFIG: python3.6_cuda9.0
# DOCKER_IMAGE: "omniamd/linux-anvil-cuda:9.0"
# INCLUDE_JINJA: CUDA_STR
# linux_python3.6_cuda9.1:
# CONFIG: python3.6_cuda9.1
# DOCKER_IMAGE: "omniamd/linux-anvil-cuda:9.1"
# INCLUDE_JINJA: CUDA_STR
# linux_python3.6_cuda9.2:
# CONFIG: python3.6_cuda9.2
# DOCKER_IMAGE: "omniamd/linux-anvil-cuda:9.2"
# INCLUDE_JINJA: CUDA_STR
# linux_python3.6_cuda10.0:
# CONFIG: python3.6_cuda10.0
# DOCKER_IMAGE: "omniamd/linux-anvil-cuda:10.0"
# INCLUDE_JINJA: CUDA_STR
# linux_python3.6_cuda10.1:
# CONFIG: python3.6_cuda10.1
# DOCKER_IMAGE: "omniamd/linux-anvil-cuda:10.1"
# INCLUDE_JINJA: CUDA_STR
# linux_python3.6_cuda10.2:
# CONFIG: python3.6_cuda10.2
# DOCKER_IMAGE: "omniamd/linux-anvil-cuda:10.2"
# INCLUDE_JINJA: CUDA_STR

# linux_python3.7_cuda8.0:
# CONFIG: python3.7_cuda8.0
# DOCKER_IMAGE: "omniamd/linux-anvil-cuda:8.0"
# INCLUDE_JINJA: CUDA_STR
# linux_python3.7_cuda9.0:
# CONFIG: python3.7_cuda9.0
# DOCKER_IMAGE: "omniamd/linux-anvil-cuda:9.0"
# INCLUDE_JINJA: CUDA_STR
# linux_python3.7_cuda9.1:
# CONFIG: python3.7_cuda9.1
# DOCKER_IMAGE: "omniamd/linux-anvil-cuda:9.1"
# INCLUDE_JINJA: CUDA_STR
# linux_python3.7_cuda9.2:
# CONFIG: python3.7_cuda9.2
# DOCKER_IMAGE: "omniamd/linux-anvil-cuda:9.2"
# INCLUDE_JINJA: CUDA_STR
# linux_python3.7_cuda10.0:
# CONFIG: python3.7_cuda10.0
# DOCKER_IMAGE: "omniamd/linux-anvil-cuda:10.0"
# INCLUDE_JINJA: CUDA_STR
# linux_python3.7_cuda10.1:
# CONFIG: python3.7_cuda10.1
# DOCKER_IMAGE: "omniamd/linux-anvil-cuda:10.1"
# INCLUDE_JINJA: CUDA_STR
# linux_python3.7_cuda10.2:
# CONFIG: python3.7_cuda10.2
# DOCKER_IMAGE: "omniamd/linux-anvil-cuda:10.2"
# INCLUDE_JINJA: CUDA_STR

# linux_python3.8_cuda8.0:
# CONFIG: python3.8_cuda8.0
# DOCKER_IMAGE: "omniamd/linux-anvil-cuda:8.0"
# INCLUDE_JINJA: CUDA_STR
# linux_python3.8_cuda9.0:
# CONFIG: python3.8_cuda9.0
# DOCKER_IMAGE: "omniamd/linux-anvil-cuda:9.0"
# INCLUDE_JINJA: CUDA_STR
# linux_python3.8_cuda9.1:
# CONFIG: python3.8_cuda9.1
# DOCKER_IMAGE: "omniamd/linux-anvil-cuda:9.1"
# INCLUDE_JINJA: CUDA_STR
# linux_python3.8_cuda9.2:
# CONFIG: python3.8_cuda9.2
# DOCKER_IMAGE: "omniamd/linux-anvil-cuda:9.2"
# INCLUDE_JINJA: CUDA_STR
# linux_python3.8_cuda10.0:
# CONFIG: python3.8_cuda10.0
# DOCKER_IMAGE: "omniamd/linux-anvil-cuda:10.0"
# INCLUDE_JINJA: CUDA_STR
# linux_python3.8_cuda10.1:
# CONFIG: python3.8_cuda10.1
# DOCKER_IMAGE: "omniamd/linux-anvil-cuda:10.1"
# INCLUDE_JINJA: CUDA_STR
# linux_python3.8_cuda10.2:
# CONFIG: python3.8_cuda10.2
# DOCKER_IMAGE: "omniamd/linux-anvil-cuda:10.2"
# INCLUDE_JINJA: CUDA_STR

steps:
- script: |
echo "##vso[task.setvariable variable=NIGHTLY]true"
condition: eq(variables['Build.Reason'], 'Schedule')
displayName: Set dev trigger if scheduled

- script: |
CBA_FLAGS="-vvv --force --rebuild"
if [ -n "$INCLUDE_JINJA" ]; then
CBA_FLAGS="$CBA_FLAGS --build-only-jinja $INCLUDE_JINJA"
fi
if [ -n "$EXCLUDE_JINJA" ]; then
CBA_FLAGS="$CBA_FLAGS --no-build-jinja $EXCLUDE_JINJA"
fi
if [ ! -z "$NIGHTLY" ]; then
CBA_FLAGS="$CBA_FLAGS --scheduled-only"
fi
echo "##vso[task.setvariable variable=CBA_FLAGS]$CBA_FLAGS"
displayName: Assemble Variables

- script: |
DOCKER_FLAGS="--rm"
DOCKER_DIRS="-v `pwd`:/io"
DOCKER_DIRS="$DOCKER_DIRS -v `pwd`/.conda_configs:/conda_configs"
DOCKER_VARS="-e CBA_FLAGS -e CONFIG -e BINSTAR_TOKEN -e NIGHTLY"
DOCKER_COMMAND="bash /io/devtools/docker-build.sh"
docker run ${DOCKER_FLAGS} ${DOCKER_DIRS} ${DOCKER_VARS} ${DOCKER_IMAGE} ${DOCKER_COMMAND}
displayName: Run Docker Build
env:
BINSTAR_TOKEN: $(BINSTAR_TOKEN)

70 changes: 70 additions & 0 deletions .azure-pipelines/azure-pipelines-osx.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
jobs:
- job: osx
pool:
vmImage: macOS-10.13
timeoutInMinutes: 90
strategy:
maxParallel: 8
matrix:
# osx_python3.6:
# CONFIG: python3.6
# # EXCLUDE_JINJA: CUDA_STR
osx_python3.7:
CONFIG: python3.7
# EXCLUDE_JINJA: CUDA_STR
# osx_python3.8:
# CONFIG: python3.8
# # EXCLUDE_JINJA: CUDA_STR

steps:
- script: |
echo "##vso[task.setvariable variable=NIGHTLY]true"
condition: eq(variables['Build.Reason'], 'Schedule')
displayName: Set dev trigger if scheduled

- bash: |
echo "##vso[task.prependpath]$CONDA/bin"
sudo chown -R $USER $CONDA
displayName: Add conda to PATH

- script: |
source activate base
conda install -n base -c conda-forge --quiet --yes conda-build conda anaconda-client
conda update --yes --quiet -c conda-forge -c defaults --all
displayName: Add and update conda-forge

- script: |
CBA_FLAGS="-vvv --force --rebuild"
if [ -n "$INCLUDE_JINJA" ]; then
CBA_FLAGS="$CBA_FLAGS --build-only-jinja $INCLUDE_JINJA"
fi
if [ -n "$EXCLUDE_JINJA" ]; then
CBA_FLAGS="$CBA_FLAGS --no-build-jinja $EXCLUDE_JINJA"
fi
if [ ! -z "$NIGHTLY" ]; then
CBA_FLAGS="$CBA_FLAGS --scheduled-only"
fi
export CBA_FLAGS=$CBA_FLAGS
echo "##vso[task.setvariable variable=CBA_FLAGS]$CBA_FLAGS"
displayName: Assemble Variables

- script: |
source activate base
conda config --add channels omnia
conda config --add channels conda-forge

conda config --set show_channel_urls true
conda config --set auto_update_conda false
conda config --set add_pip_as_python_dependency false

conda info
conda config --show-sources
conda list --show-channel-urls

chmod +x $(Build.SourcesDirectory)/conda-build-all

which python
python $(Build.SourcesDirectory)/conda-build-all $CBA_FLAGS -m $(Build.SourcesDirectory)/.conda_configs/$(CONFIG).yaml -- $(Build.SourcesDirectory)/recipes/*/
displayName: Run Conda Build
env:
BINSTAR_TOKEN: $(BINSTAR_TOKEN)
Loading