mirror of
https://github.com/pyenv/pyenv.git
synced 2024-11-14 20:39:55 -05:00
CI: Install bootstrapper Python for PyPy source builds
This commit is contained in:
parent
cad18bb332
commit
49cc88094a
1 changed files with 29 additions and 11 deletions
40
.github/workflows/modified_scripts_build.yml
vendored
40
.github/workflows/modified_scripts_build.yml
vendored
|
@ -32,26 +32,35 @@ jobs:
|
|||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- run: |
|
||||
brew install openssl openssl@1.1 readline sqlite3 xz zlib
|
||||
- run: |
|
||||
#envvars
|
||||
export PYENV_ROOT="$GITHUB_WORKSPACE"
|
||||
echo "PYENV_ROOT=$PYENV_ROOT" >> $GITHUB_ENV
|
||||
echo "$PYENV_ROOT/shims:$PYENV_ROOT/bin" >> $GITHUB_PATH
|
||||
- run: |
|
||||
#prerequisites
|
||||
brew install openssl openssl@1.1 readline sqlite3 xz zlib
|
||||
if [[ "${{ matrix.python-version }}" =~ pypy.*-(src|dev) ]]; then
|
||||
pyenv install 2.7.18
|
||||
PYENV_VERSION=2.7.18 pip install curses genc pycparser
|
||||
fi
|
||||
- run: |
|
||||
#build
|
||||
pyenv install -v ${{ matrix.python-version }}
|
||||
pyenv global ${{ matrix.python-version }}
|
||||
# Micropython doesn't support --version
|
||||
- run: >
|
||||
- run: |
|
||||
#print version
|
||||
if [[ "${{ matrix.python-version }}" == "micropython-"* ]]; then
|
||||
python -c 'import sys; print(sys.version)'
|
||||
else
|
||||
python --version;
|
||||
python --version
|
||||
python -m pip --version
|
||||
fi
|
||||
# Micropython doesn't support sys.executable, os.path, older versions even os
|
||||
- env:
|
||||
EXPECTED_PYTHON: ${{ matrix.python-version }}
|
||||
run: |
|
||||
#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"'
|
||||
|
@ -82,29 +91,38 @@ jobs:
|
|||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- run: |
|
||||
sudo apt-get update -q; sudo apt-get install -yq make build-essential \
|
||||
libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev \
|
||||
curl llvm libncurses5-dev libncursesw5-dev \
|
||||
xz-utils tk-dev libffi-dev liblzma-dev
|
||||
- run: |
|
||||
#envvars
|
||||
export PYENV_ROOT="$GITHUB_WORKSPACE"
|
||||
echo "PYENV_ROOT=$PYENV_ROOT" >> $GITHUB_ENV
|
||||
echo "$PYENV_ROOT/shims:$PYENV_ROOT/bin" >> $GITHUB_PATH
|
||||
- run: |
|
||||
#prerequisites
|
||||
sudo apt-get update -q; sudo apt-get install -yq make build-essential \
|
||||
libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev \
|
||||
curl llvm libncurses5-dev libncursesw5-dev \
|
||||
xz-utils tk-dev libffi-dev liblzma-dev
|
||||
if [[ "${{ matrix.python-version }}" =~ pypy.*-(src|dev) ]]; then
|
||||
pyenv install 2.7.18
|
||||
PYENV_VERSION=2.7.18 pip install curses genc pycparser
|
||||
fi
|
||||
- run: |
|
||||
#build
|
||||
pyenv install -v ${{ matrix.python-version }}
|
||||
pyenv global ${{ matrix.python-version }}
|
||||
# Micropython doesn't support --version
|
||||
- run: >
|
||||
- run: |
|
||||
#print version
|
||||
if [[ "${{ matrix.python-version }}" == "micropython-"* ]]; then
|
||||
python -c 'import sys; print(sys.version)'
|
||||
else
|
||||
python --version;
|
||||
python --version
|
||||
python -m pip --version
|
||||
fi
|
||||
# Micropython doesn't support sys.executable, os.path, older versions even os
|
||||
- env:
|
||||
EXPECTED_PYTHON: ${{ matrix.python-version }}
|
||||
run: |
|
||||
#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"'
|
||||
|
|
Loading…
Reference in a new issue