Skip to content

Commit 0ca1942

Browse files
kiminoue7facebook-github-bot
authored andcommitted
Fix build-and-test.yaml (#3)
Summary: Pull Request resolved: #3 Fix build-and-test.yaml github action so that we can capture the error when building the wheel. Differential Revision: D43954739 fbshipit-source-id: 141d2050f48e5e32ff168ceaf03f817ca19447dc
1 parent 2653a56 commit 0ca1942

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

.github/workflows/build-and-test.yml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,23 @@ jobs:
5151
fi
5252
python -m pip install -U pip
5353
python -m pip install numpy typing dataclasses pytest parameterized Pillow
54+
python -m pip install cibuildwheel
55+
56+
- name: Build wheels for CPython
57+
run: |
58+
python -m cibuildwheel --output-dir dist
59+
env:
60+
CIBW_ARCHS_LINUX: x86_64
61+
# apple M1 image is not supported yet in Github Action: https://github.com/actions/runner-images/issues/2187
62+
# We need to manually build this locally until this will be supported.
63+
CIBW_ARCHS_MACOS: x86_64 # "x86_64 arm64"
64+
CIBW_BUILD: "cp37-*64 cp38-*64 cp39-*64 cp310-*64 cp311-*64"
65+
CIBW_BEFORE_BUILD_LINUX: bash scripts/install-manylinux-deps.sh
66+
CIBW_BEFORE_BUILD_MACOS: bash scripts/install-macos-deps.sh
67+
CIBW_SKIP: "*-manylinux_i686 *musllinux*"
5468

5569
- name: Build and Test Python
5670
shell: bash
5771
run: |
58-
rm -rf csrc/vrs/pyvrs
5972
pip install -e .
6073
python -m pytest test

0 commit comments

Comments
 (0)