Update sandbox.yml #42
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Python test bitness | |
on: | |
push: | |
branches: | |
- venv-reproducer | |
workflow_dispatch: | |
# allow manual runs on branches without a PR | |
jobs: | |
venv: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "3.11" | |
- name: test | |
run: | | |
set -x | |
fail_venv=0 | |
fail_virtualenv=0 | |
sudo apt-get update &>/dev/null | |
sudo apt-get install -y python3-distutils &>/dev/null | |
python3 -m pip install virtualenv | |
python3 -m venv cp311-1 | |
cat cp311-1/pyvenv.cfg | |
cp311-1/bin/python -sSEc 'import sys; print(sys.path)' | |
python3 -m virtualenv cp311-2 | |
cat cp311-2/pyvenv.cfg | |
cp311-2/bin/python -sSEc 'import sys; print(sys.path)' | |
ln -sf $(which python3) /usr/local/bin/python3 | |
/usr/local/bin/python3 -m venv cp311-3 || fail_venv=1 | |
cat cp311-3/pyvenv.cfg | |
cp311-3/bin/python -sSEc 'import sys; print(sys.path)' | |
/usr/local/bin/python3 -m virtualenv cp311-4 || fail_virtualenv=1 | |
cp311-4/bin/python -c 'import subprocess' || fail_virtualenv=1 | |
cat cp311-4/pyvenv.cfg | |
cp311-4/bin/python -sSEc 'import sys; print(sys.path)' | |
exit $(( $fail_venv + $fail_virtualenv )) |