Skip to content

Commit

Permalink
upgrade CI configuartio to use more recent python and runners
Browse files Browse the repository at this point in the history
  • Loading branch information
Czaki committed Oct 18, 2024
1 parent aad3fcd commit 32dc7dd
Show file tree
Hide file tree
Showing 12 changed files with 53 additions and 52 deletions.
6 changes: 3 additions & 3 deletions .azure-pipelines/pyinstaller.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ parameters:
type: string

steps:
- {task: UsePythonVersion@0, inputs: {versionSpec: '3.11', architecture: x64}}
- {task: UsePythonVersion@0, inputs: {versionSpec: '3.12', architecture: x64}}
- template: pip_cache.yaml
parameters:
key: pyinstaller | requirements/constraints_py3.9.txt | "$(Agent.OS)" | "$(PY)"
key: pyinstaller | requirements/constraints_py3.12.txt | "$(Agent.OS)" | "$(PY)"
path: ${{ parameters.cache_dir }}
- bash: |
python -m pip install -U pip wheel setuptools
displayName: install libs
- bash: python -m pip install .[pyinstaller] -c requirements/constraints_py3.11.txt
- bash: python -m pip install .[pyinstaller] -c requirements/constraints_py3.12.txt
displayName: install partseg
- bash: |
python build_utils/create_and_pack_executable.py --no-simple-zip
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/base_test_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
os:
required: false
type: string
default: "ubuntu-20.04"
default: "ubuntu-24.04"
tox_args:
required: false
type: string
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/make_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.10"
python-version: "3.12"
- uses: tlambert03/setup-qt-libs@v1
- name: Install Windows OpenGL
if: runner.os == 'Windows'
Expand All @@ -44,12 +44,12 @@ jobs:
if (Test-Path -Path "C:\Windows\system32\opengl32.dll" -PathType Leaf) {Exit 0} else {Exit 1}
shell: powershell
- name: Install PartSeg
run: python -m pip install --editable ".[pyinstaller]" --constraint requirements/constraints_py3.10.txt
run: python -m pip install --editable ".[pyinstaller]" --constraint requirements/constraints_py3.12.txt

- name: compile numpy on macos-14
if: ${{ matrix.os == 'macos-14' }}
run: |
python -m pip install --no-binary numpy numpy --force-reinstall --constraint requirements/constraints_py3.10.txt
python -m pip install --no-binary numpy numpy --force-reinstall --constraint requirements/constraints_py3.12.txt
- name: Build PartSeg bundle
run: python build_utils/create_and_pack_executable.py
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test_napari_repo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ on:
jobs:
download_data:
name: Download test data
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- shell: bash
Expand All @@ -33,7 +33,7 @@ jobs:
strategy:
fail-fast: false
matrix:
platform: [ ubuntu-22.04 ]
platform: [ ubuntu-24.04 ]
python: ['3.9' , '3.10', '3.11', '3.12']
napari_version: ['repo']
steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test_napari_widgets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
fail-fast: false
matrix:
qt_backend: ["PyQt5", "PySide2"]
os: ["ubuntu-22.04"]
os: ["ubuntu-24.04"]
uses: ./.github/workflows/base_test_workflow.yml
with:
python_version: "3.10"
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/test_prereleases.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ on:
jobs:
download_data:
name: Download test data
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- shell: bash
Expand All @@ -41,7 +41,7 @@ jobs:
strategy:
fail-fast: false
matrix:
platform: [windows-2022, macos-14, ubuntu-22.04]
platform: [windows-2022, macos-14, ubuntu-24.04]
python: [3.12]
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -108,9 +108,9 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
name: Install Python 3.11
name: Install Python 3.12
with:
python-version: 3.11
python-version: 3.12
- uses: tlambert03/setup-qt-libs@v1
- name: Install dependencies
run: |
Expand Down Expand Up @@ -146,7 +146,7 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PLATFORM: "linux"
PYTHON: "3.11"
PYTHON: "3.12"
RUN_ID: ${{ github.run_id }}
TITLE: '[test-bot] pyinstaller bundle --pre is failing'
with:
Expand Down
24 changes: 14 additions & 10 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,28 +51,28 @@ jobs:
fail-fast: false
matrix:
python_version: ["3.9", "3.10", "3.11", "3.12"]
os: ["ubuntu-20.04"]
os: ["ubuntu-24.04"]
qt_backend: ["PyQt5"]
tox_args: [ "" ]
include:
- python_version: "3.11"
os: "macos-13"
qt_backend: "PyQt5"
- python_version: "3.12"
os: "macos-14"
qt_backend: "PyQt6"
- python_version: "3.11"
os: "windows-2019"
os: "windows-latest"
qt_backend: "PyQt5"
- python_version: "3.10"
os: "ubuntu-20.04"
qt_backend: "PySide2"
- python_version: "3.10"
os: "ubuntu-22.04"
os: "ubuntu-24.04"
qt_backend: "PySide6"
- python_version: "3.12"
os: "ubuntu-22.04"
qt_backend: "PyQt6"
- python_version: "3.12"
os: "ubuntu-24.04"
qt_backend: "PyQt5"
- python_version: "3.10"
os: "ubuntu-22.04"
qt_backend: "PyQt5"
Expand All @@ -87,14 +87,14 @@ jobs:

base-test-main:
name: Base py${{ matrix.python_version }}
if: github.event_name == 'push'
if: github.event_name == 'push' || contains(github.event.pull_request.files, '.github/workflows/test.yml')
uses: ./.github/workflows/base_test_workflow.yml
needs: download_data
strategy:
fail-fast: false
matrix:
python_version: ["3.9", "3.10", "3.11", "3.12"]
os: ["ubuntu-20.04", "macos-13", "windows-2019"]
os: ["ubuntu-24.04", "macos-14", "windows-2022"]
qt_backend: ["PySide2", "PyQt5"]
include:
- python_version: "3.12"
Expand All @@ -115,6 +115,10 @@ jobs:
qt_backend: "PySide2"
- python_version: "3.12"
qt_backend: "PySide2"
- os: "macos-14"
qt_backend: "PySide2"
- os: macos-14
python_version: "3.9"
with:
test_data: True
python_version: ${{ matrix.python_version }}
Expand Down Expand Up @@ -185,7 +189,7 @@ jobs:

test_conda:
name: Test PartSeg conda
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04
needs: download_data
steps:
- uses: actions/checkout@v4
Expand All @@ -196,7 +200,7 @@ jobs:
use-mamba: true
channels: conda-forge
channel-priority: strict
python-version: "3.11"
python-version: "3.12"

- uses: tlambert03/setup-qt-libs@v1

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/upgrade-dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:

- uses: actions/setup-python@v5
with:
python-version: "3.11"
python-version: "3.12"
cache: pip
cache-dependency-path: 'pyproject.toml'
- name: Upgrade Python dependencies
Expand Down
4 changes: 2 additions & 2 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ formats: all
build:
os: ubuntu-22.04
tools:
python: "3.11"
python: "3.12"
apt_packages:
- graphviz


# Optionally set the version of Python and requirements required to build your docs
python:
install:
- requirements: requirements/constraints_py3.11_docs.txt
- requirements: requirements/constraints_py3.12_docs.txt
- method: pip
path: .
extra_requirements:
Expand Down
22 changes: 11 additions & 11 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ stages:
- stage: GetTestData
jobs:
- job: linux
pool: {vmImage: 'Ubuntu-22.04'}
pool: {vmImage: 'Ubuntu-24.04'}
steps:
- script: bash build_utils/download_data.sh
displayName: "download data"
- task: UsePythonVersion@0
inputs:
versionSpec: '3.11'
versionSpec: '3.2'
displayName: 'Use Python $(python.version)'
- script: python build_utils/cut_changelog.py changelog_cut.md
displayName: "Cut changelog"
Expand Down Expand Up @@ -59,9 +59,9 @@ stages:
- job: manifest_check
pool: {vmImage: 'Ubuntu-latest'}
steps:
- {task: UsePythonVersion@0, inputs: {versionSpec: '3.10', architecture: x64}}
- {task: UsePythonVersion@0, inputs: {versionSpec: '3.12', architecture: x64}}
- bash: |
python -m pip install check-manifest==0.49 numpy==1.22.3
python -m pip install check-manifest==0.50 numpy==2.0.2
displayName: InstallDeps
- bash: check-manifest
displayName: check-manifest
Expand All @@ -74,10 +74,10 @@ stages:
variables:
pip_cache_dir: $(Pipeline.Workspace)/.pip
steps:
- {task: UsePythonVersion@0, inputs: {versionSpec: '3.11', architecture: x64}}
- {task: UsePythonVersion@0, inputs: {versionSpec: '3.12', architecture: x64}}
- template: .azure-pipelines/pip_cache.yaml
parameters:
key: doc | requirements/constraints_py3.11_docs.txt | "$(PY)"
key: doc | requirements/constraints_py3.12_docs.txt | "$(PY)"
path: $(pip_cache_dir)
- bash: |
python -m pip install tox
Expand All @@ -91,24 +91,24 @@ stages:
artifactName: docs

- job: Notebook_check
pool: {vmImage: 'Ubuntu-22.04'}
pool: {vmImage: 'Ubuntu-24.04'}
continueOnError: true
variables:
DATA_PATH: typy_neuronow2
pip_cache_dir: $(Pipeline.Workspace)/.pip
steps:
- {task: UsePythonVersion@0, inputs: {versionSpec: '3.11', architecture: x64}}
- {task: UsePythonVersion@0, inputs: {versionSpec: '3.12', architecture: x64}}
- template: .azure-pipelines/pip_cache.yaml
parameters:
key: notebook | requirements/constraints_py3.11.txt | "$(PY)"
key: notebook | requirements/constraints_py3.12.txt | "$(PY)"
path: $(pip_cache_dir)
- bash: |
python -m pip install tox
displayName: "Install tox"
- bash: tox -e jupyter
displayName: "Run Notebook"
env:
PIP_CONSTRAINT: requirements/constraints_py3.11.txt
PIP_CONSTRAINT: requirements/constraints_py3.12.txt

- stage: Tests_linux
dependsOn: [GetTestData, formatting_check]
Expand All @@ -117,7 +117,7 @@ stages:
pip_cache_dir: $(Pipeline.Workspace)/.pip
jobs:
- job: test_linux
pool: { vmImage: 'ubuntu-22.04' }
pool: { vmImage: 'ubuntu-24.04' }
variables:
AZURE_PIPELINES: 1
DISPLAY: ':99.0'
Expand Down
4 changes: 2 additions & 2 deletions build_utils/create_environment_yml.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ channels:
- conda-forge
dependencies:
$dependencies
- pyside2
- python=3.11
- pyqt6
- python=3.12
EOF
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# This file was autogenerated by uv via the following command:
# uv pip compile --python-version 3.11 --output-file requirements/constraints_py3.11_docs.txt pyproject.toml --extra docs --extra pyqt6
# uv pip compile --python-version 3.12 --output-file requirements/constraints_py3.12_docs.txt pyproject.toml --extra docs --extra pyqt6
alabaster==1.0.0
# via sphinx
annotated-types==0.7.0
Expand All @@ -12,6 +12,8 @@ appdirs==1.4.4
# napari
# npe2
# pint
appnope==0.1.4
# via ipykernel
asttokens==2.4.1
# via stack-data
attrs==24.2.0
Expand Down Expand Up @@ -43,7 +45,7 @@ comm==0.2.2
# via ipykernel
czifile==2019.7.2
# via partseg (pyproject.toml)
dask==2024.9.1
dask==2024.10.0
# via napari
debugpy==1.8.7
# via ipykernel
Expand Down Expand Up @@ -89,8 +91,6 @@ imageio==2.36.0
# scikit-image
imagesize==1.4.1
# via sphinx
importlib-metadata==8.5.0
# via dask
in-n-out==0.2.1
# via app-model
ipykernel==6.29.5
Expand Down Expand Up @@ -218,7 +218,7 @@ partsegdata==0.10.0
# via partseg (pyproject.toml)
pexpect==4.9.0
# via ipython
pillow==10.4.0
pillow==11.0.0
# via
# imageio
# napari
Expand All @@ -233,7 +233,7 @@ pooch==1.8.2
# via scikit-image
prompt-toolkit==3.0.48
# via ipython
psutil==6.0.0
psutil==6.1.0
# via
# ipykernel
# napari
Expand Down Expand Up @@ -263,7 +263,7 @@ pydantic-compat==0.1.2
# via app-model
pydantic-core==2.23.4
# via pydantic
pydantic-settings==2.5.2
pydantic-settings==2.6.0
# via autodoc-pydantic
pygments==2.18.0
# via
Expand Down Expand Up @@ -343,7 +343,7 @@ scipy==1.14.1
# partseg (pyproject.toml)
# napari
# scikit-image
sentry-sdk==2.16.0
sentry-sdk==2.17.0
# via partseg (pyproject.toml)
shellingham==1.5.4
# via typer
Expand Down Expand Up @@ -428,7 +428,6 @@ typing-extensions==4.12.2
# app-model
# flexcache
# flexparser
# ipython
# magicgui
# napari
# pint
Expand All @@ -455,5 +454,3 @@ xlrd==2.0.1
# via partseg (pyproject.toml)
xlsxwriter==3.2.0
# via partseg (pyproject.toml)
zipp==3.20.2
# via importlib-metadata

0 comments on commit 32dc7dd

Please sign in to comment.