diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a7b8fac361..327f361da8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -173,7 +173,7 @@ jobs: -D CMAKE_UNITY_BUILD=${{ matrix.unity }} -D CMAKE_BUILD_TYPE="${{ matrix.config }}" -D BUILD_METALIBS=${{ matrix.metalibs }} - -D HAVE_PYTHON=${{ matrix.python }} + -D HAVE_PYTHON=${{ runner.os != 'Windows' && matrix.python || 'NO' }} -D HAVE_EIGEN=${{ matrix.eigen }} .. @@ -184,49 +184,17 @@ jobs: run: cmake --build . --config ${{ matrix.config }} --parallel 4 # END A - - name: Setup Python (Python 3.6) - if: contains(matrix.python, 'YES') - uses: actions/setup-python@v2 - with: - python-version: 3.6 - - name: Configure (Python 3.6) - if: contains(matrix.python, 'YES') - working-directory: build - shell: bash - run: > - cmake -DWANT_PYTHON_VERSION=3.6 - -DPython_FIND_REGISTRY=NEVER -DPython_ROOT="$pythonLocation" . - - name: Build (Python 3.6) - if: contains(matrix.python, 'YES') - # BEGIN A - working-directory: build - run: cmake --build . --config ${{ matrix.config }} --parallel 4 - # END A - - name: Test (Python 3.6) - # BEGIN B - if: contains(matrix.python, 'YES') - working-directory: build - shell: bash - env: - PYTHONPATH: ${{ matrix.config }} - run: | - PYTHON_EXECUTABLE=$(grep 'Python_EXECUTABLE:' CMakeCache.txt | sed 's/.*=//') - $PYTHON_EXECUTABLE -m pip install pytest pytest-cov - export COVERAGE_FILE=.coverage.$RANDOM LLVM_PROFILE_FILE=$PWD/pid-%p.profraw - $PYTHON_EXECUTABLE -m pytest ../tests --cov=. - # END B - - name: Setup Python (Python 3.7) if: contains(matrix.python, 'YES') - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: - python-version: 3.7 + python-version: '3.7' - name: Configure (Python 3.7) if: contains(matrix.python, 'YES') working-directory: build shell: bash run: > - cmake -DWANT_PYTHON_VERSION=3.7 + cmake -DWANT_PYTHON_VERSION=3.7 -DHAVE_PYTHON=YES -DPython_FIND_REGISTRY=NEVER -DPython_ROOT="$pythonLocation" . - name: Build (Python 3.7) if: contains(matrix.python, 'YES') @@ -250,15 +218,15 @@ jobs: - name: Setup Python (Python 3.8) if: contains(matrix.python, 'YES') - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: - python-version: 3.8 + python-version: '3.8' - name: Configure (Python 3.8) if: contains(matrix.python, 'YES') working-directory: build shell: bash run: > - cmake -DWANT_PYTHON_VERSION=3.8 + cmake -DWANT_PYTHON_VERSION=3.8 -DHAVE_PYTHON=YES -DPython_FIND_REGISTRY=NEVER -DPython_ROOT="$pythonLocation" . - name: Build (Python 3.8) if: contains(matrix.python, 'YES') @@ -282,15 +250,15 @@ jobs: - name: Setup Python (Python 3.9) if: contains(matrix.python, 'YES') - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: - python-version: 3.9 + python-version: '3.9' - name: Configure (Python 3.9) if: contains(matrix.python, 'YES') working-directory: build shell: bash run: > - cmake -DWANT_PYTHON_VERSION=3.9 + cmake -DWANT_PYTHON_VERSION=3.9 -DHAVE_PYTHON=YES -DPython_FIND_REGISTRY=NEVER -DPython_ROOT="$pythonLocation" . - name: Build (Python 3.9) if: contains(matrix.python, 'YES') @@ -312,6 +280,70 @@ jobs: $PYTHON_EXECUTABLE -m pytest ../tests --cov=. # END B + - name: Setup Python (Python 3.10) + if: contains(matrix.python, 'YES') + uses: actions/setup-python@v4 + with: + python-version: '3.10' + - name: Configure (Python 3.10) + if: contains(matrix.python, 'YES') + working-directory: build + shell: bash + run: > + cmake -DWANT_PYTHON_VERSION=3.10 -DHAVE_PYTHON=YES + -DPython_FIND_REGISTRY=NEVER -DPython_ROOT="$pythonLocation" . + - name: Build (Python 3.10) + if: contains(matrix.python, 'YES') + # BEGIN A + working-directory: build + run: cmake --build . --config ${{ matrix.config }} --parallel 4 + # END A + - name: Test (Python 3.10) + # BEGIN B + if: contains(matrix.python, 'YES') + working-directory: build + shell: bash + env: + PYTHONPATH: ${{ matrix.config }} + run: | + PYTHON_EXECUTABLE=$(grep 'Python_EXECUTABLE:' CMakeCache.txt | sed 's/.*=//') + $PYTHON_EXECUTABLE -m pip install pytest pytest-cov + export COVERAGE_FILE=.coverage.$RANDOM LLVM_PROFILE_FILE=$PWD/pid-%p.profraw + $PYTHON_EXECUTABLE -m pytest ../tests --cov=. + # END B + + - name: Setup Python (Python 3.11) + if: contains(matrix.python, 'YES') + uses: actions/setup-python@v4 + with: + python-version: '3.11' + - name: Configure (Python 3.11) + if: contains(matrix.python, 'YES') + working-directory: build + shell: bash + run: > + cmake -DWANT_PYTHON_VERSION=3.11 -DHAVE_PYTHON=YES + -DPython_FIND_REGISTRY=NEVER -DPython_ROOT="$pythonLocation" . + - name: Build (Python 3.11) + if: contains(matrix.python, 'YES') + # BEGIN A + working-directory: build + run: cmake --build . --config ${{ matrix.config }} --parallel 4 + # END A + - name: Test (Python 3.11) + # BEGIN B + if: contains(matrix.python, 'YES') + working-directory: build + shell: bash + env: + PYTHONPATH: ${{ matrix.config }} + run: | + PYTHON_EXECUTABLE=$(grep 'Python_EXECUTABLE:' CMakeCache.txt | sed 's/.*=//') + $PYTHON_EXECUTABLE -m pip install pytest pytest-cov + export COVERAGE_FILE=.coverage.$RANDOM LLVM_PROFILE_FILE=$PWD/pid-%p.profraw + $PYTHON_EXECUTABLE -m pytest ../tests --cov=. + # END B + - name: Upload coverage reports if: always() && matrix.config == 'Coverage' working-directory: build