mirror of
https://github.com/pyenv/pyenv.git
synced 2025-12-22 14:11:27 +09:00
CI: - Micropython-specific code from CPython-only branches
This commit is contained in:
parent
9b85239875
commit
4b33cb68b6
22
.github/workflows/modified_scripts_build.yml
vendored
22
.github/workflows/modified_scripts_build.yml
vendored
@ -121,24 +121,14 @@ jobs:
|
|||||||
pyenv --debug install ${{ matrix.python-version }} && rc=$? || rc=$?
|
pyenv --debug install ${{ matrix.python-version }} && rc=$? || rc=$?
|
||||||
if [[ $rc -ne 0 ]]; then echo config.log:; cat $TMPDIR/python-build*/*/config.log; false; fi
|
if [[ $rc -ne 0 ]]; then echo config.log:; cat $TMPDIR/python-build*/*/config.log; false; fi
|
||||||
pyenv global ${{ matrix.python-version }}
|
pyenv global ${{ matrix.python-version }}
|
||||||
# Micropython doesn't support --version
|
|
||||||
- run: |
|
- run: |
|
||||||
#print version
|
#print version
|
||||||
if [[ "${{ matrix.python-version }}" == "micropython-"* ]]; then
|
|
||||||
python -c 'import sys; print(sys.version)'
|
|
||||||
else
|
|
||||||
python --version
|
python --version
|
||||||
python -m pip --version
|
python -m pip --version
|
||||||
fi
|
|
||||||
# Micropython doesn't support sys.executable, os.path, older versions even os
|
|
||||||
- env:
|
- env:
|
||||||
EXPECTED_PYTHON: ${{ matrix.python-version }}
|
EXPECTED_PYTHON: ${{ matrix.python-version }}
|
||||||
run: |
|
run: |
|
||||||
#check
|
#check
|
||||||
if [[ "${{ matrix.python-version }}" == "micropython-"* ]]; then
|
|
||||||
[[ $(pyenv which python) == "${{ env.PYENV_ROOT }}/versions/${{ matrix.python-version }}/bin/python" ]] || exit 1
|
|
||||||
python -c 'import sys; assert sys.implementation.name == "micropython"'
|
|
||||||
else
|
|
||||||
python -c 'if True:
|
python -c 'if True:
|
||||||
import os, sys, os.path
|
import os, sys, os.path
|
||||||
correct_dir = os.path.join(
|
correct_dir = os.path.join(
|
||||||
@ -147,7 +137,6 @@ jobs:
|
|||||||
os.environ["EXPECTED_PYTHON"],
|
os.environ["EXPECTED_PYTHON"],
|
||||||
"bin")
|
"bin")
|
||||||
assert os.path.dirname(sys.executable) == correct_dir'
|
assert os.path.dirname(sys.executable) == correct_dir'
|
||||||
fi
|
|
||||||
# bundled executables in some Anaconda releases cause the post-run step to hang in MacOS
|
# bundled executables in some Anaconda releases cause the post-run step to hang in MacOS
|
||||||
- run: |
|
- run: |
|
||||||
pyenv global system
|
pyenv global system
|
||||||
@ -245,24 +234,14 @@ jobs:
|
|||||||
pyenv --debug install ${{ matrix.python-version }} && rc=$? || rc=$?
|
pyenv --debug install ${{ matrix.python-version }} && rc=$? || rc=$?
|
||||||
if [[ $rc -ne 0 ]]; then echo config.log:; cat $TMPDIR/python-build*/*/config.log; false; fi
|
if [[ $rc -ne 0 ]]; then echo config.log:; cat $TMPDIR/python-build*/*/config.log; false; fi
|
||||||
pyenv global ${{ matrix.python-version }}
|
pyenv global ${{ matrix.python-version }}
|
||||||
# Micropython doesn't support --version
|
|
||||||
- run: |
|
- run: |
|
||||||
#print version
|
#print version
|
||||||
if [[ "${{ matrix.python-version }}" == "micropython-"* ]]; then
|
|
||||||
python -c 'import sys; print(sys.version)'
|
|
||||||
else
|
|
||||||
python --version
|
python --version
|
||||||
python -m pip --version
|
python -m pip --version
|
||||||
fi
|
|
||||||
# Micropython doesn't support sys.executable, os.path, older versions even os
|
|
||||||
- env:
|
- env:
|
||||||
EXPECTED_PYTHON: ${{ matrix.python-version }}
|
EXPECTED_PYTHON: ${{ matrix.python-version }}
|
||||||
run: |
|
run: |
|
||||||
#check
|
#check
|
||||||
if [[ "${{ matrix.python-version }}" == "micropython-"* ]]; then
|
|
||||||
[[ $(pyenv which python) == "${{ env.PYENV_ROOT }}/versions/${{ matrix.python-version }}/bin/python" ]] || exit 1
|
|
||||||
python -c 'import sys; assert sys.implementation.name == "micropython"'
|
|
||||||
else
|
|
||||||
python -c 'if True:
|
python -c 'if True:
|
||||||
import os, sys, os.path
|
import os, sys, os.path
|
||||||
correct_dir = os.path.join(
|
correct_dir = os.path.join(
|
||||||
@ -271,4 +250,3 @@ jobs:
|
|||||||
os.environ["EXPECTED_PYTHON"],
|
os.environ["EXPECTED_PYTHON"],
|
||||||
"bin")
|
"bin")
|
||||||
assert os.path.dirname(sys.executable) == correct_dir'
|
assert os.path.dirname(sys.executable) == correct_dir'
|
||||||
fi
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user