2022-05-03 20:08:46 -04:00
|
|
|
name: ubuntu_build
|
2021-01-27 05:33:06 -05:00
|
|
|
on: [pull_request, push]
|
2022-11-09 20:46:55 -05:00
|
|
|
|
|
|
|
permissions:
|
|
|
|
contents: read # to fetch code (actions/checkout)
|
|
|
|
|
2021-01-27 05:33:06 -05:00
|
|
|
jobs:
|
2022-05-03 20:08:46 -04:00
|
|
|
ubuntu_build:
|
2021-01-27 05:33:06 -05:00
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
2021-05-04 08:48:39 -04:00
|
|
|
python-version:
|
2022-10-29 20:38:40 -04:00
|
|
|
- "3.7"
|
|
|
|
- "3.8"
|
|
|
|
- "3.9"
|
|
|
|
- "3.10"
|
2022-11-18 14:55:06 -05:00
|
|
|
- "3.11"
|
2022-09-03 18:40:00 -04:00
|
|
|
runs-on: ubuntu-22.04
|
2021-01-27 05:33:06 -05:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
# Normally, we would use the superbly maintained...
|
|
|
|
# - uses: actions/setup-python@v2
|
|
|
|
# with:
|
|
|
|
# python-version: ${{ matrix.python-version }}
|
|
|
|
# ... but in the repo, we want to test pyenv builds on Ubuntu
|
|
|
|
- run: |
|
2022-09-03 18:40:00 -04:00
|
|
|
sudo apt-get install -yq make build-essential libssl-dev zlib1g-dev \
|
|
|
|
libbz2-dev libreadline-dev libsqlite3-dev curl \
|
|
|
|
libncursesw5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev
|
2021-02-24 04:31:10 -05:00
|
|
|
# https://github.com/pyenv/pyenv#installation
|
2021-02-24 06:07:27 -05:00
|
|
|
- run: pwd
|
2021-03-02 06:54:20 -05:00
|
|
|
- env:
|
|
|
|
PYENV_ROOT: /home/runner/work/pyenv/pyenv
|
|
|
|
run: |
|
|
|
|
echo $PYENV_ROOT
|
|
|
|
echo "$PYENV_ROOT/shims:$PYENV_ROOT/bin" >> $GITHUB_PATH
|
2022-09-03 14:43:05 -04:00
|
|
|
bin/pyenv install -v ${{ matrix.python-version }}
|
2021-03-02 06:49:09 -05:00
|
|
|
bin/pyenv global ${{ matrix.python-version }}
|
|
|
|
bin/pyenv rehash
|
2021-03-02 06:23:44 -05:00
|
|
|
- run: python --version
|
|
|
|
- run: python -m pip --version
|
2021-03-03 07:26:08 -05:00
|
|
|
- shell: python # Prove that actual Python == expected Python
|
|
|
|
env:
|
|
|
|
EXPECTED_PYTHON: ${{ matrix.python-version }}
|
|
|
|
run: import os, sys ; assert sys.version.startswith(os.getenv("EXPECTED_PYTHON"))
|