Skip to content

Commit

Permalink
add osx and osx-arm64 support
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfv committed Jun 23, 2024
1 parent 6cead8c commit 506c76c
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 120 deletions.
72 changes: 12 additions & 60 deletions .scripts/build_osx.sh
Original file line number Diff line number Diff line change
@@ -1,70 +1,22 @@
#!/bin/bash

set -x

export FEEDSTOCK_ROOT=`pwd`

echo -e "\n\nInstalling a fresh version of Miniforge."
MINIFORGE_URL="https://github.com/conda-forge/miniforge/releases/latest/download"
MINIFORGE_FILE="Mambaforge-MacOSX-x86_64.sh"
curl -L -O --silent "${MINIFORGE_URL}/${MINIFORGE_FILE}"
/bin/bash $MINIFORGE_FILE -b

echo -e "\n\nConfiguring conda."

source ${HOME}/mambaforge/etc/profile.d/conda.sh
conda activate base

conda config --set remote_max_retries 5

echo -e "\n\nInstalling conda-forge-ci-setup=3 and conda-build."
mamba install -n base --quiet --yes conda-forge-ci-setup=3 conda-build=3.27 pip boa quetz-client -c conda-forge

set -e

# echo -e "\n\nSetting up the condarc and mangling the compiler."
# # setup_conda_rc ./ ./recipe ./.ci_support/${CONFIG}.yaml
# # mangle_compiler ./ ./recipe .ci_support/${CONFIG}.yaml

# echo -e "\n\nMangling homebrew in the CI to avoid conflicts."
# # /usr/bin/sudo mangle_homebrew
# # /usr/bin/sudo -k

# echo -e "\n\nRunning the build setup script."
# # source run_conda_forge_build_setup

export "CONDA_BLD_PATH=$CONDA_PREFIX/conda-bld/"

mkdir -p $CONDA_BLD_PATH
conda index $CONDA_BLD_PATH
conda config --set anaconda_upload yes
conda config --set show_channel_urls true
conda config --set auto_update_conda false
conda config --set add_pip_as_python_dependency false

conda config --add channels conda-forge
conda config --add channels robostack-staging
conda config --add channels $CONDA_BLD_PATH
# conda config --set channel_priority strict

# echo -e "\n\nMaking the build clobber file and running the build."
# make_build_number ./ ./recipe ./.ci_support/${CONFIG}.yaml
export FEEDSTOCK_ROOT=`pwd`
export "CONDA_BLD_PATH=$HOME/conda-bld/"

conda info
conda config --show-sources
conda list --show-channel-urls
curl -fsSL https://pixi.sh/install.sh | bash
export PATH="$HOME/.pixi/bin:$PATH"

for recipe in ${CURRENT_RECIPES[@]}; do
cd ${FEEDSTOCK_ROOT}/recipes/${recipe}
boa build . -m ${FEEDSTOCK_ROOT}/.ci_support/conda_forge_pinnings.yaml -m ${FEEDSTOCK_ROOT}/conda_build_config.yaml
done
pixi run rattler-build build \
--recipe ${FEEDSTOCK_ROOT}/recipes/${recipe} \
-m ${FEEDSTOCK_ROOT}/conda_build_config.yaml \
-c robostack-jazzy -c conda-forge \
--output-dir $CONDA_BLD_PATH

anaconda -t ${ANACONDA_API_TOKEN} upload ${CONDA_BLD_PATH}/osx-64/*.tar.bz2 --force
# quetz-client "${QUETZ_URL}" ${CONDA_BLD_PATH} --force

# conda build ./recipe -m ./.ci_support/${CONFIG}.yaml --clobber-file ./.ci_support/clobber_${CONFIG}.yaml
# -m ${FEEDSTOCK_ROOT}/.ci_support/conda_forge_pinnings.yaml \
done

# if [[ "${UPLOAD_PACKAGES}" != "False" ]]; then
# echo -e "\n\nUploading the packages."
# upload_package --validate --feedstock-name="libsolv-feedstock" ./ ./recipe ./.ci_support/${CONFIG}.yaml
# fi
anaconda -t ${ANACONDA_API_TOKEN} upload ${CONDA_BLD_PATH}/osx-*/*.conda --force
73 changes: 13 additions & 60 deletions .scripts/build_osx_arm64.sh
Original file line number Diff line number Diff line change
@@ -1,70 +1,23 @@
#!/bin/bash

set -x

export FEEDSTOCK_ROOT=`pwd`

echo -e "\n\nInstalling a fresh version of Miniforge."
MINIFORGE_URL="https://github.com/conda-forge/miniforge/releases/latest/download"
MINIFORGE_FILE="Mambaforge-MacOSX-arm64.sh"
curl -L -O --silent "${MINIFORGE_URL}/${MINIFORGE_FILE}"
/bin/bash $MINIFORGE_FILE -b

echo -e "\n\nConfiguring conda."

source ${HOME}/mambaforge/etc/profile.d/conda.sh
conda activate base

conda config --set remote_max_retries 5

echo -e "\n\nInstalling conda-forge-ci-setup=3 and conda-build."
mamba install -n base --quiet --yes conda-forge-ci-setup=3 conda-build=3.27 pip boa quetz-client -c conda-forge

set -e

# echo -e "\n\nSetting up the condarc and mangling the compiler."
# # setup_conda_rc ./ ./recipe ./.ci_support/${CONFIG}.yaml
# # mangle_compiler ./ ./recipe .ci_support/${CONFIG}.yaml

# echo -e "\n\nMangling homebrew in the CI to avoid conflicts."
# # /usr/bin/sudo mangle_homebrew
# # /usr/bin/sudo -k

# echo -e "\n\nRunning the build setup script."
# # source run_conda_forge_build_setup

export "CONDA_BLD_PATH=$CONDA_PREFIX/conda-bld/"

mkdir -p $CONDA_BLD_PATH
conda index $CONDA_BLD_PATH
conda config --set anaconda_upload yes
conda config --set show_channel_urls true
conda config --set auto_update_conda false
conda config --set add_pip_as_python_dependency false

conda config --add channels conda-forge
conda config --add channels robostack-staging
conda config --add channels $CONDA_BLD_PATH
# conda config --set channel_priority strict

# echo -e "\n\nMaking the build clobber file and running the build."
# make_build_number ./ ./recipe ./.ci_support/${CONFIG}.yaml
export FEEDSTOCK_ROOT=`pwd`
export "CONDA_BLD_PATH=$HOME/conda-bld/"

conda info
conda config --show-sources
conda list --show-channel-urls
curl -fsSL https://pixi.sh/install.sh | bash
export PATH="$HOME/.pixi/bin:$PATH"

for recipe in ${CURRENT_RECIPES[@]}; do
cd ${FEEDSTOCK_ROOT}/recipes/${recipe}
boa build . -m ${FEEDSTOCK_ROOT}/.ci_support/conda_forge_pinnings.yaml -m ${FEEDSTOCK_ROOT}/conda_build_config.yaml --target-platform=osx-arm64
pixi run rattler-build build \
--recipe ${FEEDSTOCK_ROOT}/recipes/${recipe} \
-m ${FEEDSTOCK_ROOT}/conda_build_config.yaml \
-c robostack-jazzy -c conda-forge \
--output-dir $CONDA_BLD_PATH \
--target-platform=osx-arm64

# -m ${FEEDSTOCK_ROOT}/.ci_support/conda_forge_pinnings.yaml \
done

anaconda -t ${ANACONDA_API_TOKEN} upload ${CONDA_BLD_PATH}/osx-arm64/*.tar.bz2 --force
# quetz-client "${QUETZ_URL}" ${CONDA_BLD_PATH} --force

# conda build ./recipe -m ./.ci_support/${CONFIG}.yaml --clobber-file ./.ci_support/clobber_${CONFIG}.yaml

# if [[ "${UPLOAD_PACKAGES}" != "False" ]]; then
# echo -e "\n\nUploading the packages."
# upload_package --validate --feedstock-name="libsolv-feedstock" ./ ./recipe ./.ci_support/${CONFIG}.yaml
# fi
anaconda -t ${ANACONDA_API_TOKEN} upload ${CONDA_BLD_PATH}/osx-*/*.conda --force

0 comments on commit 506c76c

Please sign in to comment.