From ba25863302eb7257d63c15024366d21fd5f19f3a Mon Sep 17 00:00:00 2001 From: Kevin van Rijn Date: Sun, 12 Jan 2025 11:46:49 +0100 Subject: [PATCH] Use actions/setup-python --- .github/workflows/artifacts.yml | 24 ++++++++---------------- .github/workflows/jsonlint.yml | 12 ++++-------- 2 files changed, 12 insertions(+), 24 deletions(-) diff --git a/.github/workflows/artifacts.yml b/.github/workflows/artifacts.yml index d8f55cfce1..620efb9002 100644 --- a/.github/workflows/artifacts.yml +++ b/.github/workflows/artifacts.yml @@ -228,17 +228,13 @@ jobs: needs: artifacts if: needs.artifacts.result == 'success' steps: + - uses: actions/setup-python@v5.3.0 + with: + python-version: '3.11' - name: Build demjson shell: bash run: | - curl -sSo Python-3.11.11.tar.xz https://www.python.org/ftp/python/3.11.11/Python-3.11.11.tar.xz - tar -xJf Python-3.11.11.tar.xz - cd Python-3.11.11 - sudo ./configure --prefix=/opt/python/3.11.11/ --enable-optimizations --with-lto --with-computed-gotos --with-system-ffi - sudo make -j "$(nproc)" - sudo make altinstall - cd .. - rm Python-3.11.11.tar.xz + python -c "import sys; print(sys.version)" curl -sSo pip.pyz https://bootstrap.pypa.io/pip/pip.pyz python pip.pyz -V python pip.pyz install setuptools==57.5.0 @@ -352,17 +348,13 @@ jobs: needs: release if: needs.release.result == 'success' steps: + - uses: actions/setup-python@v5.3.0 + with: + python-version: '3.11' - name: Build demjson shell: bash run: | - curl -sSo Python-3.11.11.tar.xz https://www.python.org/ftp/python/3.11.11/Python-3.11.11.tar.xz - tar -xJf Python-3.11.11.tar.xz - cd Python-3.11.11 - sudo ./configure --prefix=/opt/python/3.11.11/ --enable-optimizations --with-lto --with-computed-gotos --with-system-ffi - sudo make -j "$(nproc)" - sudo make altinstall - cd .. - rm Python-3.11.11.tar.xz + python -c "import sys; print(sys.version)" curl -sSo pip.pyz https://bootstrap.pypa.io/pip/pip.pyz python pip.pyz -V python pip.pyz install setuptools==57.5.0 diff --git a/.github/workflows/jsonlint.yml b/.github/workflows/jsonlint.yml index 4dd871ec5b..e3c2917573 100644 --- a/.github/workflows/jsonlint.yml +++ b/.github/workflows/jsonlint.yml @@ -10,17 +10,13 @@ jobs: jsonlint: runs-on: ubuntu-latest steps: + - uses: actions/setup-python@v5.3.0 + with: + python-version: '3.11' - name: Build demjson shell: bash run: | - curl -sSo Python-3.11.11.tar.xz https://www.python.org/ftp/python/3.11.11/Python-3.11.11.tar.xz - tar -xJf Python-3.11.11.tar.xz - cd Python-3.11.11 - sudo ./configure --prefix=/opt/python/3.11.11/ --enable-optimizations --with-lto --with-computed-gotos --with-system-ffi - sudo make -j "$(nproc)" - sudo make altinstall - cd .. - rm Python-3.11.11.tar.xz + python -c "import sys; print(sys.version)" curl -sSo pip.pyz https://bootstrap.pypa.io/pip/pip.pyz python pip.pyz -V python pip.pyz install setuptools==57.5.0