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

CI: Add MacOS Conda deployment step #826

Open
wants to merge 5 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
93 changes: 65 additions & 28 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@ jobs:
command: |
jupyter nbconvert --ExecutePreprocessor.kernel_name=python3 --ExecutePreprocessor.timeout=-1 --to notebook --output-dir /tmp --execute notebooks/helloRadiomics.ipynb notebooks/helloFeatureClass.ipynb notebooks/PyRadiomicsExample.ipynb

build-mac-37: &build_mac_template
build-mac-38: &build_mac_template
working_directory: ~/pyradiomics
macos:
xcode: 12.5.1
xcode: 15.3.0
environment:
PYTHON_VERSION: 3.7.10
PYTHON_SHORT_VERSION: 3.7
PYTHON_VERSION: 3.8.10
PYTHON_SHORT_VERSION: 3.8
steps:
- run:
name: Setup MAC OS environment
Expand Down Expand Up @@ -82,22 +82,21 @@ jobs:
root: .
paths: [dist]

build-mac-38:
<<: *build_mac_template
environment:
PYTHON_VERSION: 3.8.10
PYTHON_SHORT_VERSION: 3.7

build-mac-39:
<<: *build_mac_template
environment:
PYTHON_VERSION: 3.9.5
PYTHON_SHORT_VERSION: 3.9

build-37: &build_template
working_directory: /pyradiomics
build-mac-310:
<<: *build_mac_template
environment:
PYTHON_VERSION: 3.10.12
PYTHON_SHORT_VERSION: 3.10

build-38: &build_template
docker:
- image: cimg/python:3.7
- image: cimg/python:3.8
user: root
steps:
- checkout
Expand All @@ -121,22 +120,22 @@ jobs:
root: .
paths: [dist]

build-38:
build-39:
<<: *build_template
docker:
- image: cimg/python:3.8
- image: cimg/python:3.9
user: root

build-39:
build-310:
<<: *build_template
docker:
- image: cimg/python:3.9
- image: cimg/python:3.10
user: root

test_deploy:
working_directory: /pyradiomics
docker:
- image: cimg/python:3.8
- image: cimg/python:3.9
user: root
steps:
- run:
Expand Down Expand Up @@ -181,7 +180,7 @@ jobs:
deploy:
working_directory: /pyradiomics
docker:
- image: cimg/python:3.6
- image: cimg/python:3.9
user: root
steps:
- run:
Expand Down Expand Up @@ -249,42 +248,77 @@ jobs:
name: Build Conda packages
command: |
mkdir /conda-bld
conda build ./conda --python=3.6 --croot /conda-bld
conda build ./conda --python=3.7 --croot /conda-bld
conda build ./conda --python=3.8 --croot /conda-bld
conda build ./conda --python=3.9 --croot /conda-bld
conda build ./conda --python=3.10 --croot /conda-bld
- run:
name: Deploy Conda packages
command: |
anaconda -t $ANACONDA_TOKEN upload -u Radiomics /conda-bld/linux-64/pyradiomics-*.tar.bz2 --force

deploy_conda_macos:
working_directory: ~/pyradiomics
macos:
xcode: 12.5.1
steps:
- run:
name: Setup MAC OS environment
# Workaround the following error occurring because python installation is cached but gettext dependency is not
# dyld: Library not loaded: /usr/local/opt/gettext/lib/libintl.8.dylib
# Referenced from: /Users/travis/.pyenv/versions/3.7.2/bin/python
# Reason: Incompatible library version: python requires version 11.0.0 or later, but libintl.8.dylib provides version 10.0.0
# See https://github.com/scikit-build/cmake-python-distributions/issues/112 and
# https://github.com/scikit-build/cmake-python-distributions/pull/113
command: |
echo "HOMEBREW_NO_AUTO_UPDATE=1" >> $BASH_ENV
brew install gettext
brew install pyenv
pyenv install miniconda3-latest
echo 'export PATH=$HOME/.pyenv/versions/miniconda3-latest/bin:$PATH' >> $BASH_ENV
- checkout
- run:
name: Configure Miniconda
command: |
bash ./conda/configure_conda.sh
- run:
name: Build Conda packages
command: |
mkdir ~/conda-bld
conda build ./conda --python=3.8 --croot ~/conda-bld
conda build ./conda --python=3.9 --croot ~/conda-bld
conda build ./conda --python=3.10 --croot ~/conda-bld
- run:
name: Deploy Conda packages
command: |
anaconda -t $ANACONDA_TOKEN upload -u Radiomics ~/conda-bld/osx-64/pyradiomics-*.tar.bz2 --force

workflows:
version: 2
build_and_deploy:
jobs:
- build-mac-37: &build_job_template
- build-mac-38: &build_job_template
filters:
tags:
only:
- /^v?[0-9]+(\.[0-9]+)*((a|b|rc)[0-9]+)?/
- build-mac-38:
<<: *build_job_template
- build-mac-39:
<<: *build_job_template
- build-37:
- build-mac-310:
<<: *build_job_template
- build-38:
<<: *build_job_template
- build-39:
<<: *build_job_template
- build-310:
<<: *build_job_template
- test-notebooks: &requires_template
requires:
- build-37
- build-38
- build-39
- build-mac-37
- build-310
- build-mac-38
- build-mac-39
- build-mac-310
- test_deploy:
<<: *requires_template
filters:
Expand All @@ -303,7 +337,7 @@ workflows:
tags:
only:
- /^v?[0-9]+(\.[0-9]+)*/
- deploy_conda:
- deploy_conda: &deploy_conda_template
<<: *requires_template
filters:
branches:
Expand All @@ -312,3 +346,6 @@ workflows:
tags:
only:
- /^v?[0-9]+(\.[0-9]+)*((a|b|rc)[0-9]+)?/

- deploy_conda_macos:
<<: *deploy_conda_template
9 changes: 5 additions & 4 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@ environment:

# Visual Studio (Python 3, 64 bit)

- PYTHON_DIR: "C:\\Python37-x64"
PYTHON_VERSION: "3.7.x"
PYTHON_SHORT_VERSION: "3.7"

- PYTHON_DIR: "C:\\Python38-x64"
PYTHON_VERSION: "3.8.x"
PYTHON_SHORT_VERSION: "3.8"
Expand All @@ -21,6 +17,11 @@ environment:
PYTHON_VERSION: "3.9.x"
PYTHON_SHORT_VERSION: "3.9"

- PYTHON_DIR: "C:\\Python310-x64"
PYTHON_VERSION: "3.10.x"
PYTHON_SHORT_VERSION: "3.10"


init:
- ps: $env:PATH=$env:PYTHON_DIR + ";" + $env:PYTHON_DIR + "\\Scripts;" + $env:PATH
# - ps: iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
Expand Down