mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-26 09:56:17 +03:00
CI: Use alternatives to select python version (#4)
* CI: Use alternatives to select python version * CI: Specify full path to alternatives /usr/sbin isn't in PATH * DBG: Print uname to try to avoid bad pip install. pip>=22 on 32-bit Cygwin seems to cause problems installing coverage. I have no idea why this is, so I just skip upgrading pip there. * FIX: Fix syntax of conditional for 32-bit Cygwin I have no idea if it needs to be able to accept i386, but it will if it comes up. * FIX: Revert earlier debug change.
This commit is contained in:
parent
ce7489884f
commit
0b134250fa
|
@ -25,7 +25,7 @@ if [[ $(uname) != CYGWIN* ]]; then
|
||||||
cmake meson imagemagick libharfbuzz-dev libfribidi-dev
|
cmake meson imagemagick libharfbuzz-dev libfribidi-dev
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ $(uname -mo) != "i*86 Cygwin" ]]; then
|
if [[ $(uname -mo) != i*86" Cygwin" ]]; then
|
||||||
python3 -m pip install --upgrade pip
|
python3 -m pip install --upgrade pip
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
20
.github/workflows/test-cygwin.yml
vendored
20
.github/workflows/test-cygwin.yml
vendored
|
@ -54,9 +54,17 @@ jobs:
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-cygwin-${{ matrix.architecture }}-pip3.${{ matrix.python-minor-version }}-
|
${{ runner.os }}-cygwin-${{ matrix.architecture }}-pip3.${{ matrix.python-minor-version }}-
|
||||||
|
|
||||||
|
- name: Ensure correct python minor version used in scripts
|
||||||
|
shell: bash.exe -eo pipefail -o igncr "{0}"
|
||||||
|
run: |
|
||||||
|
/usr/sbin/alternatives --set python3 /usr/bin/python3.${{ matrix.python-minor-version }}
|
||||||
|
/usr/sbin/alternatives --display python3
|
||||||
|
/usr/sbin/alternatives --set python /usr/bin/python3.${{ matrix.python-minor-version }}
|
||||||
|
/usr/sbin/alternatives --display python
|
||||||
|
|
||||||
- name: Build system information
|
- name: Build system information
|
||||||
run: |
|
run: |
|
||||||
dash.exe -c "python3.${{ matrix.python-minor-version }} .github/workflows/system-info.py"
|
dash.exe -c "python3 .github/workflows/system-info.py"
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
|
@ -66,20 +74,20 @@ jobs:
|
||||||
if: matrix.architecture == 'x86_64'
|
if: matrix.architecture == 'x86_64'
|
||||||
shell: dash.exe -l "{0}"
|
shell: dash.exe -l "{0}"
|
||||||
run: |
|
run: |
|
||||||
python3.${{ matrix.python-minor-version }} -m pip install -U 'numpy!=1.21.*'
|
python3 -m pip install -U 'numpy!=1.21.*'
|
||||||
|
|
||||||
- name: Check imports
|
- name: Check imports
|
||||||
shell: dash.exe -l "{0}"
|
shell: dash.exe -l "{0}"
|
||||||
run: |
|
run: |
|
||||||
python3.${{ matrix.python-minor-version }} -c 'import numpy as np; print(np.__version__)'
|
python3 -c 'import numpy as np; print(np.__version__)'
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
shell: bash.exe -eo pipefail -o igncr "{0}"
|
shell: bash.exe -eo pipefail -o igncr "{0}"
|
||||||
run: |
|
run: |
|
||||||
python3.${{ matrix.python-minor-version }} -m coverage erase
|
python3 -m coverage erase
|
||||||
make clean
|
make clean
|
||||||
CFLAGS="-coverage -Werror=implicit-function-declaration" python3.${{ matrix.python-minor-version }} -m pip install -v --global-option="build_ext" .
|
CFLAGS="-coverage -Werror=implicit-function-declaration" python3 -m pip install -v --global-option="build_ext" .
|
||||||
python3.${{ matrix.python-minor-version }} selftest.py
|
python3 selftest.py
|
||||||
|
|
||||||
- name: Rebase dlls
|
- name: Rebase dlls
|
||||||
shell: bash.exe -eo pipefail -o igncr "{0}"
|
shell: bash.exe -eo pipefail -o igncr "{0}"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user