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

Removed intermediate python versions in CI matrix #17839

Merged
merged 11 commits into from
Feb 25, 2025
Merged
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
2 changes: 2 additions & 0 deletions .ci/docker/conan-tests
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ ENV DEBIAN_FRONTEND=noninteractive
ENV PY36=3.6.15 \
PY38=3.8.6 \
PY39=3.9.2 \
PY310=3.10.16 \
PY312=3.12.3 \
PY313=3.13.0 \
CMAKE_3_15=/usr/share/cmake-3.15.7/bin/cmake \
Expand Down Expand Up @@ -95,6 +96,7 @@ RUN curl https://pyenv.run | bash && \
pyenv install $PY36 && \
pyenv install $PY38 && \
pyenv install $PY39 && \
pyenv install $PY310 && \
pyenv install $PY312 && \
pyenv install $PY313 && \
pyenv global $PY39 && \
Expand Down
29 changes: 22 additions & 7 deletions .github/workflows/linux-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ name: Linux tests

on:
workflow_call:
inputs:
python-versions:
required: true
type: string

jobs:
build_container:
Expand Down Expand Up @@ -49,7 +53,7 @@ jobs:
options: --user conan
strategy:
matrix:
python-version: [3.13, 3.9, 3.8, 3.6]
python-version: ${{ fromJson(inputs.python-versions) }}
test-type: [unittests, integration, functional]
include:
- test-type: unittests
Expand Down Expand Up @@ -92,19 +96,30 @@ jobs:
linux_docker_tests:
needs: build_container
runs-on: ubuntu-latest
container:
image: ghcr.io/${{ github.repository_owner }}/conan-tests:${{ needs.build_container.outputs.image_tag }}
options: --user conan
strategy:
matrix:
python-version: [3.13, 3.9]
# Use modern versions due to docker incompatibility with python <3.8
python-version: ${{ github.event_name != 'pull_request' && fromJson('["3.13", "3.9"]') || fromJson('["3.10"]') }}

name: Docker Runner Tests (${{ matrix.python-version }})
steps:
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Checkout code
uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
run: |
pyenv global ${{ matrix.python-version }}
python --version

- name: Cache pip
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('**/requirements*.txt') }}

- name: Install dependencies
run: |
pip install --upgrade pip
Expand Down
27 changes: 27 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,44 @@ concurrency:
cancel-in-progress: true

jobs:
set_python_versions:
runs-on: ubuntu-latest
outputs:
python_versions_linux_windows: ${{ steps.set_versions.outputs.python_versions_linux_windows }}
python_versions_macos: ${{ steps.set_versions.outputs.python_versions_macos }}
name: Determine Python versions
steps:
- name: Determine Python versions
id: set_versions
run: |
if [[ "${{ github.ref }}" == "refs/heads/develop2" || "${{ github.ref }}" == refs/heads/release/* ]]; then
echo "python_versions_linux_windows=['3.13', '3.6']" >> $GITHUB_OUTPUT
echo "python_versions_macos=['3.13', '3.8']" >> $GITHUB_OUTPUT
else
echo "python_versions_linux_windows=['3.10']" >> $GITHUB_OUTPUT
echo "python_versions_macos=['3.10']" >> $GITHUB_OUTPUT
fi

linux_suite:
needs: set_python_versions
uses: ./.github/workflows/linux-tests.yml
name: Linux test suite
with:
python-versions: ${{ needs.set_python_versions.outputs.python_versions_linux_windows }}

osx_suite:
needs: set_python_versions
uses: ./.github/workflows/osx-tests.yml
name: OSX test suite
with:
python-versions: ${{ needs.set_python_versions.outputs.python_versions_macos }}

windows_suite:
needs: set_python_versions
uses: ./.github/workflows/win-tests.yml
name: Windows test suite
with:
python-versions: ${{ needs.set_python_versions.outputs.python_versions_linux_windows }}

code_coverage:
runs-on: ubuntu-latest
Expand Down
10 changes: 7 additions & 3 deletions .github/workflows/osx-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ name: OSX Tests

on:
workflow_call:
inputs:
python-versions:
required: true
type: string

jobs:
osx_setup:
Expand All @@ -11,10 +15,10 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Python 3.8
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.8
python-version: '3.10'

- name: Cache pip packages
id: cache-pip
Expand Down Expand Up @@ -114,7 +118,7 @@ jobs:
strategy:
fail-fast: true
matrix:
python-version: [3.8, 3.12, 3.13]
python-version: ${{ fromJson(inputs.python-versions) }}
test-type: [unittests, integration, functional]
include:
- test-type: unittests
Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/win-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,17 @@ name: Windows Tests

on:
workflow_call:
inputs:
python-versions:
required: true
type: string

jobs:
unit_integration_tests:
runs-on: windows-2022
strategy:
matrix:
python-version: [3.13, 3.8, 3.6]
python-version: ${{ fromJson(inputs.python-versions) }}
name: Unit & Integration Tests (${{ matrix.python-version }})
steps:
- name: Checkout code
Expand Down Expand Up @@ -59,8 +63,7 @@ jobs:
runs-on: windows-2022
strategy:
matrix:
python-version: [3.13, 3.8, 3.6]

python-version: ${{ fromJson(inputs.python-versions) }}
name: Functional Tests (${{ matrix.python-version }})
steps:
- name: Checkout code
Expand Down
Loading