Skip to content

Commit

Permalink
CI: test with Python 3.12 and Python 3.13-dev
Browse files Browse the repository at this point in the history
  • Loading branch information
reneeotten committed Nov 18, 2023
1 parent ac0d35f commit 677d123
Showing 1 changed file with 19 additions and 20 deletions.
39 changes: 19 additions & 20 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ stages:
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '3.11'
versionSpec: '3.12'
- script: |
python -m pip install --upgrade build pip setuptools wheel
displayName: 'Install Python build tools and dependencies'
Expand Down Expand Up @@ -43,7 +43,7 @@ stages:
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '3.11'
versionSpec: '3.12'
- script: |
python -m pip install --upgrade build pip setuptools wheel
displayName: 'Install Python build tools'
Expand Down Expand Up @@ -129,6 +129,8 @@ stages:
python.version: '3.10'
Python311:
python.version: '3.11'
Python312:
python.version: '3.12'

steps:
- task: UsePythonVersion@0
Expand Down Expand Up @@ -167,7 +169,6 @@ stages:
./codecov -v -f "coverage.xml"
displayName: 'Upload to codecov.io'
# Python 3.11 on Windows currently fails to build pycairo
- stage: test_Windows_latest
dependsOn: check_codestyle
condition: succeededOrFailed()
Expand All @@ -177,8 +178,8 @@ stages:
vmImage: 'windows-latest'
strategy:
matrix:
Python310:
python.version: '3.10'
Python312:
python.version: '3.12'

steps:
- task: UsePythonVersion@0
Expand Down Expand Up @@ -213,7 +214,7 @@ stages:
strategy:
matrix:
Python311:
python.version: '3.11'
python.version: '3.12'

steps:
- task: UsePythonVersion@0
Expand All @@ -239,13 +240,13 @@ stages:
dependsOn: check_codestyle
condition: succeededOrFailed()
jobs:
- job: Python312_dev
- job: Python313_dev
pool:
vmImage: 'ubuntu-latest'
steps:
- script: |
sudo add-apt-repository ppa:deadsnakes/nightly
sudo apt-get update && sudo apt-get install -y --no-install-recommends python3.12-dev python3.12-venv
sudo apt-get update && sudo apt-get install -y --no-install-recommends python3.13-dev python3.13-venv
displayName: Install Python development version from the deadsnakes PPA
- script: |
sudo apt-get update && sudo apt-get install -yq --no-install-suggests --no-install-recommends \
Expand All @@ -254,47 +255,45 @@ stages:
displayName: 'Install dependencies'
- script: |
export PATH=/home/vsts/.local/bin:$PATH
##curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
##python3.12 get-pip.py --user
python3.12 -m ensurepip --upgrade
pip3.12 install -U build pip setuptools wheel pybind11 cython || echo -e "\043#vso[task.logissue type=warning;] Allowed failure for development version!!"
python3.13 -m ensurepip --upgrade
pip3.13 install -U build pip setuptools wheel pybind11 cython || echo -e "\043#vso[task.logissue type=warning;] Allowed failure for development version!!"
displayName: 'Install build, pip, setuptools, wheel, pybind11, and cython'
- script: |
export PATH=/home/vsts/.local/bin:$PATH
export numpy_version=1.26.2
wget https://github.com/numpy/numpy/releases/download/v${numpy_version}/numpy-${numpy_version}.tar.gz
tar xzvf numpy-${numpy_version}.tar.gz
cd numpy-${numpy_version}
python3.12 setup.py install --user || echo -e "\043#vso[task.logissue type=warning;] Allowed failure for development version!!"
python3.13 setup.py install --user || echo -e "\043#vso[task.logissue type=warning;] Allowed failure for development version!!"
displayName: 'Install latest available version of NumPy'
- script: |
export PATH=/home/vsts/.local/bin:$PATH
pip3.12 install -U pythran || echo -e "\043#vso[task.logissue type=warning;] Allowed failure for development version!!"
pip3.13 install -U pythran || echo -e "\043#vso[task.logissue type=warning;] Allowed failure for development version!!"
displayName: 'Install pythran'
- script: |
export PATH=/home/vsts/.local/bin:$PATH
export scipy_version=1.11.3
wget https://github.com/scipy/scipy/releases/download/v${scipy_version}/scipy-${scipy_version}.tar.gz
tar xzvf scipy-${scipy_version}.tar.gz
cd scipy-${scipy_version}
python3.12 setup.py install --user || echo -e "\043#vso[task.logissue type=warning;] Allowed failure for development version!!"
python3.13 setup.py install --user || echo -e "\043#vso[task.logissue type=warning;] Allowed failure for development version!!"
displayName: 'Install latest available version of SciPy'
- script: |
export PATH=/home/vsts/.local/bin:$PATH
# remove numdifftools for now as it pulls in statsmodels, that wants to build with NumPy 1.14.5
pip3.12 install asteval uncertainties dill emcee flaky pytest pytest-cov || echo -e "\043#vso[task.logissue type=warning;] Allowed failure for development version!!"
pip3.13 install asteval uncertainties dill emcee flaky pytest pytest-cov || echo -e "\043#vso[task.logissue type=warning;] Allowed failure for development version!!"
displayName: 'Install latest available version of Python dependencies'
- script: |
python3.12 -m build
python3.12 -m pip install '.[test]' --user || echo -e "\043#vso[task.logissue type=warning;] Allowed failure for development version!!"
python3.13 -m build
python3.13 -m pip install '.[test]' --user || echo -e "\043#vso[task.logissue type=warning;] Allowed failure for development version!!"
displayName: 'Build wheel/sdist and install lmfit'
- script: |
export PATH=/home/vsts/.local/bin:$PATH
pip3.12 list || echo -e "\043#vso[task.logissue type=warning;] Allowed failure for development version!!"
pip3.13 list || echo -e "\043#vso[task.logissue type=warning;] Allowed failure for development version!!"
displayName: 'List installed Python packages'
- script: |
export PATH=/home/vsts/.local/bin:$PATH
pip3.12 install pytest-azurepipelines
pip3.13 install pytest-azurepipelines
cd $(Agent.BuildDirectory)/s/tests
pytest || echo -e "\043#vso[task.logissue type=warning;] Allowed failure for development version!!"
displayName: 'Run test-suite'

0 comments on commit 677d123

Please sign in to comment.