]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
Improve github action workflows
authorFederico Caselli <cfederico87@gmail.com>
Mon, 27 Jul 2020 20:31:29 +0000 (22:31 +0200)
committerFederico Caselli <cfederico87@gmail.com>
Mon, 27 Jul 2020 20:44:55 +0000 (22:44 +0200)
- in create wheel set minimum versions of setuptools and wheel to avoid
  failure in python 3.5 with metadata configured in setup.cfg
- update action versions
- test also cext in the pull requests

Change-Id: Iaa5e4e4000c7faa688b51f2f41428c7dd7cae9c3
(cherry picked from commit 8e89f040391cddad1bec9002bbb6b3c39f43445e)

.github/workflows/create-wheels.yaml
.github/workflows/run-on-pr.yaml
.github/workflows/run-test.yaml

index e551e3a338d7315499532332cdb093c592fa47ac..1861353a68ad6d34305557b3b882eb426621a68a 100644 (file)
@@ -47,7 +47,7 @@ jobs:
         uses: actions/checkout@v2
 
       - name: Set up Python
-        uses: actions/setup-python@v1
+        uses: actions/setup-python@v2
         with:
           python-version: ${{ matrix.python-version }}
           architecture: ${{ matrix.architecture }}
@@ -72,7 +72,7 @@ jobs:
         run: |
           python -m pip install --upgrade pip
           pip --version
-          pip install setuptools wheel
+          pip install setuptools>=44 wheel>=0.34
           pip wheel -w dist --no-use-pep517 -v --no-deps .
 
       - name: Install wheel
@@ -116,7 +116,7 @@ jobs:
 
       - name: Set up Python for twine
         # twine on py2 is very old and is no longer updated, so we change to python 3.8 before upload
-        uses: actions/setup-python@v1
+        uses: actions/setup-python@v2
         with:
           python-version: "3.8"
 
@@ -161,7 +161,7 @@ jobs:
     steps:
       - name: Checkout repo
         uses: actions/checkout@v2
-      
+
       - name: Get python version
         id: linux-py-version
         env:
@@ -174,9 +174,9 @@ jobs:
           echo "::set-output name=python-version::$version"
 
       - name: Set up Python
-        uses: actions/setup-python@v1
+        uses: actions/setup-python@v2
         with:
-          python-version: ${{  steps.linux-py-version.outputs.python-version }}
+          python-version: ${{ steps.linux-py-version.outputs.python-version }}
           architecture: ${{ matrix.architecture }}
 
       - name: Remove tag_build from setup.cfg
@@ -196,17 +196,16 @@ jobs:
         # this step uses the image provided by pypa here https://github.com/pypa/manylinux to generate the wheels on linux
         # the action uses the image for manylinux2010 but can generate also a manylinux1 wheel
         # change the tag of this image to change the image used
-        # NOTE: the output folder is "wheelhouse", not the classic "dist"
-        uses: RalfG/python-wheels-manylinux-build@v0.2.2-manylinux2010_x86_64
-        # this action generates 3 wheels in wheelhouse/. linux, manylinux1 and manylinux2010
+        uses: RalfG/python-wheels-manylinux-build@v0.3-manylinux2010_x86_64
+        # this action generates 3 wheels in dist/. linux, manylinux1 and manylinux2010
         with:
           # python-versions is the output of the previous step and is in the form <python tag>-<abi tag>. Eg cp37-cp37mu
           python-versions: ${{ matrix.python-version }}
-          build-requirements: "setuptools wheel"
+          build-requirements: "setuptools>=44 wheel>=0.34"
           # Create the wheel using --no-use-pep517 since locally we have pyproject
           # This flag should be removed once sqlalchemy supports pep517
           # `--no-deps` is used to only generate the wheel for the current library. Redundant in sqlalchemy since it has no dependencies
-          pip-wheel-args: "--no-use-pep517 -v --no-deps"
+          pip-wheel-args: "-w ./dist --no-use-pep517 -v --no-deps"
 
       - name: Check created wheel
         # check that the wheel is compatible with the current installation.
@@ -220,7 +219,7 @@ jobs:
           echo Wheel tag ${{ matrix.python-version }}. Installed version $version.
           if [[ "${{ matrix.python-version }}" = "$version" ]]
           then
-            pip install -f wheelhouse --no-index sqlalchemy
+            pip install -f dist --no-index sqlalchemy
             python -c 'from sqlalchemy import cprocessors, cresultproxy, cutils'
             pip install pytest pytest-xdist ${{ matrix.extra-requires }}
             pytest -n2 -q test -k 'not MockReconnectTest' --nomemory
@@ -234,7 +233,7 @@ jobs:
         # the wheel creation step generates 3 wheels: linux, manylinux1 and manylinux2010
         # Pypi accepts only the manylinux versions
         run: |
-          cd wheelhouse
+          cd dist
           echo ::set-output name=wheel1::`ls *manylinux1*`
           echo ::set-output name=wheel2010::`ls *manylinux2010*`
 
@@ -247,7 +246,7 @@ jobs:
           # this is a release to the event is called release: https://help.github.com/en/actions/reference/events-that-trigger-workflows#release-event-release
           # the release event has the structure of this response https://developer.github.com/v3/repos/releases/#create-a-release
           upload_url: ${{ github.event.release.upload_url }}
-          asset_path: wheelhouse/${{ steps.wheel-name.outputs.wheel1 }}
+          asset_path: dist/${{ steps.wheel-name.outputs.wheel1 }}
           asset_name: ${{ steps.wheel-name.outputs.wheel1 }}
           asset_content_type: application/zip # application/octet-stream
 
@@ -260,13 +259,13 @@ jobs:
           # this is a release to the event is called release: https://help.github.com/en/actions/reference/events-that-trigger-workflows#release-event-release
           # the release event has the structure of this response https://developer.github.com/v3/repos/releases/#create-a-release
           upload_url: ${{ github.event.release.upload_url }}
-          asset_path: wheelhouse/${{ steps.wheel-name.outputs.wheel2010 }}
+          asset_path: dist/${{ steps.wheel-name.outputs.wheel2010 }}
           asset_name: ${{ steps.wheel-name.outputs.wheel2010 }}
           asset_content_type: application/zip # application/octet-stream
 
       - name: Set up Python for twine
         # twine on py2 is very old and is no longer updated, so we change to python 3.8 before upload
-        uses: actions/setup-python@v1
+        uses: actions/setup-python@v2
         with:
           python-version: "3.8"
 
@@ -283,4 +282,4 @@ jobs:
           TWINE_PASSWORD: ${{ secrets.pypi_token }}
         run: |
           pip install -U twine
-          twine upload --skip-existing wheelhouse/*manylinux*
+          twine upload --skip-existing dist/*manylinux*
index 3569105c3ea47f8647b776a37a433c8147d9dd79..53b4f5a0952cf5f8ba2192f9b8b308f32e9e1a33 100644 (file)
@@ -25,6 +25,7 @@ jobs:
         python-version:
           - "3.8"
         build-type:
+          - "cext"
           - "nocext"
         architecture:
           - x64
@@ -37,7 +38,7 @@ jobs:
         uses: actions/checkout@v2
 
       - name: Set up python
-        uses: actions/setup-python@v1
+        uses: actions/setup-python@v2
         with:
           python-version: ${{ matrix.python-version }}
           architecture: ${{ matrix.architecture }}
@@ -45,7 +46,8 @@ jobs:
       - name: Install dependencies
         run: |
           python -m pip install --upgrade pip
-          pip install tox
+          pip install --upgrade tox setuptools
+          pip list
 
       - name: Run tests
         run: tox -e github-${{ matrix.build-type }} -- -q --nomemory ${{ matrix.pytest-args }}
index 12b5ebafd47217ba2073150988baa1dd79511caf..6a10b9626f189880cc8d665d74714924ef7605d9 100644 (file)
@@ -74,7 +74,7 @@ jobs:
         uses: actions/checkout@v2
 
       - name: Set up python
-        uses: actions/setup-python@v1
+        uses: actions/setup-python@v2
         with:
           python-version: ${{ matrix.python-version }}
           architecture: ${{ matrix.architecture }}