-
Notifications
You must be signed in to change notification settings - Fork 156
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update pymaro build wheel logic (#587)
* add libffi-dev, rust toolchain to linux build wheel * try updating build wheel * update python version in build wheel script * ignore install requirements in build wheel workflow * fix python versions in build wheel * Update build wheel action (#586) * avoid install unused package while building wheels * move source package to windows, as it will cause permission issue on linux * fix manylinux python version * remove duplicated definition --------- Co-authored-by: Jinyu Wang <[email protected]> Co-authored-by: Chaos Yu <[email protected]>
- Loading branch information
1 parent
52ae7a4
commit 94548c7
Showing
13 changed files
with
120 additions
and
114 deletions.
There are no files selected for viewing
This file contains 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 |
---|---|---|
|
@@ -41,26 +41,29 @@ jobs: | |
run: | | ||
python setup.py bdist_wheel | ||
- name: Build source package on Windows | ||
if: runner.os == 'Windows' && matrix.python-version == '3.7' | ||
run: | | ||
python setup.py sdist | ||
- name: Build manylinux wheel | ||
if: runner.os == 'Linux' && matrix.python-version == '3.7' | ||
uses: RalfG/[email protected]_x86_64 | ||
env: | ||
GITHUB_BUILD_ACTION: True | ||
with: | ||
python-versions: 'cp37-cp37m cp38-cp38m cp39-cp39m' | ||
python-versions: 'cp37-cp37m cp38-cp38 cp39-cp39' | ||
build-requirements: 'numpy' | ||
pip-wheel-args: '-w ./wheelhouse' # save wheel packages to wheelhouse folder | ||
system-packages: 'libffi-devel' | ||
pre-build-command: 'export LD_LIBRARY_PATH=/usr/local/lib/:$LD_LIBRARY_PATH' | ||
pip-wheel-args: '-w ./wheelhouse' # save wheel packages to wheelhouse folder | ||
|
||
- name: Move valid packages to dist folder for manylinux | ||
if: runner.os == 'Linux' && matrix.python-version == '3.7' | ||
run: | | ||
mkdir -p dist | ||
cp wheelhouse/pymaro-*-manylinux*.whl dist | ||
- name: Build source package on linux | ||
if: runner.os == 'Linux' && matrix.python-version == '3.7' | ||
run: | | ||
python setup.py sdist | ||
- name: Upload linux wheel to artifact | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
|
This file contains 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 |
---|---|---|
@@ -1,10 +1,10 @@ | ||
@ECHO OFF | ||
|
||
rem script to build maro locally on Windows, usually for development | ||
|
||
chdir "%~dp0.." | ||
|
||
rem compile cython files | ||
call scripts\compile_cython.bat | ||
|
||
python setup.py build_ext -i | ||
@ECHO OFF | ||
|
||
rem script to build maro locally on Windows, usually for development | ||
|
||
chdir "%~dp0.." | ||
|
||
rem compile cython files | ||
call scripts\compile_cython.bat | ||
|
||
python setup.py build_ext -i |
This file contains 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
This file contains 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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
chdir "%~dp0.." | ||
|
||
python setup.py sdist | ||
chdir "%~dp0.." | ||
|
||
python setup.py sdist |
This file contains 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 |
---|---|---|
|
@@ -10,4 +10,4 @@ fi | |
|
||
bash ./scripts/compile_cython.sh | ||
|
||
python setup.py sdist | ||
python setup.py sdist |
This file contains 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 |
---|---|---|
@@ -1,14 +1,14 @@ | ||
|
||
rem script to build wheel package on Windows | ||
rem NOTE: Before building the wheels, please make sure you have setup-up the environment. | ||
rem for python 3.6/3.7 we need vs++14 | ||
|
||
chdir "%~dp0.." | ||
|
||
call scripts\compile_cython.bat | ||
|
||
pip install -r maro/requirements.build.txt | ||
pip install wheel | ||
pip install --upgrade setuptools | ||
|
||
python setup.py bdist_wheel | ||
|
||
rem script to build wheel package on Windows | ||
rem NOTE: Before building the wheels, please make sure you have setup-up the environment. | ||
rem for python 3.6/3.7 we need vs++14 | ||
|
||
chdir "%~dp0.." | ||
|
||
call scripts\compile_cython.bat | ||
|
||
pip install -r maro/requirements.build.txt | ||
pip install wheel | ||
pip install --upgrade setuptools | ||
|
||
python setup.py bdist_wheel |
This file contains 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
This file contains 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 |
---|---|---|
@@ -1,17 +1,17 @@ | ||
@ECHO OFF | ||
|
||
rem Script to install MARO in editable mode on Windows, | ||
rem usually for development. | ||
|
||
chdir "%~dp0.." | ||
|
||
rem Install dependencies. | ||
pip install -r .\maro\requirements.build.txt | ||
|
||
rem Compile cython files. | ||
call .\scripts\compile_cython.bat | ||
|
||
call .\scripts\install_torch.bat | ||
|
||
rem Install MARO in editable mode. | ||
pip install -e . | ||
@ECHO OFF | ||
|
||
rem Script to install MARO in editable mode on Windows, | ||
rem usually for development. | ||
|
||
chdir "%~dp0.." | ||
|
||
rem Install dependencies. | ||
pip install -r .\maro\requirements.build.txt | ||
|
||
rem Compile cython files. | ||
call .\scripts\compile_cython.bat | ||
|
||
call .\scripts\install_torch.bat | ||
|
||
rem Install MARO in editable mode. | ||
pip install -e . |
This file contains 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 |
---|---|---|
@@ -1 +1 @@ | ||
pip install torch===1.6.0 torchvision===0.7.0 -f https://download.pytorch.org/whl/torch_stable.html | ||
pip install torch===1.6.0 torchvision===0.7.0 -f https://download.pytorch.org/whl/torch_stable.html |
This file contains 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 |
---|---|---|
@@ -1,17 +1,17 @@ | ||
rem script to run all the test script under tests folder which the file name match test_xxxx.py | ||
|
||
chdir "%~dp0.." | ||
|
||
set "PYTHONPAH=." | ||
|
||
call scripts/build_maro.bat | ||
|
||
rem install requirements | ||
|
||
pip install -r ./tests/requirements.test.txt | ||
|
||
rem show coverage | ||
|
||
coverage run --rcfile=./tests/.coveragerc | ||
|
||
coverage report --rcfile=./tests/.coveragerc | ||
rem script to run all the test script under tests folder which the file name match test_xxxx.py | ||
|
||
chdir "%~dp0.." | ||
|
||
set "PYTHONPAH=." | ||
|
||
call scripts/build_maro.bat | ||
|
||
rem install requirements | ||
|
||
pip install -r ./tests/requirements.test.txt | ||
|
||
rem show coverage | ||
|
||
coverage run --rcfile=./tests/.coveragerc | ||
|
||
coverage report --rcfile=./tests/.coveragerc |
This file contains 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
This file contains 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 |
---|---|---|
@@ -1,19 +1,19 @@ | ||
|
||
chdir "%~dp0.." | ||
|
||
rem remove old htmlcov | ||
@RD /S /Q htmlcov | ||
|
||
rem generate html | ||
|
||
coverage html | ||
|
||
rem host html | ||
|
||
cd htmlcov | ||
|
||
REM python -m http.server 8888 | ||
|
||
start python -m http.server 8888 | ||
|
||
start "" "http://localhost:8888" | ||
|
||
chdir "%~dp0.." | ||
|
||
rem remove old htmlcov | ||
@RD /S /Q htmlcov | ||
|
||
rem generate html | ||
|
||
coverage html | ||
|
||
rem host html | ||
|
||
cd htmlcov | ||
|
||
REM python -m http.server 8888 | ||
|
||
start python -m http.server 8888 | ||
|
||
start "" "http://localhost:8888" |
This file contains 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