Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: Use build --wheel instead of cibuildwheel #3555

Merged
merged 1 commit into from
Mar 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 9 additions & 38 deletions .github/workflows/build_wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,14 @@ jobs:

build-python-wheel:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest, macos-10.15 ]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: "3.8"
architecture: x64
- name: Setup Node
uses: actions/setup-node@v2
with:
Expand All @@ -67,40 +69,9 @@ jobs:
- name: Build UI
run: make build-ui
- name: Build wheels
uses: pypa/cibuildwheel@v2.7.0
env:
CIBW_BUILD: "cp3*_x86_64"
CIBW_SKIP: "cp36-* cp37-* *-musllinux_x86_64 cp310-macosx_x86_64"
CIBW_ARCHS: "native"
CIBW_BEFORE_ALL_MACOS: |
brew install apache-arrow
brew install pkg-config
curl -o python.pkg https://www.python.org/ftp/python/3.9.12/python-3.9.12-macosx10.9.pkg
sudo installer -pkg python.pkg -target /
# There's a `git restore` in here because `make install-go-ci-dependencies` is actually messing up go.mod & go.sum.
CIBW_BEFORE_BUILD: |
make install-protoc-dependencies
git status
git restore go.mod go.sum
git restore sdk/python/feast/ui/yarn.lock
CIBW_BEFORE_TEST: "cd {project} && git status"
# py3.10 on MacOS does not work with Go so we have to install separately. Issue is tracked here: https://github.com/feast-dev/feast/issues/2881.
- name: Build py310 specific wheels for macos
if: matrix.os == 'macos-10.15'
uses: pypa/cibuildwheel@v2.7.0
env:
CIBW_BUILD: "cp310-macosx_x86_64"
CIBW_ARCHS: "native"
# Need this environment variable because of this issue: https://github.com/pypa/cibuildwheel/issues/952.
CIBW_ENVIRONMENT: >
_PYTHON_HOST_PLATFORM=macosx-10.15-x86_64
# There's a `git restore` in here because remnant go.mod, go.sum changes from the build mess up the wheel naming.
CIBW_BEFORE_BUILD: |
git status
git restore go.mod go.sum
git restore sdk/python/feast/ui/yarn.lock
brew install apache-arrow
brew install pkg-config
run: |
python -m pip install build
python -m build --wheel --outdir wheelhouse/
- uses: actions/upload-artifact@v2
with:
name: wheels
Expand Down
3 changes: 3 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,6 @@ exclude = .git,__pycache__,docs/conf.py,dist,feast/protos,feast/embedded_go/lib
files=feast,tests
ignore_missing_imports=true
exclude=feast/embedded_go/lib

[bdist_wheel]
universal = 1