CI: workaround MacOS jobs hanging for some Anaconda releases

Shims from executables bundled with some older Anaconda releases
cause MacOS script check jobs to hang at the end
This commit is contained in:
Ivan Pozdeev 2022-06-08 20:36:10 +03:00
parent e9f95065ad
commit 42cace010b

View file

@ -34,15 +34,15 @@ jobs:
- run: | - run: |
brew install openssl openssl@1.1 readline sqlite3 xz zlib brew install openssl openssl@1.1 readline sqlite3 xz zlib
- run: | - run: |
echo "PYENV_ROOT=$GITHUB_WORKSPACE" >> $GITHUB_ENV export PYENV_ROOT="$GITHUB_WORKSPACE"
- run: | echo "PYENV_ROOT=$PYENV_ROOT" >> $GITHUB_ENV
echo $PYENV_ROOT
echo "$PYENV_ROOT/shims:$PYENV_ROOT/bin" >> $GITHUB_PATH echo "$PYENV_ROOT/shims:$PYENV_ROOT/bin" >> $GITHUB_PATH
- run: | - run: |
pyenv install ${{ matrix.python-version }} pyenv install ${{ matrix.python-version }}
pyenv global ${{ matrix.python-version }} pyenv global ${{ matrix.python-version }}
- run: python --version - run: |
- run: python -m pip --version python --version
python -m pip --version
- shell: python # Prove that actual Python == expected Python - shell: python # Prove that actual Python == expected Python
env: env:
EXPECTED_PYTHON: ${{ matrix.python-version }} EXPECTED_PYTHON: ${{ matrix.python-version }}
@ -54,6 +54,10 @@ 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
# bundled executables in some Anaconda releases cause the post-run step to hang in MacOS
- run: |
pyenv global system
rm -f "$(pyenv root)"/shims/*
ubuntu_build: ubuntu_build:
needs: discover_modified_scripts needs: discover_modified_scripts
@ -72,9 +76,8 @@ jobs:
wget curl llvm libncurses5-dev libncursesw5-dev \ wget curl llvm libncurses5-dev libncursesw5-dev \
xz-utils tk-dev libffi-dev liblzma-dev python-openssl git xz-utils tk-dev libffi-dev liblzma-dev python-openssl git
- run: | - run: |
echo "PYENV_ROOT=$GITHUB_WORKSPACE" >> $GITHUB_ENV export PYENV_ROOT="$GITHUB_WORKSPACE"
- run: | echo "PYENV_ROOT=$PYENV_ROOT" >> $GITHUB_ENV
echo $PYENV_ROOT
echo "$PYENV_ROOT/shims:$PYENV_ROOT/bin" >> $GITHUB_PATH echo "$PYENV_ROOT/shims:$PYENV_ROOT/bin" >> $GITHUB_PATH
- run: | - run: |
pyenv install ${{ matrix.python-version }} pyenv install ${{ matrix.python-version }}