Skip to content

Commit

Permalink
maint: update circle build
Browse files Browse the repository at this point in the history
  • Loading branch information
oesteban committed Aug 20, 2024
1 parent 2eb84d1 commit c9668d6
Showing 1 changed file with 17 additions and 16 deletions.
33 changes: 17 additions & 16 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ orbs:
jobs:
test_package:
docker:
- image: cimg/python:3.8.5
- image: cimg/python:3.11
auth:
username: $DOCKER_USER
password: $DOCKER_PAT
Expand All @@ -17,9 +17,11 @@ jobs:
command: |
python3 -m venv /tmp/buildenv
source /tmp/buildenv/bin/activate
python -m pip install -U "setuptools~=58.0" "setuptools_scm>=6.2" pip wheel twine docutils
python setup.py sdist bdist_wheel
twine check dist/mriqc_learn*
python -m pip install -U build hatch pip twine
# Build and test package
python -m build -s -w
python -m twine check dist/mriqc_learn-*
- store_artifacts:
path: /tmp/src/mriqc_learn/dist
- persist_to_workspace:
Expand All @@ -30,10 +32,12 @@ jobs:
command: |
python3 -m venv /tmp/install_sdist
source /tmp/install_sdist/bin/activate
python -m pip install -U pip "setuptools~=58.0" "setuptools_scm>=6.2"
THISVERSION=$( python setup.py --version )
python -m pip install -U build hatch pip twine
THISVERSION=$( python -m hatch version | tail -n1 | xargs )
THISVERSION=${CIRCLE_TAG:-$THISVERSION}
python -m pip install dist/mriqc-learn*.tar.gz
python -m pip install /tmp/src/mriqc_learn/dist/mriqc_learn*.tar.gz
INSTALLED_VERSION=$(python -c 'import mriqc_learn as ml; print(ml.__version__, end="")')
echo "VERSION: \"${THISVERSION}\""
echo "INSTALLED: \"${INSTALLED_VERSION}\""
Expand All @@ -43,18 +47,20 @@ jobs:
command: |
python3 -m venv /tmp/install_wheel
source /tmp/install_wheel/bin/activate
python -m pip install "setuptools~=58.0" "setuptools_scm>=6.2" wheel "pip>=10.0.1"
THISVERSION=$( python setup.py --version )
python -m pip install -U build hatch pip twine
THISVERSION=$( python -m hatch version | tail -n1 | xargs )
THISVERSION=${CIRCLE_TAG:-$THISVERSION}
python -m pip install dist/mriqc_learn*.whl
python -m pip install /tmp/src/mriqc_learn/dist/mriqc_learn*.whl
INSTALLED_VERSION=$(python -c 'import mriqc_learn as ml; print(ml.__version__, end="")')
echo "VERSION: \"${THISVERSION}\""
echo "INSTALLED: \"${INSTALLED_VERSION}\""
test "${INSTALLED_VERSION}" = "${THISVERSION}"
deploy_pypi:
docker:
- image: cimg/python:3.8.5
- image: cimg/python:3.11
working_directory: /tmp/src/mriqc_learn
steps:
- attach_workspace:
Expand All @@ -75,11 +81,6 @@ workflows:
- test_package:
context:
- nipreps-common
filters:
branches:
ignore: /.*/
tags:
only: /.*/

- deploy_pypi:
context:
Expand Down

0 comments on commit c9668d6

Please sign in to comment.