Skip to content
This repository was archived by the owner on Sep 19, 2023. It is now read-only.

Commit 06e9ecb

Browse files
authored
Add QEMU setup to dist.yml to create arm64 wheels (#18)
* Add QEMU setup to dist.yml * Update pyproject.toml to install Cython via Pip * Update dist.yml to run w/QEMU only on release
1 parent 9b81bed commit 06e9ecb

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

.github/workflows/dist.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,12 @@ jobs:
2525
with:
2626
fetch-depth: 0
2727

28+
- name: Set up QEMU
29+
if: runner.os == 'Linux' and github.event_name == 'release' && github.event.action == 'created'
30+
uses: docker/setup-qemu-action@v2
31+
with:
32+
platforms: all
33+
2834
- uses: actions/setup-python@v4
2935
name: 'Set up Python 3.11'
3036
with:
@@ -37,8 +43,7 @@ jobs:
3743
- name: 'Build and test wheels'
3844
env:
3945
CIBW_ARCHS_MACOS: "x86_64 universal2 arm64"
40-
# GH actions is unable to do aarch64 builds at this time
41-
# CIBW_ARCHS_LINUX: auto aarch64
46+
CIBW_ARCHS_LINUX: auto aarch64
4247
run: |
4348
python3 -m cibuildwheel --output-dir dist
4449

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ environment = {ROCKSDB_VER="v6.14.6", LIBROCKSDB_PATH="/opt/rocksdb-$ROCKSDB_VER
1616

1717
[tool.cibuildwheel.linux]
1818
# Avoid re-building the C library in every iteration by testing for the build directory.
19-
before-build = "yum install -y bzip2-devel lz4-devel snappy-devel zlib-devel python3-Cython && (test -d $LIBROCKSDB_PATH || ( git clone https://github.com/facebook/rocksdb --depth 1 --branch $ROCKSDB_VER $LIBROCKSDB_PATH && cd $LIBROCKSDB_PATH && CXXFLAGS='-flto -Os -s' PORTABLE=1 make shared_lib -j $(nproc) )) && pushd $LIBROCKSDB_PATH && make install-shared && ldconfig && popd"
19+
before-build = "pip3 install Cython && yum install -y bzip2-devel lz4-devel snappy-devel zlib-devel && (test -d $LIBROCKSDB_PATH || ( git clone https://github.com/facebook/rocksdb --depth 1 --branch $ROCKSDB_VER $LIBROCKSDB_PATH && cd $LIBROCKSDB_PATH && CXXFLAGS='-flto -Os -s' PORTABLE=1 make shared_lib -j $(nproc) )) && pushd $LIBROCKSDB_PATH && make install-shared && ldconfig && popd"
2020

2121
[tool.cibuildwheel.macos]
2222
environment = {ROCKSDB_VER="v6.29.5", LIBROCKSDB_PATH="/usr/local/opt/rocksdb-$ROCKSDB_VER", LIBRARY_PATH="/usr/local/lib/"}

0 commit comments

Comments
 (0)