summaryrefslogtreecommitdiff
path: root/.github/workflows/wheel.yml
diff options
context:
space:
mode:
authorInada Naoki <songofacandy@gmail.com>2021-11-25 14:43:55 +0900
committerGitHub <noreply@github.com>2021-11-25 14:43:55 +0900
commitbdf0511e29b02427437b03e7d8454bd5076e837f (patch)
tree2ec378629c48b23468dc4f5f7f6df46af9d712a0 /.github/workflows/wheel.yml
parent6129789e9f6ebccdb19b23c2cd1dc9551e57fc53 (diff)
downloadmsgpack-python-bdf0511e29b02427437b03e7d8454bd5076e837f.tar.gz
Refactor CI (#492)
* Use cibuildwheel to build wheels. * Use matrix
Diffstat (limited to '.github/workflows/wheel.yml')
-rw-r--r--.github/workflows/wheel.yml51
1 files changed, 51 insertions, 0 deletions
diff --git a/.github/workflows/wheel.yml b/.github/workflows/wheel.yml
new file mode 100644
index 0000000..5627b5f
--- /dev/null
+++ b/.github/workflows/wheel.yml
@@ -0,0 +1,51 @@
+name: Build Wheels
+on:
+ push:
+ branches: [main]
+ create:
+
+jobs:
+ build_wheels:
+ 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: Set up Python 3.9
+ uses: actions/setup-python@v2
+ with:
+ python-version: 3.9
+ cache: "pip"
+
+ - name: Prepare
+ shell: bash
+ run: |
+ pip install -r requirements.txt
+ make cython
+
+ - name: Build
+ uses: pypa/cibuildwheel@v2.2.2
+ 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
+