This repository was archived by the owner on Jun 12, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 9
Build Wheels with GH Actions #29
Closed
Closed
Changes from 19 commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
7af0abf
First attempt
WillAyd 594c934
format fixup
WillAyd 3017cbe
File permissions
WillAyd 01f66fe
pandas checkout step
WillAyd eb2be49
typo
WillAyd 4386e7f
release script
WillAyd 717d6ad
typo fixup
WillAyd e838fea
dependencies
WillAyd e244f68
Added testing requirements
WillAyd e6335be
removed install / testing
WillAyd e4c179f
new wheel names
WillAyd 35d7b11
updates
WillAyd 91b151a
req installs
WillAyd 62fc660
build updates
WillAyd c734819
Removed build_ext
WillAyd 0ab6c38
dateutil
WillAyd 191b725
install fixup
WillAyd a5aa624
install dir fixup
WillAyd 9dcded9
linux fixup
WillAyd 323e88f
leave to pyproject.toml
WillAyd bb988c9
min numpy version
WillAyd 7354b2f
op fixup
WillAyd 7c8b229
numpy versions
WillAyd 069f46a
runs-on os
WillAyd faa561a
env flag
WillAyd f72c757
mac environment variable
WillAyd 1040c91
moved env set
WillAyd File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
name: Create Platform Wheels | ||
|
||
on: [push] | ||
|
||
jobs: | ||
manylinux-x86_64-wheel: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: [3.6, 3.7, 3.8] | ||
steps: | ||
- name: Checkout pandas | ||
uses: actions/checkout@master | ||
with: | ||
repository: pandas-dev/pandas | ||
- name: Checkout release repo for build script | ||
uses: actions/checkout@master | ||
with: | ||
path: "pandas-release" | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Docker Build | ||
run: | | ||
docker run --rm -e PLAT=manylinux2010_x86_64 -e PYVER=${{ matrix.python-version }} -v `pwd`:/io quay.io/pypa/manylinux2010_x86_64 /io/pandas-release/manylinux_build.sh | ||
- name: Install and verify wheel | ||
run: | | ||
python -m pip install numpy pytz python-dateutil | ||
# cd to not install the local unbuilt pandas directory | ||
mkdir temp | ||
cd temp | ||
python -m pip install pandas --no-index -f ../wheelhouse | ||
python -c "import pandas" | ||
cd .. | ||
- name: Upload linux wheel artifact | ||
uses: actions/upload-artifact@v1 | ||
with: | ||
name: wheels | ||
path: wheelhouse | ||
|
||
macos-wheel: | ||
runs-on: macos-latest | ||
strategy: | ||
matrix: | ||
python-version: [3.6, 3.7, 3.8] | ||
steps: | ||
- name: Checkout pandas | ||
uses: actions/checkout@master | ||
with: | ||
repository: pandas-dev/pandas | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install setuptools wheel cython numpy | ||
- name: Build wheels | ||
run: | | ||
python setup.py bdist_wheel | ||
- name: Install and verify wheel | ||
run: | | ||
python -m pip install pytz python-dateutil | ||
# cd to not install the local unbuilt pandas directory | ||
mkdir temp | ||
cd temp | ||
python -m pip install pandas --no-index -f ../dist | ||
python -c "import pandas" | ||
cd .. | ||
- name: Upload wheel artifact | ||
uses: actions/upload-artifact@v1 | ||
with: | ||
name: wheels | ||
path: dist | ||
|
||
windows-wheel: | ||
runs-on: windows-latest | ||
strategy: | ||
matrix: | ||
python-version: [3.6, 3.7, 3.8] | ||
steps: | ||
- name: Checkout pandas | ||
uses: actions/checkout@master | ||
with: | ||
repository: pandas-dev/pandas | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install setuptools wheel cython numpy | ||
- name: Build wheels | ||
run: | | ||
python setup.py bdist_wheel | ||
- name: Install and verify wheel | ||
run: | | ||
python -m pip install pytz python-dateutil | ||
# cd to not install the local unbuilt pandas directory | ||
mkdir temp | ||
cd temp | ||
python -m pip install pandas --no-index -f ../dist | ||
python -c "import pandas" | ||
cd .. | ||
- name: Upload wheel artifact | ||
uses: actions/upload-artifact@v1 | ||
with: | ||
name: wheels | ||
path: dist |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/bin/sh -l | ||
|
||
# Some paths require the period, others dont | ||
PYVER2="${PYVER//.}" | ||
|
||
# Starting in Python38 the ABI version is no longer required | ||
if [ "$PYVER2" = "37" ] || [ "$PYVER2" = "36" ] | ||
then | ||
ABIVER="m" | ||
else | ||
ABIVER="" | ||
fi | ||
|
||
PYLOC=/opt/python/cp${PYVER2}-cp${PYVER2}${ABIVER} | ||
|
||
${PYLOC}/bin/python -m pip install --upgrade pip setuptools wheel auditwheel | ||
${PYLOC}/bin/python -m pip install cython numpy | ||
|
||
cd /io | ||
${PYLOC}/bin/python setup.py bdist_wheel | ||
# TODO: we can be more prescriptive about the wheel being repaired | ||
for whl in dist/pandas*.whl; do | ||
${PYLOC}/bin/python -m auditwheel repair "$whl" --plat $PLAT -w /io/wheelhouse/ | ||
done |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think it's needed to install dependencies, the wheel building step should create an isolated environment with the dependencies listed in pyproject.toml?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe an issue elsewhere, but removing this fails to build:
https://github.com/WillAyd/pandas-release/pull/1/checks?check_run_id=444542968
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, maybe I am mistaken and pyproject.toml is only used when using pip commands (like "pip install" when building from source). Sorry about that.
In any case, if installing numpy, you need to install the oldest supported version to have compatible wheels for different numpy versions.