diff options
author | Ryan Volz <ryan.volz@gmail.com> | 2021-09-30 18:17:13 -0400 |
---|---|---|
committer | mormj <34754695+mormj@users.noreply.github.com> | 2021-10-25 15:21:48 -0400 |
commit | 40fd4cca9b3ca270b37c5fb654b29b8649c1f75d (patch) | |
tree | 7707bbb8e74a7e552de6968e752849f57f8c7347 | |
parent | 04a6a91b001393d2d29707817480ab3cb4d533d8 (diff) |
MNT: Re-rendered with conda-build 3.21.4, conda-smithy 3.12.post.dev63, and conda-forge-pinning 2021.10.18.15.47.12
Signed-off-by: Ryan Volz <ryan.volz@gmail.com>
-rw-r--r-- | .ci_support/README | 1 | ||||
-rw-r--r-- | .ci_support/linux_64_numpy1.18python3.8.____cpython.yaml | 71 | ||||
-rw-r--r-- | .ci_support/osx_64_numpy1.18python3.8.____cpython.yaml | 67 | ||||
-rw-r--r-- | .ci_support/win_64_numpy1.18python3.8.____cpython.yaml | 49 | ||||
-rw-r--r-- | .github/workflows/conda-build.yml | 164 | ||||
-rwxr-xr-x | .scripts/build_steps.sh | 78 | ||||
-rwxr-xr-x | .scripts/create_conda_build_artifacts.sh | 113 | ||||
-rw-r--r-- | .scripts/logging_utils.sh | 35 | ||||
-rwxr-xr-x | .scripts/run_docker_build.sh | 102 | ||||
-rwxr-xr-x | .scripts/run_osx_build.sh | 66 |
10 files changed, 746 insertions, 0 deletions
diff --git a/.ci_support/README b/.ci_support/README new file mode 100644 index 0000000000..e4e2dcec93 --- /dev/null +++ b/.ci_support/README @@ -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.
\ No newline at end of file diff --git a/.ci_support/linux_64_numpy1.18python3.8.____cpython.yaml b/.ci_support/linux_64_numpy1.18python3.8.____cpython.yaml new file mode 100644 index 0000000000..93f754153e --- /dev/null +++ b/.ci_support/linux_64_numpy1.18python3.8.____cpython.yaml @@ -0,0 +1,71 @@ +alsa_lib: +- 1.2.3 +boost_cpp: +- 1.74.0 +c_compiler: +- gcc +c_compiler_version: +- '9' +cdt_name: +- cos6 +channel_sources: +- conda-forge +channel_targets: +- gnuradio main +cxx_compiler: +- gxx +cxx_compiler_version: +- '9' +docker_image: +- quay.io/condaforge/linux-anvil-comp7 +fftw: +- '3' +gmp: +- '6' +gsl: +- '2.6' +libcblas: +- 3.8 *netlib +libiio: +- '0.21' +libthrift: +- 0.15.0 +numpy: +- '1.18' +pin_run_as_build: + boost-cpp: + max_pin: x.x.x + fftw: + max_pin: x + gmp: + max_pin: x + python: + min_pin: x.x + max_pin: x.x + qt: + max_pin: x.x + zeromq: + max_pin: x.x +pybind11_abi: +- '4' +python: +- 3.8.* *_cpython +qt: +- '5.12' +soapysdr: +- '0.8' +target_platform: +- linux-64 +uhd: +- 4.1.0 +volk: +- '2.5' +zeromq: +- 4.3.4 +zip_keys: +- - c_compiler_version + - cxx_compiler_version +- - cdt_name + - docker_image +- - python + - numpy diff --git a/.ci_support/osx_64_numpy1.18python3.8.____cpython.yaml b/.ci_support/osx_64_numpy1.18python3.8.____cpython.yaml new file mode 100644 index 0000000000..5713d1df52 --- /dev/null +++ b/.ci_support/osx_64_numpy1.18python3.8.____cpython.yaml @@ -0,0 +1,67 @@ +MACOSX_DEPLOYMENT_TARGET: +- '10.15' +MACOSX_SDK_VERSION: +- '10.15' +boost_cpp: +- 1.74.0 +c_compiler: +- clang +c_compiler_version: +- '11' +channel_sources: +- conda-forge +channel_targets: +- gnuradio main +cxx_compiler: +- clangxx +cxx_compiler_version: +- '11' +fftw: +- '3' +gmp: +- '6' +gsl: +- '2.6' +libiio: +- '0.21' +libthrift: +- 0.15.0 +macos_machine: +- x86_64-apple-darwin13.4.0 +numpy: +- '1.18' +pin_run_as_build: + boost-cpp: + max_pin: x.x.x + fftw: + max_pin: x + gmp: + max_pin: x + python: + min_pin: x.x + max_pin: x.x + qt: + max_pin: x.x + zeromq: + max_pin: x.x +pybind11_abi: +- '4' +python: +- 3.8.* *_cpython +qt: +- '5.12' +soapysdr: +- '0.8' +target_platform: +- osx-64 +uhd: +- 4.1.0 +volk: +- '2.5' +zeromq: +- 4.3.4 +zip_keys: +- - c_compiler_version + - cxx_compiler_version +- - python + - numpy diff --git a/.ci_support/win_64_numpy1.18python3.8.____cpython.yaml b/.ci_support/win_64_numpy1.18python3.8.____cpython.yaml new file mode 100644 index 0000000000..9aae25a37b --- /dev/null +++ b/.ci_support/win_64_numpy1.18python3.8.____cpython.yaml @@ -0,0 +1,49 @@ +boost_cpp: +- 1.74.0 +c_compiler: +- vs2017 +channel_sources: +- conda-forge +channel_targets: +- gnuradio main +cxx_compiler: +- vs2017 +fftw: +- '3' +gsl: +- '2.6' +libiio: +- '0.21' +numpy: +- '1.18' +pin_run_as_build: + boost-cpp: + max_pin: x.x.x + fftw: + max_pin: x + python: + min_pin: x.x + max_pin: x.x + qt: + max_pin: x.x + zeromq: + max_pin: x.x.x +pybind11_abi: +- '4' +python: +- 3.8.* *_cpython +qt: +- '5.12' +soapysdr: +- '0.8' +target_platform: +- win-64 +uhd: +- 4.1.0 +volk: +- '2.5' +zeromq: +- 4.3.4 +zip_keys: +- - python + - numpy diff --git a/.github/workflows/conda-build.yml b/.github/workflows/conda-build.yml new file mode 100644 index 0000000000..5ce86059b4 --- /dev/null +++ b/.github/workflows/conda-build.yml @@ -0,0 +1,164 @@ +# 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 -*- + +name: Build conda package +on: [push, pull_request] + +jobs: + build: + name: ${{ matrix.CONFIG }} + runs-on: ${{ matrix.os }}-latest + strategy: + fail-fast: false + matrix: + include: + - CONFIG: linux_64_numpy1.18python3.8.____cpython + SHORT_CONFIG: linux_64_numpy1.18python3.8.____cpython + UPLOAD_PACKAGES: True + DOCKER_IMAGE: quay.io/condaforge/linux-anvil-comp7 + os: ubuntu + - CONFIG: win_64_numpy1.18python3.8.____cpython + SHORT_CONFIG: win_64_numpy1.18python3.8.____cpython + UPLOAD_PACKAGES: True + os: windows + - CONFIG: osx_64_numpy1.18python3.8.____cpython + SHORT_CONFIG: osx_64_numpy1.18python3.8.____cpython + UPLOAD_PACKAGES: True + os: macos + steps: + - name: Checkout code + uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: Build on Linux + if: matrix.os == 'ubuntu' + env: + CONFIG: ${{ matrix.CONFIG }} + UPLOAD_PACKAGES: ${{ matrix.UPLOAD_PACKAGES }} + DOCKERIMAGE: ${{ matrix.DOCKERIMAGE }} + CI: github_actions + UPLOAD_ON_BRANCH: master + BINSTAR_TOKEN: ${{ secrets.BINSTAR_TOKEN }} + shell: bash + run: | + echo "::group::Configure binfmt_misc" + docker run --rm --privileged multiarch/qemu-user-static:register --reset --credential yes + export FEEDSTOCK_NAME="$(basename $GITHUB_REPOSITORY)" + export GIT_BRANCH="$(basename $GITHUB_REF)" + if [[ "${GITHUB_EVENT_NAME}" == "pull_request" ]]; then + export IS_PR_BUILD="True" + else + export IS_PR_BUILD="False" + fi + echo "::endgroup::" + ./.scripts/run_docker_build.sh + + - name: Build on macOS + if: matrix.os == 'macos' + env: + CONFIG: ${{ matrix.CONFIG }} + UPLOAD_PACKAGES: ${{ matrix.UPLOAD_PACKAGES }} + CI: github_actions + UPLOAD_ON_BRANCH: master + BINSTAR_TOKEN: ${{ secrets.BINSTAR_TOKEN }} + shell: bash + run: | + export FEEDSTOCK_NAME="$(basename $GITHUB_REPOSITORY)" + export GIT_BRANCH="$(basename $GITHUB_REF)" + if [[ "${GITHUB_EVENT_NAME}" == "pull_request" ]]; then + export IS_PR_BUILD="True" + else + export IS_PR_BUILD="False" + fi + ./.scripts/run_osx_build.sh + + - name: Install Miniconda for windows + uses: conda-incubator/setup-miniconda@v2 + with: + miniconda-version: latest + if: matrix.os == 'windows' + + - name: Build on windows + shell: cmd + run: | + call activate base + conda.exe install -c conda-forge 'python=3.6' conda-build conda "conda-forge-ci-setup=3" pip boa + if errorlevel 1 exit 1 + setup_conda_rc .\ ".\.packaging/conda_recipe" .\.ci_support\%CONFIG%.yaml + if errorlevel 1 exit 1 + + conda.exe mambabuild ".packaging/conda_recipe" -m .ci_support\%CONFIG%.yaml + if errorlevel 1 exit 1 + set "FEEDSTOCK_NAME=%GITHUB_REPOSITORY:*/=%" + set "GIT_BRANCH=%GITHUB_REF:refs/heads/=%" + if /i "%GITHUB_EVENT_NAME%" == "pull_request" ( + set "IS_PR_BUILD=True" + ) else ( + set "IS_PR_BUILD=False" + ) + if /i "%UPLOAD_PACKAGES%" == "true" ( + if /i "%IS_PR_BUILD%" == "false" ( + upload_package .\ ".\.packaging/conda_recipe" .ci_support\%CONFIG%.yaml + ) + ) + env: + PYTHONUNBUFFERED: 1 + CONFIG: ${{ matrix.CONFIG }} + CI: github_actions + UPLOAD_PACKAGES: ${{ matrix.UPLOAD_PACKAGES }} + UPLOAD_ON_BRANCH: master + BINSTAR_TOKEN: ${{ secrets.BINSTAR_TOKEN }} + if: matrix.os == 'windows' + - name: Prepare conda build artifacts + id: prepare-artifacts + shell: bash + if: ${{ always() }} + env: + CONFIG: ${{ matrix.CONFIG }} + SHORT_CONFIG: ${{ matrix.SHORT_CONFIG }} + OS: ${{ matrix.os }} + run: | + export CI=github_actions + export CI_RUN_ID=$GITHUB_RUN_ID + export FEEDSTOCK_NAME="$(basename $GITHUB_REPOSITORY)" + export ARTIFACT_STAGING_DIR="$GITHUB_WORKSPACE" + if [ $OS == "macos" ]; then + export CONDA_BLD_DIR="${MINIFORGE_HOME:-${HOME}/miniforge3}/conda-bld" + elif [ $OS == "windows" ]; then + export CONDA_BLD_DIR="${CONDA//\\//}/conda-bld" + else + export CONDA_BLD_DIR="build_artifacts" + fi + # Archive everything in CONDA_BLD_DIR except environments + # Archive the CONDA_BLD_DIR environments only when the job fails + # Use different prefix for successful and failed build artifacts + # so random failures don't prevent rebuilds from creating artifacts. + JOB_STATUS="${{ job.status }}" + if [ $JOB_STATUS == "failure" ]; then + export BLD_ARTIFACT_PREFIX="conda_artifacts" + export ENV_ARTIFACT_PREFIX="conda_envs" + else + export BLD_ARTIFACT_PREFIX="conda_pkgs" + fi + ./.scripts/create_conda_build_artifacts.sh + continue-on-error: true + + - name: Store conda build artifacts + uses: actions/upload-artifact@v2 + if: ${{ always() && steps.prepare-artifacts.outcome == 'success' }} + with: + name: ${{ steps.prepare-artifacts.outputs.BLD_ARTIFACT_NAME }} + path: ${{ steps.prepare-artifacts.outputs.BLD_ARTIFACT_PATH }} + retention-days: 14 + continue-on-error: true + + - name: Store conda build environment artifacts + uses: actions/upload-artifact@v2 + if: ${{ failure() && steps.prepare-artifacts.outcome == 'success' }} + with: + name: ${{ steps.prepare-artifacts.outputs.ENV_ARTIFACT_NAME }} + path: ${{ steps.prepare-artifacts.outputs.ENV_ARTIFACT_PATH }} + retention-days: 14 + continue-on-error: true
\ No newline at end of file diff --git a/.scripts/build_steps.sh b/.scripts/build_steps.sh new file mode 100755 index 0000000000..3df2ed0cf5 --- /dev/null +++ b/.scripts/build_steps.sh @@ -0,0 +1,78 @@ +#!/usr/bin/env bash + +# PLEASE NOTE: This script has been automatically generated by conda-smithy. Any changes here +# will be lost next time ``conda smithy rerender`` is run. If you would like to make permanent +# changes to this script, consider a proposal to conda-smithy so that other feedstocks can also +# benefit from the improvement. + +set -xeuo pipefail +export FEEDSTOCK_ROOT="${FEEDSTOCK_ROOT:-/home/conda/feedstock_root}" +source ${FEEDSTOCK_ROOT}/.scripts/logging_utils.sh + + +( endgroup "Start Docker" ) 2> /dev/null + +( startgroup "Configuring conda" ) 2> /dev/null + +export PYTHONUNBUFFERED=1 +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: ${FEEDSTOCK_ROOT}/build_artifacts + +CONDARC +GET_BOA=boa +BUILD_CMD=mambabuild + +conda install --yes --quiet "conda-forge-ci-setup=3" conda-build pip ${GET_BOA:-} -c conda-forge + +# set up the condarc +setup_conda_rc "${FEEDSTOCK_ROOT}" "${RECIPE_ROOT}" "${CONFIG_FILE}" + +source run_conda_forge_build_setup + + +# Install the yum requirements defined canonically in the +# "recipe/yum_requirements.txt" file. After updating that file, +# run "conda smithy rerender" and this line will be updated +# automatically. +/usr/bin/sudo -n yum install -y mesa-libGL mesa-dri-drivers libselinux libudev libX11 libXcomposite libXcursor libXdamage libXext libXfixes libXi libXinerama libXrandr libXxf86vm + + +# make the build number clobber +make_build_number "${FEEDSTOCK_ROOT}" "${RECIPE_ROOT}" "${CONFIG_FILE}" + + +( endgroup "Configuring conda" ) 2> /dev/null + +if [[ "${BUILD_WITH_CONDA_DEBUG:-0}" == 1 ]]; then + if [[ "x${BUILD_OUTPUT_ID:-}" != "x" ]]; then + EXTRA_CB_OPTIONS="${EXTRA_CB_OPTIONS:-} --output-id ${BUILD_OUTPUT_ID}" + fi + conda debug "${RECIPE_ROOT}" -m "${CI_SUPPORT}/${CONFIG}.yaml" \ + ${EXTRA_CB_OPTIONS:-} \ + --clobber-file "${CI_SUPPORT}/clobber_${CONFIG}.yaml" + + # Drop into an interactive shell + /bin/bash +else + conda $BUILD_CMD "${RECIPE_ROOT}" -m "${CI_SUPPORT}/${CONFIG}.yaml" \ + --suppress-variables ${EXTRA_CB_OPTIONS:-} \ + --clobber-file "${CI_SUPPORT}/clobber_${CONFIG}.yaml" + + ( startgroup "Uploading packages" ) 2> /dev/null + + if [[ "${UPLOAD_PACKAGES}" != "False" ]] && [[ "${IS_PR_BUILD}" == "False" ]]; then + upload_package "${FEEDSTOCK_ROOT}" "${RECIPE_ROOT}" "${CONFIG_FILE}" + fi + + ( endgroup "Uploading packages" ) 2> /dev/null +fi + +( startgroup "Final checks" ) 2> /dev/null + +touch "${FEEDSTOCK_ROOT}/build_artifacts/conda-forge-build-done-${CONFIG}"
\ No newline at end of file diff --git a/.scripts/create_conda_build_artifacts.sh b/.scripts/create_conda_build_artifacts.sh new file mode 100755 index 0000000000..cba0faeea9 --- /dev/null +++ b/.scripts/create_conda_build_artifacts.sh @@ -0,0 +1,113 @@ +#!/usr/bin/env bash + +# INPUTS (environment variables that need to be set before calling this script): +# +# CI (azure/github_actions/UNSET) +# CI_RUN_ID (unique identifier for the CI job run) +# FEEDSTOCK_NAME +# CONFIG (build matrix configuration string) +# SHORT_CONFIG (uniquely-shortened configuration string) +# CONDA_BLD_DIR (path to the conda-bld directory) +# ARTIFACT_STAGING_DIR (use working directory if unset) +# BLD_ARTIFACT_PREFIX (prefix for the conda build artifact name, skip if unset) +# ENV_ARTIFACT_PREFIX (prefix for the conda build environments artifact name, skip if unset) + +# OUTPUTS +# +# BLD_ARTIFACT_NAME +# BLD_ARTIFACT_PATH +# ENV_ARTIFACT_NAME +# ENV_ARTIFACT_PATH + +source .scripts/logging_utils.sh + +# DON'T do set -x, because it results in double echo-ing pipeline commands +# and that might end up inserting extraneous quotation marks in output variables +set -e + +# Check that the conda-build directory exists +if [ ! -d "$CONDA_BLD_DIR" ]; then + echo "conda-build directory does not exist" + exit 1 +fi + +# Set staging dir to the working dir, in Windows style if applicable +if [[ -z "${ARTIFACT_STAGING_DIR}" ]]; then + if pwd -W; then + ARTIFACT_STAGING_DIR=$(pwd -W) + else + ARTIFACT_STAGING_DIR=$PWD + fi +fi +echo "ARTIFACT_STAGING_DIR: $ARTIFACT_STAGING_DIR" + +FEEDSTOCK_ROOT=$(cd "$(dirname "$0")/.."; pwd;) +if [ -z ${FEEDSTOCK_NAME} ]; then + export FEEDSTOCK_NAME=$(basename ${FEEDSTOCK_ROOT}) +fi + +# Set a unique ID for the artifact(s), specialized for this particular job run +ARTIFACT_UNIQUE_ID="${CI_RUN_ID}_${CONFIG}" +if [[ ${#ARTIFACT_UNIQUE_ID} -gt 80 ]]; then + ARTIFACT_UNIQUE_ID="${CI_RUN_ID}_${SHORT_CONFIG}" +fi +echo "ARTIFACT_UNIQUE_ID: $ARTIFACT_UNIQUE_ID" + +# Set a descriptive ID for the archive(s), specialized for this particular job run +ARCHIVE_UNIQUE_ID="${CI_RUN_ID}_${CONFIG}" + +# Make the build artifact zip +if [[ ! -z "$BLD_ARTIFACT_PREFIX" ]]; then + export BLD_ARTIFACT_NAME="${BLD_ARTIFACT_PREFIX}_${ARTIFACT_UNIQUE_ID}" + export BLD_ARTIFACT_PATH="${ARTIFACT_STAGING_DIR}/${FEEDSTOCK_NAME}_${BLD_ARTIFACT_PREFIX}_${ARCHIVE_UNIQUE_ID}.zip" + + ( startgroup "Archive conda build directory" ) 2> /dev/null + + # Try 7z and fall back to zip if it fails (for cross-platform use) + if ! 7z a "$BLD_ARTIFACT_PATH" "$CONDA_BLD_DIR" '-xr!.git/' '-xr!_*_env*/' '-xr!*_cache/' -bb; then + pushd "$CONDA_BLD_DIR" + zip -r -y -T "$BLD_ARTIFACT_PATH" . -x '*.git/*' '*_*_env*/*' '*_cache/*' + popd + fi + + ( endgroup "Archive conda build directory" ) 2> /dev/null + + echo "BLD_ARTIFACT_NAME: $BLD_ARTIFACT_NAME" + echo "BLD_ARTIFACT_PATH: $BLD_ARTIFACT_PATH" + + if [[ "$CI" == "azure" ]]; then + echo "##vso[task.setVariable variable=BLD_ARTIFACT_NAME]$BLD_ARTIFACT_NAME" + echo "##vso[task.setVariable variable=BLD_ARTIFACT_PATH]$BLD_ARTIFACT_PATH" + elif [[ "$CI" == "github_actions" ]]; then + echo "::set-output name=BLD_ARTIFACT_NAME::$BLD_ARTIFACT_NAME" + echo "::set-output name=BLD_ARTIFACT_PATH::$BLD_ARTIFACT_PATH" + fi +fi + +# Make the environments artifact zip +if [[ ! -z "$ENV_ARTIFACT_PREFIX" ]]; then + export ENV_ARTIFACT_NAME="${ENV_ARTIFACT_PREFIX}_${ARTIFACT_UNIQUE_ID}" + export ENV_ARTIFACT_PATH="${ARTIFACT_STAGING_DIR}/${FEEDSTOCK_NAME}_${ENV_ARTIFACT_PREFIX}_${ARCHIVE_UNIQUE_ID}.zip" + + ( startgroup "Archive conda build environments" ) 2> /dev/null + + # Try 7z and fall back to zip if it fails (for cross-platform use) + if ! 7z a "$ENV_ARTIFACT_PATH" -r "$CONDA_BLD_DIR"/'_*_env*/' -bb; then + pushd "$CONDA_BLD_DIR" + zip -r -y -T "$ENV_ARTIFACT_PATH" . -i '*_*_env*/*' + popd + fi + + ( endgroup "Archive conda build environments" ) 2> /dev/null + + echo "ENV_ARTIFACT_NAME: $ENV_ARTIFACT_NAME" + echo "ENV_ARTIFACT_PATH: $ENV_ARTIFACT_PATH" + + if [[ "$CI" == "azure" ]]; then + echo "##vso[task.setVariable variable=ENV_ARTIFACT_NAME]$ENV_ARTIFACT_NAME" + echo "##vso[task.setVariable variable=ENV_ARTIFACT_PATH]$ENV_ARTIFACT_PATH" + elif [[ "$CI" == "github_actions" ]]; then + echo "::set-output name=ENV_ARTIFACT_NAME::$ENV_ARTIFACT_NAME" + echo "::set-output name=ENV_ARTIFACT_PATH::$ENV_ARTIFACT_PATH" + fi +fi
\ No newline at end of file diff --git a/.scripts/logging_utils.sh b/.scripts/logging_utils.sh new file mode 100644 index 0000000000..57bc95c242 --- /dev/null +++ b/.scripts/logging_utils.sh @@ -0,0 +1,35 @@ +#!/bin/bash + +# Provide a unified interface for the different logging +# utilities CI providers offer. If unavailable, provide +# a compatible fallback (e.g. bare `echo xxxxxx`). + +function startgroup { + # Start a foldable group of log lines + # Pass a single argument, quoted + case ${CI:-} in + azure ) + echo "##[group]$1";; + travis ) + echo "$1" + echo -en 'travis_fold:start:'"${1// /}"'\\r';; + github_actions ) + echo "::group::$1";; + * ) + echo "$1";; + esac +} 2> /dev/null + +function endgroup { + # End a foldable group of log lines + # Pass a single argument, quoted + + case ${CI:-} in + azure ) + echo "##[endgroup]";; + travis ) + echo -en 'travis_fold:end:'"${1// /}"'\\r';; + github_actions ) + echo "::endgroup::";; + esac +} 2> /dev/null diff --git a/.scripts/run_docker_build.sh b/.scripts/run_docker_build.sh new file mode 100755 index 0000000000..ffd4d97507 --- /dev/null +++ b/.scripts/run_docker_build.sh @@ -0,0 +1,102 @@ +#!/usr/bin/env bash + +# PLEASE NOTE: This script has been automatically generated by conda-smithy. Any changes here +# will be lost next time ``conda smithy rerender`` is run. If you would like to make permanent +# changes to this script, consider a proposal to conda-smithy so that other feedstocks can also +# benefit from the improvement. + +source .scripts/logging_utils.sh + +( startgroup "Configure Docker" ) 2> /dev/null + +set -xeo pipefail + +THISDIR="$( cd "$( dirname "$0" )" >/dev/null && pwd )" +PROVIDER_DIR="$(basename $THISDIR)" + +FEEDSTOCK_ROOT=$(cd "$(dirname "$0")/.."; pwd;) +RECIPE_ROOT="${FEEDSTOCK_ROOT}/.packaging/conda_recipe" + +if [ -z ${FEEDSTOCK_NAME} ]; then + export FEEDSTOCK_NAME=$(basename ${FEEDSTOCK_ROOT}) +fi + +docker info + +# In order for the conda-build process in the container to write to the mounted +# volumes, we need to run with the same id as the host machine, which is +# normally the owner of the mounted volumes, or at least has write permission +export HOST_USER_ID=$(id -u) +# Check if docker-machine is being used (normally on OSX) and get the uid from +# the VM +if hash docker-machine 2> /dev/null && docker-machine active > /dev/null; then + export HOST_USER_ID=$(docker-machine ssh $(docker-machine active) id -u) +fi + +ARTIFACTS="$FEEDSTOCK_ROOT/build_artifacts" + +if [ -z "$CONFIG" ]; then + 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 + +if [ -z "${DOCKER_IMAGE}" ]; then + SHYAML_INSTALLED="$(shyaml -h || echo NO)" + if [ "${SHYAML_INSTALLED}" == "NO" ]; then + echo "WARNING: DOCKER_IMAGE variable not set and shyaml not installed. Trying to parse with coreutils" + DOCKER_IMAGE=$(cat .ci_support/${CONFIG}.yaml | grep '^docker_image:$' -A 1 | tail -n 1 | cut -b 3-) + if [ "${DOCKER_IMAGE}" = "" ]; then + echo "No docker_image entry found in ${CONFIG}. Falling back to quay.io/condaforge/linux-anvil-comp7" + DOCKER_IMAGE="quay.io/condaforge/linux-anvil-comp7" + fi + else + DOCKER_IMAGE="$(cat "${FEEDSTOCK_ROOT}/.ci_support/${CONFIG}.yaml" | shyaml get-value docker_image.0 quay.io/condaforge/linux-anvil-comp7 )" + fi +fi + +mkdir -p "$ARTIFACTS" +DONE_CANARY="$ARTIFACTS/conda-forge-build-done-${CONFIG}" +rm -f "$DONE_CANARY" + +# Allow people to specify extra default arguments to `docker run` (e.g. `--rm`) +DOCKER_RUN_ARGS="${CONDA_FORGE_DOCKER_RUN_ARGS}" +if [ -z "${CI}" ]; then + DOCKER_RUN_ARGS="-it ${DOCKER_RUN_ARGS}" +fi + +( endgroup "Configure Docker" ) 2> /dev/null + +( startgroup "Start Docker" ) 2> /dev/null + +export UPLOAD_PACKAGES="${UPLOAD_PACKAGES:-True}" +export IS_PR_BUILD="${IS_PR_BUILD:-False}" +docker run ${DOCKER_RUN_ARGS} \ + -v "${RECIPE_ROOT}":/home/conda/recipe_root:rw,z,delegated \ + -v "${FEEDSTOCK_ROOT}":/home/conda/feedstock_root:rw,z,delegated \ + -e CONFIG \ + -e HOST_USER_ID \ + -e UPLOAD_PACKAGES \ + -e IS_PR_BUILD \ + -e GIT_BRANCH \ + -e UPLOAD_ON_BRANCH \ + -e CI \ + -e FEEDSTOCK_NAME \ + -e CPU_COUNT \ + -e BUILD_WITH_CONDA_DEBUG \ + -e BUILD_OUTPUT_ID \ + -e BINSTAR_TOKEN \ + $DOCKER_IMAGE \ + bash \ + /home/conda/feedstock_root/${PROVIDER_DIR}/build_steps.sh + +# verify that the end of the script was reached +test -f "$DONE_CANARY" + +# This closes the last group opened in `build_steps.sh` +( endgroup "Final checks" ) 2> /dev/null
\ No newline at end of file diff --git a/.scripts/run_osx_build.sh b/.scripts/run_osx_build.sh new file mode 100755 index 0000000000..b285526586 --- /dev/null +++ b/.scripts/run_osx_build.sh @@ -0,0 +1,66 @@ +#!/usr/bin/env bash + +source .scripts/logging_utils.sh + +set -xe + +MINIFORGE_HOME=${MINIFORGE_HOME:-${HOME}/miniforge3} + +( startgroup "Installing a fresh version of Miniforge" ) 2> /dev/null + +MINIFORGE_URL="https://github.com/conda-forge/miniforge/releases/latest/download" +MINIFORGE_FILE="Miniforge3-MacOSX-$(uname -m).sh" +curl -L -O "${MINIFORGE_URL}/${MINIFORGE_FILE}" +rm -rf ${MINIFORGE_HOME} +bash $MINIFORGE_FILE -b -p ${MINIFORGE_HOME} + +( endgroup "Installing a fresh version of Miniforge" ) 2> /dev/null + +( startgroup "Configuring conda" ) 2> /dev/null + +GET_BOA=boa +BUILD_CMD=mambabuild + +source ${MINIFORGE_HOME}/etc/profile.d/conda.sh +conda activate base + +echo -e "\n\nInstalling conda-forge-ci-setup=3 and conda-build." +conda install -n base --quiet --yes "conda-forge-ci-setup=3" conda-build pip ${GET_BOA:-} + + + +echo -e "\n\nSetting up the condarc and mangling the compiler." +setup_conda_rc ./ ./.packaging/conda_recipe ./.ci_support/${CONFIG}.yaml + +if [[ "${CI:-}" != "" ]]; then + mangle_compiler ./ ./.packaging/conda_recipe .ci_support/${CONFIG}.yaml +fi + +if [[ "${CI:-}" != "" ]]; then + echo -e "\n\nMangling homebrew in the CI to avoid conflicts." + /usr/bin/sudo mangle_homebrew + /usr/bin/sudo -k +else + echo -e "\n\nNot mangling homebrew as we are not running in CI" +fi + +echo -e "\n\nRunning the build setup script." +source run_conda_forge_build_setup + + + +( endgroup "Configuring conda" ) 2> /dev/null + + +echo -e "\n\nMaking the build clobber file" +make_build_number ./ ./.packaging/conda_recipe ./.ci_support/${CONFIG}.yaml + +conda $BUILD_CMD ./.packaging/conda_recipe -m ./.ci_support/${CONFIG}.yaml --suppress-variables --clobber-file ./.ci_support/clobber_${CONFIG}.yaml ${EXTRA_CB_OPTIONS:-} + +( startgroup "Uploading packages" ) 2> /dev/null + +if [[ "${UPLOAD_PACKAGES}" != "False" ]] && [[ "${IS_PR_BUILD}" == "False" ]]; then + upload_package ./ ./.packaging/conda_recipe ./.ci_support/${CONFIG}.yaml +fi + +( endgroup "Uploading packages" ) 2> /dev/null
\ No newline at end of file |