From efeaffbc96f5e9f9be5367808b17538d544234bb Mon Sep 17 00:00:00 2001 From: Inada Naoki Date: Wed, 24 Nov 2021 21:32:49 +0900 Subject: [PATCH 01/18] refresh ci settings. --- .github/workflows/black.yaml | 2 +- .github/workflows/mac.yml | 13 +++++---- .github/workflows/windows.yaml | 2 +- appveyor.yml | 50 ---------------------------------- ci/runtests.sh | 2 +- 5 files changed, 11 insertions(+), 58 deletions(-) delete mode 100644 appveyor.yml diff --git a/.github/workflows/black.yaml b/.github/workflows/black.yaml index c5459539..2961ed35 100644 --- a/.github/workflows/black.yaml +++ b/.github/workflows/black.yaml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Setup Python - uses: actions/setup-python@v1 + uses: actions/setup-python@v2 with: python-version: '3.x' architecture: 'x64' diff --git a/.github/workflows/mac.yml b/.github/workflows/mac.yml index 85844e7a..56cbb848 100644 --- a/.github/workflows/mac.yml +++ b/.github/workflows/mac.yml @@ -1,6 +1,8 @@ name: Build macOS Wheels on: push: + branches: + - main create: jobs: @@ -9,13 +11,14 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v1 + uses: actions/checkout@v2 # Python 3.9 - name: Set up Python 3.9 - uses: actions/setup-python@v1 + uses: actions/setup-python@v2 with: python-version: "3.9" + cache: "pip" - name: Cythonize run: | @@ -38,7 +41,7 @@ jobs: # Python 3.10 - name: Set up Python 3.10 - uses: actions/setup-python@v1 + uses: actions/setup-python@v2 with: python-version: "3.10" @@ -50,7 +53,7 @@ jobs: # Python 3.8 - name: Set up Python 3.8 - uses: actions/setup-python@v1 + uses: actions/setup-python@v2 with: python-version: "3.8" @@ -62,7 +65,7 @@ jobs: # Python 3.7 - name: Set up Python 3.7 - uses: actions/setup-python@v1 + uses: actions/setup-python@v2 with: python-version: "3.7" diff --git a/.github/workflows/windows.yaml b/.github/workflows/windows.yaml index 0ce50f58..8a18392a 100644 --- a/.github/workflows/windows.yaml +++ b/.github/workflows/windows.yaml @@ -13,7 +13,7 @@ jobs: runs-on: windows-latest steps: - name: Checkout - uses: actions/checkout@v1 + uses: actions/checkout@v2 - name: Cythonize shell: bash diff --git a/appveyor.yml b/appveyor.yml deleted file mode 100644 index f338e177..00000000 --- a/appveyor.yml +++ /dev/null @@ -1,50 +0,0 @@ -environment: - matrix: - # For Python versions available on Appveyor, see - # http://www.appveyor.com/docs/installed-software#python - - PYTHON: "C:\\Python36" - -install: - # We need wheel installed to build wheels - - "%PYTHON%\\python.exe -m pip install -U pip" - - "%PYTHON%\\python.exe -m pip install -U cython" - - "%PYTHON%\\Scripts\\cython --cplus msgpack/_cmsgpack.pyx" - -build: off - -test_script: - # Put your test command here. - # Note that you must use the environment variable %PYTHON% to refer to - # the interpreter you're using - Appveyor does not do anything special - # to put the Python version you want to use on PATH. - - set PYTHON="C:\\Python27" - - ci\\runtests.bat - - set PYTHON="C:\\Python27-x64" - - ci\\runtests.bat - - set PYTHON="C:\\Python36" - - ci\\runtests.bat - - set PYTHON="C:\\Python36-x64" - - ci\\runtests.bat - - set PYTHON="C:\\Python37" - - ci\\runtests.bat - - set PYTHON="C:\\Python37-x64" - - ci\\runtests.bat - - set PYTHON="C:\\Python38" - - ci\\runtests.bat - - set PYTHON="C:\\Python38-x64" - - ci\\runtests.bat - -after_test: - # This step builds your wheels. - # Again, you need to use %PYTHON% to get the correct interpreter - -artifacts: - # bdist_wheel puts your built wheel in the dist directory - - path: dist\*.whl - -#on_success: -# You can use this step to upload your artifacts to a public website. -# See Appveyor's documentation for more details. Or you can simply -# access your wheels from the Appveyor "artifacts" tab for your build. - -# vim: set shiftwidth=2 diff --git a/ci/runtests.sh b/ci/runtests.sh index 5d87f696..1afcb74c 100644 --- a/ci/runtests.sh +++ b/ci/runtests.sh @@ -4,5 +4,5 @@ ${PYTHON} -VV ${PYTHON} -m pip install setuptools wheel pytest ${PYTHON} setup.py build_ext -if ${PYTHON} -c "from msgpack import _cmsgpack" -${PYTHON} setup.py bdist_wheel ${PYTHON} -m pytest -v test +${PYTHON} -m build From 8227a61f04846faec3cf14693d7375888aeae9b7 Mon Sep 17 00:00:00 2001 From: Inada Naoki Date: Wed, 24 Nov 2021 21:39:38 +0900 Subject: [PATCH 02/18] update runtests.sh --- ci/runtests.bat | 9 --------- ci/runtests.sh | 2 +- 2 files changed, 1 insertion(+), 10 deletions(-) delete mode 100644 ci/runtests.bat diff --git a/ci/runtests.bat b/ci/runtests.bat deleted file mode 100644 index 4ae2f708..00000000 --- a/ci/runtests.bat +++ /dev/null @@ -1,9 +0,0 @@ -%PYTHON%\python.exe -m pip install -U pip wheel pytest -%PYTHON%\python.exe setup.py build_ext -i -%PYTHON%\python.exe setup.py install -%PYTHON%\python.exe -c "import sys; print(hex(sys.maxsize))" -%PYTHON%\python.exe -c "from msgpack import _cmsgpack" -%PYTHON%\python.exe setup.py bdist_wheel -%PYTHON%\python.exe -m pytest -v test -SET EL=%ERRORLEVEL% -exit /b %EL% diff --git a/ci/runtests.sh b/ci/runtests.sh index 1afcb74c..f71e5e70 100644 --- a/ci/runtests.sh +++ b/ci/runtests.sh @@ -1,7 +1,7 @@ #!/bin/bash set -ex ${PYTHON} -VV -${PYTHON} -m pip install setuptools wheel pytest +${PYTHON} -m pip install setuptools wheel pytest build ${PYTHON} setup.py build_ext -if ${PYTHON} -c "from msgpack import _cmsgpack" ${PYTHON} -m pytest -v test From ba7102e449e2503757db3d9d34d3383618cd0430 Mon Sep 17 00:00:00 2001 From: Inada Naoki Date: Thu, 25 Nov 2021 11:19:34 +0900 Subject: [PATCH 03/18] Try cibuildwheel on Windows --- .github/workflows/windows.yaml | 73 +++------------------------------- 1 file changed, 6 insertions(+), 67 deletions(-) diff --git a/.github/workflows/windows.yaml b/.github/workflows/windows.yaml index 8a18392a..3f07a794 100644 --- a/.github/workflows/windows.yaml +++ b/.github/workflows/windows.yaml @@ -22,78 +22,17 @@ jobs: make cython #python setup.py sdist - - name: Python 3.6 (amd64) - env: - PYTHON: "py -3.6-64" - shell: bash - run: | - ci/runtests.sh - - - name: Python 3.6 (x86) - env: - PYTHON: "py -3.6-32" - shell: bash - run: | - ci/runtests.sh - - - name: Python 3.7 (amd64) - env: - PYTHON: "py -3.7-64" - shell: bash - run: | - ci/runtests.sh - - - name: Python 3.7 (x86) - env: - PYTHON: "py -3.7-32" - shell: bash - run: | - ci/runtests.sh - - - name: Python 3.8 (amd64) - env: - PYTHON: "py -3.8-64" - shell: bash - run: | - ci/runtests.sh - - - name: Python 3.8 (x86) - env: - PYTHON: "py -3.8-32" - shell: bash - run: | - ci/runtests.sh - - - name: Python 3.9 (amd64) - env: - PYTHON: "py -3.9-64" - shell: bash - run: | - ci/runtests.sh - - - name: Python 3.9 (x86) - env: - PYTHON: "py -3.9-32" + - name: Build wheels shell: bash - run: | - ci/runtests.sh - - - name: Python 3.10 (amd64) env: - PYTHON: "py -3.10-64" - shell: bash - run: | - ci/runtests.sh - - - name: Python 3.10 (x86) - env: - PYTHON: "py -3.10-32" - shell: bash + CIBW_TEST_REQUIRES: "pytest" + CIBW_TEST_COMMAND: "pytest {package}/test" run: | - ci/runtests.sh + python -m pip install cibuildwheel + python -m cibuildwheel - name: Upload Wheels uses: actions/upload-artifact@v1 with: name: win-wheels - path: ./dist + path: wheelhouse From e472fcd2ca135829cee57e0622652d8762a3348c Mon Sep 17 00:00:00 2001 From: Inada Naoki Date: Thu, 25 Nov 2021 11:35:27 +0900 Subject: [PATCH 04/18] windows: Do not build wheel for PyPy --- .github/workflows/windows.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/windows.yaml b/.github/workflows/windows.yaml index 3f07a794..0a8f6c8d 100644 --- a/.github/workflows/windows.yaml +++ b/.github/workflows/windows.yaml @@ -20,15 +20,15 @@ jobs: run: | pip install -U Cython make cython - #python setup.py sdist - name: Build wheels shell: bash env: CIBW_TEST_REQUIRES: "pytest" CIBW_TEST_COMMAND: "pytest {package}/test" + CIBW_SKIP: "pp*" run: | - python -m pip install cibuildwheel + pip install cibuildwheel python -m cibuildwheel - name: Upload Wheels From 76b762bca38e08183df61dd8088cdd716ec275ea Mon Sep 17 00:00:00 2001 From: Inada Naoki Date: Thu, 25 Nov 2021 11:47:41 +0900 Subject: [PATCH 05/18] remove .travis.yml --- .travis.yml | 89 ----------------------------------------------------- 1 file changed, 89 deletions(-) delete mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 4974d26c..00000000 --- a/.travis.yml +++ /dev/null @@ -1,89 +0,0 @@ -version: ~> 1.0 -dist: xenial -language: python -cache: pip -arch: - - arm64 - -python: - # Available Python (PyPy) can be listed by: - # - # $ aws s3 ls s3://travis-python-archives/binaries/ubuntu/16.04/x86_64/ - - "3.6" - - "3.7" - - "3.8" - - "3.9-dev" - -_pure: &pure - install: - - pip install -U pip - - pip install -U pytest pytest-cov codecov - - pip install . - script: - - pytest --cov=msgpack -v test - -matrix: - include: - - name: 32bit build - arch: amd64 - language: python - services: - - docker - env: - - DOCKER_IMAGE=quay.io/pypa/manylinux1_i686 - install: - - pip install -U pip - - pip install -r requirements.txt - - make cython - - docker pull $DOCKER_IMAGE - script: - - docker run --rm -v `pwd`:/io -w /io $DOCKER_IMAGE /io/docker/runtests.sh - - - arch: arm64 - name: arm64 32bit build - language: python - services: - - docker - env: - - DOCKER_IMAGE=quay.io/pypa/manylinux2014_aarch64 - install: - - pip install -U pip - - pip install -r requirements.txt - - make cython - - docker pull $DOCKER_IMAGE - script: - - docker run --rm -v `pwd`:/io -w /io $DOCKER_IMAGE /io/docker/runtests.sh - - - name: "Python 2 (fallback)" - python: "2.7" - <<: *pure - - - name: "pypy2.7" - arch: amd64 - python: "pypy2.7-7.1.1" - <<: *pure - - - name: "pypy3" - arch: amd64 - python: "pypy3.6-7.1.1" - <<: *pure - -install: - - pip install -U pip - - pip install -U pytest pytest-cov codecov - - pip install -r requirements.txt # Cython - - make cython - - pip install -e . - -script: - - python -c 'import sys; print(hex(sys.maxsize))' - - python -c 'from msgpack import _cmsgpack' - - pytest --cov=msgpack -v test - - MSGPACK_PUREPYTHON=x pytest --cov=msgpack -v test - -after_success: - - if [ -f .coverage ]; then - codecov; - fi - -# vim: sw=2 ts=2 From ed47669b17288b1d79135525632a324c354e99d5 Mon Sep 17 00:00:00 2001 From: Inada Naoki Date: Thu, 25 Nov 2021 11:54:07 +0900 Subject: [PATCH 06/18] Update Makefile --- Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index b50fa80c..02a4a170 100644 --- a/Makefile +++ b/Makefile @@ -31,8 +31,9 @@ clean: .PHONY: update-docker update-docker: - docker pull quay.io/pypa/manylinux1_i686 - docker pull quay.io/pypa/manylinux1_x86_64 + docker pull quay.io/pypa/manylinux2014_i686 + docker pull quay.io/pypa/manylinux2014_x86_64 + docker pull quay.io/pypa/manylinux2014_aarch64 .PHONY: linux-wheel linux-wheel: From e22cc52c495914c8a6aa14279425ca4b9fbf9da5 Mon Sep 17 00:00:00 2001 From: Inada Naoki Date: Thu, 25 Nov 2021 11:54:24 +0900 Subject: [PATCH 07/18] remove ci/runtests.sh --- ci/runtests.sh | 8 -------- 1 file changed, 8 deletions(-) delete mode 100644 ci/runtests.sh diff --git a/ci/runtests.sh b/ci/runtests.sh deleted file mode 100644 index f71e5e70..00000000 --- a/ci/runtests.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash -set -ex -${PYTHON} -VV -${PYTHON} -m pip install setuptools wheel pytest build -${PYTHON} setup.py build_ext -if -${PYTHON} -c "from msgpack import _cmsgpack" -${PYTHON} -m pytest -v test -${PYTHON} -m build From a89c30abaa0c5abdb1307b0bb8b55e199b4f9111 Mon Sep 17 00:00:00 2001 From: Inada Naoki Date: Thu, 25 Nov 2021 12:09:42 +0900 Subject: [PATCH 08/18] Add "wheel" workflow --- .github/workflows/wheel.yml | 49 ++++++++++++++++++++++++++++++++++ .github/workflows/windows.yaml | 1 - 2 files changed, 49 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/wheel.yml diff --git a/.github/workflows/wheel.yml b/.github/workflows/wheel.yml new file mode 100644 index 00000000..3e9a9c2c --- /dev/null +++ b/.github/workflows/wheel.yml @@ -0,0 +1,49 @@ +name: Build Wheels +on: + push: + pull_request: + create: + +jobs: + build_wheels: + # We want to run on external PRs, but not on our own internal PRs as they'll be run + # by the push to the branch. + if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository + + strategy: + matrix: + os: [ubuntu-20.04, windows-2022, macos-10.15] + runs-on: ${{ matrix.os }} + name: Build wheels on ${{ matrix.os }} + + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Set up QEMU + if: runner.os == 'Linux' + uses: docker/setup-qemu-action@v1 + with: + platforms: arm64 + + - name: Prepare + shell: bash + run: | + pip install -r requirements.txt + make cython + + - name: Build + uses: pypa/cibuildwheel@v2 + env: + CIBW_TEST_REQUIRES: "pytest" + CIBW_TEST_COMMAND: "pytest {package}/test" + CIBW_ARCHS_LINUX: auto aarch64 + CIBW_ARCHS_MACOS: x86_64 universal2 arm64 + CIBW_SKIP: pp* + + - name: Upload Wheels + uses: actions/upload-artifact@v1 + with: + name: Wheels + path: wheelhouse + diff --git a/.github/workflows/windows.yaml b/.github/workflows/windows.yaml index 0a8f6c8d..b694ac08 100644 --- a/.github/workflows/windows.yaml +++ b/.github/workflows/windows.yaml @@ -1,7 +1,6 @@ name: Build and test windows wheels on: push: - pull_request: create: jobs: From 5a6cf8f61b0866387525f38316ecf02ff117200a Mon Sep 17 00:00:00 2001 From: Inada Naoki Date: Thu, 25 Nov 2021 12:12:49 +0900 Subject: [PATCH 09/18] fixup --- .github/workflows/mac.yml | 83 ---------------------------------- .github/workflows/wheel.yml | 2 +- .github/workflows/windows.yaml | 37 --------------- 3 files changed, 1 insertion(+), 121 deletions(-) delete mode 100644 .github/workflows/mac.yml delete mode 100644 .github/workflows/windows.yaml diff --git a/.github/workflows/mac.yml b/.github/workflows/mac.yml deleted file mode 100644 index 56cbb848..00000000 --- a/.github/workflows/mac.yml +++ /dev/null @@ -1,83 +0,0 @@ -name: Build macOS Wheels -on: - push: - branches: - - main - create: - -jobs: - build: - runs-on: macos-latest - - steps: - - name: Checkout - uses: actions/checkout@v2 - - # Python 3.9 - - name: Set up Python 3.9 - uses: actions/setup-python@v2 - with: - python-version: "3.9" - cache: "pip" - - - name: Cythonize - run: | - pip install -U pip - pip install -r requirements.txt - make cython - - - name: Build wheels - uses: pypa/cibuildwheel@v2.2.2 - env: - CIBW_ARCHS_MACOS: x86_64 universal2 - CIBW_SKIP: pp* - - - name: Run test - run: | - ls wheelhouse/ - pip install pytest - pip install -v msgpack --only-binary :all: -f wheelhouse/ --no-index - pytest -v test - - # Python 3.10 - - name: Set up Python 3.10 - uses: actions/setup-python@v2 - with: - python-version: "3.10" - - - name: Run test - run: | - pip install pytest - pip install -v msgpack --only-binary :all: -f wheelhouse/ --no-index - pytest -v test - - # Python 3.8 - - name: Set up Python 3.8 - uses: actions/setup-python@v2 - with: - python-version: "3.8" - - - name: Run test - run: | - pip install pytest - pip install -v msgpack --only-binary :all: -f wheelhouse/ --no-index - pytest -v test - - # Python 3.7 - - name: Set up Python 3.7 - uses: actions/setup-python@v2 - with: - python-version: "3.7" - - - name: Run test - run: | - pip install pytest - pip install -v msgpack --only-binary :all: -f wheelhouse/ --no-index - pytest -v test - - - - name: Upload Wheels - uses: actions/upload-artifact@v1 - with: - name: macos-wheels - path: ./wheelhouse/ diff --git a/.github/workflows/wheel.yml b/.github/workflows/wheel.yml index 3e9a9c2c..e8b581b5 100644 --- a/.github/workflows/wheel.yml +++ b/.github/workflows/wheel.yml @@ -33,7 +33,7 @@ jobs: make cython - name: Build - uses: pypa/cibuildwheel@v2 + uses: pypa/cibuildwheel@v2.2.2 env: CIBW_TEST_REQUIRES: "pytest" CIBW_TEST_COMMAND: "pytest {package}/test" diff --git a/.github/workflows/windows.yaml b/.github/workflows/windows.yaml deleted file mode 100644 index b694ac08..00000000 --- a/.github/workflows/windows.yaml +++ /dev/null @@ -1,37 +0,0 @@ -name: Build and test windows wheels -on: - push: - create: - -jobs: - build: - # We want to run on external PRs, but not on our own internal PRs as they'll be run - # by the push to the branch. - if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository - - runs-on: windows-latest - steps: - - name: Checkout - uses: actions/checkout@v2 - - - name: Cythonize - shell: bash - run: | - pip install -U Cython - make cython - - - name: Build wheels - shell: bash - env: - CIBW_TEST_REQUIRES: "pytest" - CIBW_TEST_COMMAND: "pytest {package}/test" - CIBW_SKIP: "pp*" - run: | - pip install cibuildwheel - python -m cibuildwheel - - - name: Upload Wheels - uses: actions/upload-artifact@v1 - with: - name: win-wheels - path: wheelhouse From f9be4abf6d344354f00f09777b044ed3fe58b50f Mon Sep 17 00:00:00 2001 From: Inada Naoki Date: Thu, 25 Nov 2021 12:17:05 +0900 Subject: [PATCH 10/18] fixup --- .github/workflows/linux.yml | 27 +++++---------------------- .github/workflows/wheel.yml | 6 ++++++ 2 files changed, 11 insertions(+), 22 deletions(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 95c672b2..9a1f3f86 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -1,4 +1,4 @@ -name: Build Linux Wheels +name: Run tests on: push: pull_request: @@ -13,12 +13,13 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v1 + uses: actions/checkout@v2 - - name: Set up Python 3.8 + - name: Set up Python 3.9 uses: actions/setup-python@v1 with: - python-version: 3.8 + python-version: 3.9 + cache: "pip" - name: Cythonize shell: bash @@ -34,23 +35,12 @@ jobs: run: | make linux-wheel - - name: Install qemu-user-static for docker - shell: bash - run: | - docker run --rm --privileged multiarch/qemu-user-static --reset -p yes - - - name: Build arm64 wheels - shell: bash - run: | - make linux-arm64-wheel - - name: Run test (3.8) run: | pip install pytest pip install -v msgpack --only-binary :all: --no-index -f dist/wheelhouse pytest -v test - - name: Set up Python 3.10 uses: actions/setup-python@v1 with: @@ -94,10 +84,3 @@ jobs: pip install pytest pip install -v msgpack --only-binary :all: --no-index -f dist/wheelhouse pytest -v test - - - - name: Upload Wheels - uses: actions/upload-artifact@v1 - with: - name: linux-wheels - path: ./dist/wheelhouse/ diff --git a/.github/workflows/wheel.yml b/.github/workflows/wheel.yml index e8b581b5..3ca596ab 100644 --- a/.github/workflows/wheel.yml +++ b/.github/workflows/wheel.yml @@ -26,6 +26,12 @@ jobs: with: platforms: arm64 + - name: Set up Python 3.9 + uses: actions/setup-python@v1 + with: + python-version: 3.9 + cache: "pip" + - name: Prepare shell: bash run: | From 7093a88fbd2c051e40366b6682a45e85e452437a Mon Sep 17 00:00:00 2001 From: Inada Naoki Date: Thu, 25 Nov 2021 13:40:28 +0900 Subject: [PATCH 11/18] fixup --- .github/workflows/wheel.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/wheel.yml b/.github/workflows/wheel.yml index 3ca596ab..aaf51dc3 100644 --- a/.github/workflows/wheel.yml +++ b/.github/workflows/wheel.yml @@ -27,7 +27,7 @@ jobs: platforms: arm64 - name: Set up Python 3.9 - uses: actions/setup-python@v1 + uses: actions/setup-python@v2 with: python-version: 3.9 cache: "pip" From dfc2e1a5cbbe711f7c5068dd805e8787ce0ca46c Mon Sep 17 00:00:00 2001 From: Inada Naoki Date: Thu, 25 Nov 2021 13:40:44 +0900 Subject: [PATCH 12/18] linux -> test --- .github/workflows/{linux.yml => test.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{linux.yml => test.yml} (100%) diff --git a/.github/workflows/linux.yml b/.github/workflows/test.yml similarity index 100% rename from .github/workflows/linux.yml rename to .github/workflows/test.yml From 9053919b08b680b17a1a4a51af93566657d19228 Mon Sep 17 00:00:00 2001 From: Inada Naoki Date: Thu, 25 Nov 2021 14:20:22 +0900 Subject: [PATCH 13/18] setup-python@v2 --- .github/workflows/test.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9a1f3f86..5d9d7e91 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -16,7 +16,7 @@ jobs: uses: actions/checkout@v2 - name: Set up Python 3.9 - uses: actions/setup-python@v1 + uses: actions/setup-python@v2 with: python-version: 3.9 cache: "pip" @@ -42,7 +42,7 @@ jobs: pytest -v test - name: Set up Python 3.10 - uses: actions/setup-python@v1 + uses: actions/setup-python@v2 with: python-version: "3.10" @@ -53,7 +53,7 @@ jobs: pytest -v test - name: Set up Python 3.9 - uses: actions/setup-python@v1 + uses: actions/setup-python@v2 with: python-version: 3.9 @@ -64,7 +64,7 @@ jobs: pytest -v test - name: Set up Python 3.7 - uses: actions/setup-python@v1 + uses: actions/setup-python@v2 with: python-version: 3.7 @@ -75,7 +75,7 @@ jobs: pytest -v test - name: Set up Python 3.6 - uses: actions/setup-python@v1 + uses: actions/setup-python@v2 with: python-version: 3.6 From 3250ccee58677329d403c0abf920c8df9963e101 Mon Sep 17 00:00:00 2001 From: Inada Naoki Date: Thu, 25 Nov 2021 14:26:43 +0900 Subject: [PATCH 14/18] matrix test --- .github/workflows/test.yml | 77 ++++++++----------------------------- .github/workflows/wheel.yml | 5 --- 2 files changed, 15 insertions(+), 67 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 5d9d7e91..2ca11a56 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,86 +1,39 @@ name: Run tests on: push: + branches: [main] pull_request: create: jobs: - build: - # We want to run on external PRs, but not on our own internal PRs as they'll be run - # by the push to the branch. - if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository + test: + strategy: + matrix: + os: [ubuntu-20.04, windows-2022, macos-10.15] + py: ["3.10", "3.9", "3.8", "3.7", "3.6"] + + runs-on: ${{ matrix.os }} + name: Run test with Python ${{ matrix.py }} on ${{ matrix.os }} - runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v2 - - name: Set up Python 3.9 + - name: Set up Python uses: actions/setup-python@v2 with: - python-version: 3.9 + python-version: ${{ matrix.py }} cache: "pip" - - name: Cythonize + - name: Build shell: bash run: | pip install -U pip - pip -V - pip install -r requirements.txt + pip install -r requirements.txt pytest make cython - #python setup.py sdist + pip install . - - name: Build wheels + - name: Build shell: bash run: | - make linux-wheel - - - name: Run test (3.8) - run: | - pip install pytest - pip install -v msgpack --only-binary :all: --no-index -f dist/wheelhouse - pytest -v test - - - name: Set up Python 3.10 - uses: actions/setup-python@v2 - with: - python-version: "3.10" - - - name: Run test (3.10) - run: | - pip install pytest - pip install -v msgpack --only-binary :all: --no-index -f dist/wheelhouse - pytest -v test - - - name: Set up Python 3.9 - uses: actions/setup-python@v2 - with: - python-version: 3.9 - - - name: Run test (3.9) - run: | - pip install pytest - pip install -v msgpack --only-binary :all: --no-index -f dist/wheelhouse - pytest -v test - - - name: Set up Python 3.7 - uses: actions/setup-python@v2 - with: - python-version: 3.7 - - - name: Run test (3.7) - run: | - pip install pytest - pip install -v msgpack --only-binary :all: --no-index -f dist/wheelhouse - pytest -v test - - - name: Set up Python 3.6 - uses: actions/setup-python@v2 - with: - python-version: 3.6 - - - name: Run test (3.6) - run: | - pip install pytest - pip install -v msgpack --only-binary :all: --no-index -f dist/wheelhouse pytest -v test diff --git a/.github/workflows/wheel.yml b/.github/workflows/wheel.yml index aaf51dc3..36fba85b 100644 --- a/.github/workflows/wheel.yml +++ b/.github/workflows/wheel.yml @@ -1,15 +1,10 @@ name: Build Wheels on: push: - pull_request: create: jobs: build_wheels: - # We want to run on external PRs, but not on our own internal PRs as they'll be run - # by the push to the branch. - if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository - strategy: matrix: os: [ubuntu-20.04, windows-2022, macos-10.15] From 007b8537bd09c248fc5c5cfafc880f812d98d370 Mon Sep 17 00:00:00 2001 From: Inada Naoki Date: Thu, 25 Nov 2021 14:29:50 +0900 Subject: [PATCH 15/18] fix name --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 2ca11a56..c46bd28d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -33,7 +33,7 @@ jobs: make cython pip install . - - name: Build + - name: Test shell: bash run: | pytest -v test From 3987827c0885f0fc333c12f01089848a0684de01 Mon Sep 17 00:00:00 2001 From: Inada Naoki Date: Thu, 25 Nov 2021 14:32:08 +0900 Subject: [PATCH 16/18] run pure Python test --- .github/workflows/test.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c46bd28d..858053c9 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -33,7 +33,13 @@ jobs: make cython pip install . - - name: Test + - name: Test (C extension) shell: bash run: | pytest -v test + + - name: Test (pure Python fallback) + shell: bash + run: | + MSgPACK_PUREPYTHON=1 pytest -v test + From 22b42a4395302b66cf1bcc7f25427d4e4b2c0594 Mon Sep 17 00:00:00 2001 From: Inada Naoki Date: Thu, 25 Nov 2021 14:33:43 +0900 Subject: [PATCH 17/18] fixup --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 858053c9..6e497e00 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -41,5 +41,5 @@ jobs: - name: Test (pure Python fallback) shell: bash run: | - MSgPACK_PUREPYTHON=1 pytest -v test + MSGPACK_PUREPYTHON=1 pytest -v test From 984a861d2c219ad8e2b491803a12b6e6362eb4e6 Mon Sep 17 00:00:00 2001 From: Inada Naoki Date: Thu, 25 Nov 2021 14:40:27 +0900 Subject: [PATCH 18/18] Build wheels only on push to main branch. --- .github/workflows/wheel.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/wheel.yml b/.github/workflows/wheel.yml index 36fba85b..5627b5fc 100644 --- a/.github/workflows/wheel.yml +++ b/.github/workflows/wheel.yml @@ -1,6 +1,7 @@ name: Build Wheels on: push: + branches: [main] create: jobs: