From 63a6f1bec4523452b959632d8ff186134f542483 Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Tue, 2 Mar 2021 12:15:18 +0100 Subject: [PATCH 01/10] GitHub Actions: Add $PYENV_ROOT/shims to $PATH --- .github/workflows/ubuntu_tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ubuntu_tests.yml b/.github/workflows/ubuntu_tests.yml index 3d33e647..76be61ba 100644 --- a/.github/workflows/ubuntu_tests.yml +++ b/.github/workflows/ubuntu_tests.yml @@ -24,7 +24,7 @@ jobs: PYENV_ROOT: /home/runner/work/pyenv/pyenv run: | echo $PYENV_ROOT - echo "$HOME/bin" >> $GITHUB_PATH + echo "$PYENV_ROOT/shims:$PYENV_ROOT/bin" >> $GITHUB_PATH bin/pyenv install ${{ matrix.python-version }} bin/pyenv global ${{ matrix.python-version }} bin/pyenv rehash From acb5f572b2a2c1d85e227c09918669141972dbdd Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Tue, 2 Mar 2021 12:23:44 +0100 Subject: [PATCH 02/10] echo $GITHUB_PATH --- .github/workflows/ubuntu_tests.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/ubuntu_tests.yml b/.github/workflows/ubuntu_tests.yml index 76be61ba..1098ca6a 100644 --- a/.github/workflows/ubuntu_tests.yml +++ b/.github/workflows/ubuntu_tests.yml @@ -25,8 +25,11 @@ jobs: run: | echo $PYENV_ROOT echo "$PYENV_ROOT/shims:$PYENV_ROOT/bin" >> $GITHUB_PATH + echo $GITHUB_PATH bin/pyenv install ${{ matrix.python-version }} bin/pyenv global ${{ matrix.python-version }} bin/pyenv rehash python --version python -m pip --version + - run: python --version + - run: python -m pip --version From 66ba35817b0a11d7d657d8d8900f79e9fbc1073b Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Tue, 2 Mar 2021 12:36:19 +0100 Subject: [PATCH 03/10] Separate pyenv install, pyenv global, pyenv rehash --- .github/workflows/ubuntu_tests.yml | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ubuntu_tests.yml b/.github/workflows/ubuntu_tests.yml index 1098ca6a..9dc088a3 100644 --- a/.github/workflows/ubuntu_tests.yml +++ b/.github/workflows/ubuntu_tests.yml @@ -20,16 +20,13 @@ jobs: xz-utils tk-dev libffi-dev liblzma-dev python-openssl git # https://github.com/pyenv/pyenv#installation - run: pwd - - env: - PYENV_ROOT: /home/runner/work/pyenv/pyenv - run: | - echo $PYENV_ROOT - echo "$PYENV_ROOT/shims:$PYENV_ROOT/bin" >> $GITHUB_PATH - echo $GITHUB_PATH - bin/pyenv install ${{ matrix.python-version }} - bin/pyenv global ${{ matrix.python-version }} - bin/pyenv rehash - python --version - python -m pip --version + #- env: + # PYENV_ROOT: /home/runner/work/pyenv/pyenv + # run: | + # echo $PYENV_ROOT + - run: PYENV_ROOT=$(pwd) echo "$PYENV_ROOT/shims:$PYENV_ROOT/bin" >> $GITHUB_PATH + - run: bin/pyenv install ${{ matrix.python-version }} + - run: bin/pyenv global ${{ matrix.python-version }} + - run: bin/pyenv rehash - run: python --version - run: python -m pip --version From 9e4ead1f931574f8966208a5a0feb112275f810e Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Tue, 2 Mar 2021 12:42:17 +0100 Subject: [PATCH 04/10] echo "$PYENV_ROOT/shims:$PYENV_ROOT/bin" >> $GITHUB_PATH --- .github/workflows/ubuntu_tests.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ubuntu_tests.yml b/.github/workflows/ubuntu_tests.yml index 9dc088a3..5ea9b593 100644 --- a/.github/workflows/ubuntu_tests.yml +++ b/.github/workflows/ubuntu_tests.yml @@ -20,11 +20,11 @@ jobs: xz-utils tk-dev libffi-dev liblzma-dev python-openssl git # https://github.com/pyenv/pyenv#installation - run: pwd - #- env: - # PYENV_ROOT: /home/runner/work/pyenv/pyenv - # run: | - # echo $PYENV_ROOT - - run: PYENV_ROOT=$(pwd) echo "$PYENV_ROOT/shims:$PYENV_ROOT/bin" >> $GITHUB_PATH + - env: + PYENV_ROOT: /home/runner/work/pyenv/pyenv + run: | + echo $PYENV_ROOT + echo "$PYENV_ROOT/shims:$PYENV_ROOT/bin" >> $GITHUB_PATH - run: bin/pyenv install ${{ matrix.python-version }} - run: bin/pyenv global ${{ matrix.python-version }} - run: bin/pyenv rehash From c20aad5ef9a0ee3ff993240bd77e20e4569d08a6 Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Tue, 2 Mar 2021 12:49:09 +0100 Subject: [PATCH 05/10] Update ubuntu_tests.yml --- .github/workflows/ubuntu_tests.yml | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ubuntu_tests.yml b/.github/workflows/ubuntu_tests.yml index 5ea9b593..a8bc69ad 100644 --- a/.github/workflows/ubuntu_tests.yml +++ b/.github/workflows/ubuntu_tests.yml @@ -20,13 +20,15 @@ jobs: xz-utils tk-dev libffi-dev liblzma-dev python-openssl git # https://github.com/pyenv/pyenv#installation - run: pwd - - env: - PYENV_ROOT: /home/runner/work/pyenv/pyenv - run: | - echo $PYENV_ROOT - echo "$PYENV_ROOT/shims:$PYENV_ROOT/bin" >> $GITHUB_PATH - - run: bin/pyenv install ${{ matrix.python-version }} - - run: bin/pyenv global ${{ matrix.python-version }} - - run: bin/pyenv rehash + #- env: + # PYENV_ROOT: /home/runner/work/pyenv/pyenv + # run: | + # echo $PYENV_ROOT + # echo "$PYENV_ROOT/shims:$PYENV_ROOT/bin" >> $GITHUB_PATH + - run: PYENV_ROOT=$(pwd) echo "$PYENV_ROOT/shims:$PYENV_ROOT/bin" >> $GITHUB_PATH + - run: | + bin/pyenv install ${{ matrix.python-version }} + bin/pyenv global ${{ matrix.python-version }} + bin/pyenv rehash - run: python --version - run: python -m pip --version From 6e74abc42a244a11e92a92454cdd21fb8bdda098 Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Tue, 2 Mar 2021 12:54:20 +0100 Subject: [PATCH 06/10] Update ubuntu_tests.yml --- .github/workflows/ubuntu_tests.yml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ubuntu_tests.yml b/.github/workflows/ubuntu_tests.yml index a8bc69ad..56df456f 100644 --- a/.github/workflows/ubuntu_tests.yml +++ b/.github/workflows/ubuntu_tests.yml @@ -20,12 +20,11 @@ jobs: xz-utils tk-dev libffi-dev liblzma-dev python-openssl git # https://github.com/pyenv/pyenv#installation - run: pwd - #- env: - # PYENV_ROOT: /home/runner/work/pyenv/pyenv - # run: | - # echo $PYENV_ROOT - # echo "$PYENV_ROOT/shims:$PYENV_ROOT/bin" >> $GITHUB_PATH - - run: PYENV_ROOT=$(pwd) echo "$PYENV_ROOT/shims:$PYENV_ROOT/bin" >> $GITHUB_PATH + - env: + PYENV_ROOT: /home/runner/work/pyenv/pyenv + run: | + echo $PYENV_ROOT + echo "$PYENV_ROOT/shims:$PYENV_ROOT/bin" >> $GITHUB_PATH - run: | bin/pyenv install ${{ matrix.python-version }} bin/pyenv global ${{ matrix.python-version }} From 5ca0900a235ed16c1027079349a5b8d08fc17bf9 Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Tue, 2 Mar 2021 13:06:26 +0100 Subject: [PATCH 07/10] Update ubuntu_tests.yml --- .github/workflows/ubuntu_tests.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/ubuntu_tests.yml b/.github/workflows/ubuntu_tests.yml index 56df456f..5e7862b1 100644 --- a/.github/workflows/ubuntu_tests.yml +++ b/.github/workflows/ubuntu_tests.yml @@ -25,7 +25,6 @@ jobs: run: | echo $PYENV_ROOT echo "$PYENV_ROOT/shims:$PYENV_ROOT/bin" >> $GITHUB_PATH - - run: | bin/pyenv install ${{ matrix.python-version }} bin/pyenv global ${{ matrix.python-version }} bin/pyenv rehash From 9212585098b91eed7fc813ced71051581bbb030e Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Tue, 2 Mar 2021 13:19:57 +0100 Subject: [PATCH 08/10] Update ubuntu_tests.yml --- .github/workflows/ubuntu_tests.yml | 32 ++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/.github/workflows/ubuntu_tests.yml b/.github/workflows/ubuntu_tests.yml index 5e7862b1..472c01ac 100644 --- a/.github/workflows/ubuntu_tests.yml +++ b/.github/workflows/ubuntu_tests.yml @@ -1,5 +1,26 @@ name: ubuntu_tests on: [pull_request, push] +jobs: + ubuntu_tests: + strategy: + fail-fast: false + matrix: + python-version: [2.7.18, 3.5.10, 3.6.13, 3.7.10, 3.8.8, 3.9.2] # 2.7.6, 3.4.10, + runs-on: Ubuntu-20.04 + 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: | + sudo apt-get install -y build-essential libssl-dev zlib1g-dev libbz2-dev \ + libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev \ + xz-utils tk-dev libffi-dev liblzma-dev python-openssl git + # https://github.com/pyenv/pyenv#installation + - run: pwdname: ubuntu_tests +on: [pull_request, push] jobs: ubuntu_tests: strategy: @@ -30,3 +51,14 @@ jobs: bin/pyenv rehash - run: python --version - run: python -m pip --version + + - env: + PYENV_ROOT: /home/runner/work/pyenv/pyenv + run: | + echo $PYENV_ROOT + echo "$PYENV_ROOT/shims:$PYENV_ROOT/bin" >> $GITHUB_PATH + bin/pyenv install ${{ matrix.python-version }} + bin/pyenv global ${{ matrix.python-version }} + bin/pyenv rehash + - run: python --version + - run: python -m pip --version From 45b99abec6bebd2c0cd8b222b281676b0bbe243f Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Tue, 2 Mar 2021 13:21:20 +0100 Subject: [PATCH 09/10] Update ubuntu_tests.yml --- .github/workflows/ubuntu_tests.yml | 32 ------------------------------ 1 file changed, 32 deletions(-) diff --git a/.github/workflows/ubuntu_tests.yml b/.github/workflows/ubuntu_tests.yml index 472c01ac..5e7862b1 100644 --- a/.github/workflows/ubuntu_tests.yml +++ b/.github/workflows/ubuntu_tests.yml @@ -1,26 +1,5 @@ name: ubuntu_tests on: [pull_request, push] -jobs: - ubuntu_tests: - strategy: - fail-fast: false - matrix: - python-version: [2.7.18, 3.5.10, 3.6.13, 3.7.10, 3.8.8, 3.9.2] # 2.7.6, 3.4.10, - runs-on: Ubuntu-20.04 - 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: | - sudo apt-get install -y build-essential libssl-dev zlib1g-dev libbz2-dev \ - libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev \ - xz-utils tk-dev libffi-dev liblzma-dev python-openssl git - # https://github.com/pyenv/pyenv#installation - - run: pwdname: ubuntu_tests -on: [pull_request, push] jobs: ubuntu_tests: strategy: @@ -51,14 +30,3 @@ jobs: bin/pyenv rehash - run: python --version - run: python -m pip --version - - - env: - PYENV_ROOT: /home/runner/work/pyenv/pyenv - run: | - echo $PYENV_ROOT - echo "$PYENV_ROOT/shims:$PYENV_ROOT/bin" >> $GITHUB_PATH - bin/pyenv install ${{ matrix.python-version }} - bin/pyenv global ${{ matrix.python-version }} - bin/pyenv rehash - - run: python --version - - run: python -m pip --version From f75e0284010e2922a63c772bc090a8bfc168c4b8 Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Wed, 3 Mar 2021 13:26:08 +0100 Subject: [PATCH 10/10] Prove that actual Python == expected Python --- .github/workflows/ubuntu_tests.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/ubuntu_tests.yml b/.github/workflows/ubuntu_tests.yml index 5e7862b1..2343748c 100644 --- a/.github/workflows/ubuntu_tests.yml +++ b/.github/workflows/ubuntu_tests.yml @@ -30,3 +30,7 @@ jobs: bin/pyenv rehash - run: python --version - run: python -m pip --version + - 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"))