Skip to content

Commit

Permalink
Merge pull request conda-forge#2 from pkgw/platforms
Browse files Browse the repository at this point in the history
See if we can just add aarch64 and ppc64le
  • Loading branch information
jjhelmus authored Jul 15, 2019
2 parents 8b861de + 61e05cb commit 4a9cad0
Show file tree
Hide file tree
Showing 23 changed files with 341 additions and 211 deletions.
39 changes: 39 additions & 0 deletions .azure-pipelines/azure-pipelines-linux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# This file was generated automatically from conda-smithy. To update this configuration,
# update the conda-forge.yml and/or the recipe/meta.yaml.
# -*- mode: yaml -*-

jobs:
- job: linux
pool:
vmImage: ubuntu-16.04
timeoutInMinutes: 360
strategy:
maxParallel: 8
matrix:
linux_:
CONFIG: linux_
UPLOAD_PACKAGES: True
DOCKER_IMAGE: condaforge/linux-anvil-comp7
linux_aarch64_:
CONFIG: linux_aarch64_
UPLOAD_PACKAGES: True
DOCKER_IMAGE: condaforge/linux-anvil-aarch64
linux_ppc64le_:
CONFIG: linux_ppc64le_
UPLOAD_PACKAGES: True
DOCKER_IMAGE: condaforge/linux-anvil-ppc64le
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
- script: |
export CI=azure
.azure-pipelines/run_docker_build.sh
displayName: Run docker build
env:
BINSTAR_TOKEN: $(BINSTAR_TOKEN)
75 changes: 75 additions & 0 deletions .azure-pipelines/azure-pipelines-osx.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
# This file was generated automatically from conda-smithy. To update this configuration,
# update the conda-forge.yml and/or the recipe/meta.yaml.
# -*- mode: yaml -*-

jobs:
- job: osx
pool:
vmImage: macOS-10.13
timeoutInMinutes: 360
strategy:
maxParallel: 8
matrix:
osx_:
CONFIG: osx_
UPLOAD_PACKAGES: True

steps:
# TODO: Fast finish on azure pipelines?
- script: |
echo "Fast Finish"
- script: |
echo "Removing homebrew from Azure to avoid conflicts."
curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall > ~/uninstall_homebrew
chmod +x ~/uninstall_homebrew
~/uninstall_homebrew -fq
rm ~/uninstall_homebrew
displayName: Remove homebrew
- 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-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: {
OSX_FORCE_SDK_DOWNLOAD: "1"
}
displayName: Configure conda and conda-build
- script: |
source activate base
mangle_compiler ./ ./recipe ./.ci_support/${CONFIG}.yaml
displayName: Mangle compiler
- script: |
source activate base
make_build_number ./ ./recipe ./.ci_support/${CONFIG}.yaml
displayName: Generate build number clobber file
- script: |
source activate base
conda build ./recipe -m ./.ci_support/${CONFIG}.yaml --clobber-file ./.ci_support/clobber_${CONFIG}.yaml
displayName: Build recipe
- script: |
source activate base
upload_package ./ ./recipe ./.ci_support/${CONFIG}.yaml
displayName: Upload recipe
env:
BINSTAR_TOKEN: $(BINSTAR_TOKEN)
condition: not(eq(variables['UPLOAD_PACKAGES'], 'False'))
21 changes: 10 additions & 11 deletions .circleci/build_steps.sh → .azure-pipelines/build_steps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,34 +7,33 @@

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

conda install --yes --quiet conda-forge::conda-forge-ci-setup=2 conda-build
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}"

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

source run_conda_forge_build_setup

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

conda build "${RECIPE_ROOT}" -m "${CI_SUPPORT}/${CONFIG}.yaml" \
--clobber-file "${CI_SUPPORT}/clobber_${CONFIG}.yaml" --quiet
--clobber-file "${CI_SUPPORT}/clobber_${CONFIG}.yaml"

upload_package "${FEEDSTOCK_ROOT}" "${RECIPE_ROOT}" "${CONFIG_FILE}"
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}"
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@
# changes to this script, consider a proposal to conda-smithy so that other feedstocks can also
# benefit from the improvement.

set -xeuo pipefail
set -xeo pipefail

THISDIR="$( cd "$( dirname "$0" )" >/dev/null && pwd )"
PROVIDER_DIR="$(basename $THISDIR)"

FEEDSTOCK_ROOT=$(cd "$(dirname "$0")/.."; pwd;)
RECIPE_ROOT="${FEEDSTOCK_ROOT}/recipe"
Expand All @@ -25,26 +28,46 @@ fi
ARTIFACTS="$FEEDSTOCK_ROOT/build_artifacts"

if [ -z "$CONFIG" ]; then
echo "Need to set CONFIG env variable"
set +x
FILES=`ls .ci_support/linux_*`
CONFIGS=""
for file in $FILES; do
CONFIGS="${CONFIGS}'${file:12:-5}' or ";
done
echo "Need to set CONFIG env variable. Value can be one of ${CONFIGS:0:-4}"
exit 1
fi

pip install shyaml
DOCKER_IMAGE=$(cat "${FEEDSTOCK_ROOT}/.ci_support/${CONFIG}.yaml" | shyaml get-value docker_image.0 condaforge/linux-anvil )
if [ -z "${DOCKER_IMAGE}" ]; then
SHYAML_INSTALLED="$(shyaml --version || echo NO)"
if [ "${SHYAML_INSTALLED}" == "NO" ]; then
echo "WARNING: DOCKER_IMAGE variable not set and shyaml not installed. Falling back to condaforge/linux-anvil-comp7"
DOCKER_IMAGE="condaforge/linux-anvil-comp7"
else
DOCKER_IMAGE="$(cat "${FEEDSTOCK_ROOT}/.ci_support/${CONFIG}.yaml" | shyaml get-value docker_image.0 condaforge/linux-anvil-comp7 )"
fi
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 \
if [ -z "${CI}" ]; then
DOCKER_RUN_ARGS="-it "
fi

export UPLOAD_PACKAGES="${UPLOAD_PACKAGES:-True}"
docker run ${DOCKER_RUN_ARGS} \
-v "${RECIPE_ROOT}":/home/conda/recipe_root:ro,z \
-v "${FEEDSTOCK_ROOT}":/home/conda/feedstock_root:rw,z \
-e CONFIG \
-e BINSTAR_TOKEN \
-e HOST_USER_ID \
-e UPLOAD_PACKAGES \
-e CI \
$DOCKER_IMAGE \
bash \
/home/conda/feedstock_root/.circleci/build_steps.sh
/home/conda/feedstock_root/${PROVIDER_DIR}/build_steps.sh

# verify that the end of the script was reached
test -f "$DONE_CANARY"
10 changes: 10 additions & 0 deletions .ci_support/linux_.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
c_compiler:
- gcc
c_compiler_version:
- '7'
channel_sources:
- conda-forge,defaults
channel_targets:
- conda-forge main
docker_image:
- condaforge/linux-anvil-comp7
16 changes: 16 additions & 0 deletions .ci_support/linux_aarch64_.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
BUILD:
- aarch64-conda_cos7-linux-gnu
c_compiler:
- gcc
c_compiler_version:
- '7'
cdt_arch:
- aarch64
cdt_name:
- cos7
channel_sources:
- conda-forge,c4aarch64,defaults
channel_targets:
- conda-forge main
docker_image:
- condaforge/linux-anvil-aarch64
16 changes: 0 additions & 16 deletions .ci_support/linux_c_compilergcc.yaml

This file was deleted.

16 changes: 0 additions & 16 deletions .ci_support/linux_c_compilertoolchain_c.yaml

This file was deleted.

10 changes: 10 additions & 0 deletions .ci_support/linux_ppc64le_.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
c_compiler:
- gcc
c_compiler_version:
- '8'
channel_sources:
- conda-forge,defaults
channel_targets:
- conda-forge main
docker_image:
- condaforge/linux-anvil-ppc64le
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
MACOSX_DEPLOYMENT_TARGET:
- '10.9'
build_number_decrement:
- '1000'
c_compiler:
- toolchain_c
- clang
c_compiler_version:
- '4'
channel_sources:
- conda-forge,defaults
channel_targets:
Expand All @@ -12,8 +12,3 @@ macos_machine:
- x86_64-apple-darwin13.4.0
macos_min_version:
- '10.9'
zip_keys:
- - c_compiler
- channel_sources
- channel_targets
- build_number_decrement
19 changes: 0 additions & 19 deletions .ci_support/osx_c_compilerclang.yaml

This file was deleted.

27 changes: 0 additions & 27 deletions .circleci/checkout_merge_commit.sh

This file was deleted.

Loading

0 comments on commit 4a9cad0

Please sign in to comment.